Commit 8dd74fbf099365ed94dfdf20bef7a3269bdcb34d
1 parent
f84616c8
Minor fixes.
Showing
2 changed files
with
7 additions
and
36 deletions
dictionary/models.py
... | ... | @@ -1401,8 +1401,14 @@ class Entry(Model): |
1401 | 1401 | return self.semantic_frames.filter(next__isnull=True, removed=False) |
1402 | 1402 | |
1403 | 1403 | def matching_connections(self, schema, position, phrase_type): |
1404 | - frames = self.actual_frames() | |
1404 | + | |
1405 | 1405 | matching_connections = [] |
1406 | + | |
1407 | + frames = self.actual_frames() | |
1408 | + for entry in self.rel_entries.all(): | |
1409 | + new_frames = entry.actual_frames() | |
1410 | + frames |= new_frames | |
1411 | + | |
1406 | 1412 | for frame in frames: |
1407 | 1413 | for compl in frame.complements.all(): |
1408 | 1414 | matching_realizations = compl.realizations.filter(frame=schema, |
... | ... |
dictionary/static/js/lemma-view.js
... | ... | @@ -205,41 +205,6 @@ function load_content(id) { |
205 | 205 | loadSchemataAndExamples(); |
206 | 206 | |
207 | 207 | createSplitter('framesSplit','new-frame-tables', 'tabs'); |
208 | - /*if(window.can_modify) | |
209 | - { | |
210 | - addSyntacticFramesPerm = user_has_perm('dictionary.add_syntactic_frames'); | |
211 | - addPhraseologicFramesPerm = user_has_perm('dictionary.add_phraseologic_frames'); | |
212 | - | |
213 | - if(addSyntacticFramesPerm || addPhraseologicFramesPerm) { | |
214 | - $(document).unbind('keydown'); | |
215 | - $(document).bind('keydown', 'shift+s', saveHandle); | |
216 | - $(document).bind('keydown', 'shift+z', function(evt){backOneModification(); return false; }); | |
217 | - $(document).bind('keydown', 'shift+y', function(evt){forwardOneModification(); return false; }); | |
218 | - $(document).bind('keydown', 'shift+a', function(evt){addElement(); return false; }); | |
219 | - $(document).bind('keydown', 'shift+r', function(evt){removeElement(); return false; }); | |
220 | - $(document).bind('keydown', 'shift+d', function(evt){duplicateElement(); return false; }); | |
221 | - $(document).bind('keydown', 'shift+c', function(evt){copyElement(); return false; }); | |
222 | - $(document).bind('keydown', 'shift+v', function(evt){pasteElement(); return false; }); | |
223 | - $(document).bind('keydown', 'shift+w', function(evt){validateSchemata(); return false; }); | |
224 | - if(addSyntacticFramesPerm) { | |
225 | - $(document).bind('keydown', 'shift+x', function(evt){cutElement(); return false; }); | |
226 | - $(document).bind('keydown', 'shift+m', function(evt){reserveLemma(); return false; }); | |
227 | - } | |
228 | - if(addPhraseologicFramesPerm) { | |
229 | - $(document).bind('keydown', 'shift+l', function(evt){addPhraseologicFrame(); return false; }); | |
230 | - $(document).bind('keydown', 'shift+b', function(evt){openAssignPhraseologicFrameDialog(); return false; }); | |
231 | - } | |
232 | - } | |
233 | - } | |
234 | - else | |
235 | - { | |
236 | - $(document).unbind('keydown'); | |
237 | - $.get(ajax_user_has_perm, {perm: 'dictionary.own_lemmas'}, function(result) { | |
238 | - if(result['has_perm']) { | |
239 | - $(document).bind('keydown', 'shift+m', function(evt){reserveLemma(); return false; }); | |
240 | - } | |
241 | - }); | |
242 | - }*/ | |
243 | 208 | |
244 | 209 | if(document.getElementById("lemma_example_show")) |
245 | 210 | { |
... | ... |