Commit 015571a6528d308cef52a378f688958c17cc6045
1 parent
6e552f4d
Wyjątek -- nie wybrano żadnego synsetu, dla jednostek frazeologicznych
Showing
1 changed file
with
10 additions
and
6 deletions
semantics/static/js/semantics_view.js
... | ... | @@ -411,14 +411,18 @@ function changeLexicalUnits() { |
411 | 411 | $.prompt.close(); |
412 | 412 | } |
413 | 413 | if (v == 1) { |
414 | - changeUnits(highlighted_id, units); | |
414 | + if ((typeof f.synset) == 'undefined') { | |
415 | + alert('Nie wybrano żadnego synsetu!'); | |
416 | + } else { | |
417 | + changeUnits(highlighted_id, units); | |
415 | 418 | |
416 | - addPhraseologicalUnits(highlighted_id, units, old_mwes, new_mwes, f.glossa, f.relation, f.synset); | |
419 | + addPhraseologicalUnits(highlighted_id, units, old_mwes, new_mwes, f.glossa, f.relation, f.synset); | |
417 | 420 | |
418 | - frameClick(""); | |
419 | - displayFrames(); | |
420 | - frameClick(a); | |
421 | - $.prompt.close(); | |
421 | + frameClick(""); | |
422 | + displayFrames(); | |
423 | + frameClick(a); | |
424 | + $.prompt.close(); | |
425 | + } | |
422 | 426 | } |
423 | 427 | }; |
424 | 428 | |
... | ... |