Mercurial > hg > extraction-interface
comparison js/taggingtext.js @ 95:9a29e9d28ece extractapp
new: create new topic
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 11 Nov 2015 14:12:55 +0100 |
parents | b0cecc104639 |
children | 5bea390e7ca9 |
comparison
equal
deleted
inserted
replaced
94:b0cecc104639 | 95:9a29e9d28ece |
---|---|
27 var lastAddTag=""; | 27 var lastAddTag=""; |
28 | 28 |
29 var regex_element_index = 0; | 29 var regex_element_index = 0; |
30 | 30 |
31 window.onbeforeunload = function() { | 31 window.onbeforeunload = function() { |
32 return "Are you sure?"; | 32 return "Unsaved data will be lost."; |
33 }; | 33 }; |
34 | 34 |
35 | 35 |
36 /* | 36 /* |
37 $(document).on("mouseup", function (e) { | 37 $(document).on("mouseup", function (e) { |
556 $('#smartRegexShowDiv').append(newdiv); | 556 $('#smartRegexShowDiv').append(newdiv); |
557 | 557 |
558 replaceSmartClose(); | 558 replaceSmartClose(); |
559 } | 559 } |
560 | 560 |
561 $(document).keyup(function(e) { | |
562 if (e.keyCode == 27) { // escape key maps to keycode `27` | |
563 // close popups | |
564 $('#load_topic_div').css("display", "none"); | |
565 $('#new_topic_div').css("display", "none"); | |
566 $('#load_regex_div').css("display", "none"); | |
567 $('#regex_generator').css("display", "none"); | |
568 $('#smartRegexPopUpDiv').css("display", "none"); | |
569 $('.questionMarkClass').css("display", "none"); | |
570 $('.tagItemDivClass').css("display", "none"); | |
571 } | |
572 }); | |
573 | |
561 | 574 |
562 $(document).on("click", '#smartRegexShowDiv > span', function (e) { | 575 $(document).on("click", '#smartRegexShowDiv > span', function (e) { |
563 | 576 |
564 | |
565 | |
566 $('#smartRegexPopUpDiv').css("display", "block"); | 577 $('#smartRegexPopUpDiv').css("display", "block"); |
567 | 578 |
568 $('#smartRegexPopUpDiv').attr("editID", $(this).attr("id")); | 579 $('#smartRegexPopUpDiv').attr("editID", $(this).attr("id")); |
569 | 580 |
570 $('#smartRegexPopUpName').val($(this).text()); | 581 $('#smartRegexPopUpName').val($(this).text()); |