Mercurial > hg > extraction-interface
diff 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 |
line wrap: on
line diff
--- a/js/taggingtext.js Mon Nov 09 12:00:24 2015 +0100 +++ b/js/taggingtext.js Wed Nov 11 14:12:55 2015 +0100 @@ -29,7 +29,7 @@ var regex_element_index = 0; window.onbeforeunload = function() { - return "Are you sure?"; + return "Unsaved data will be lost."; }; @@ -558,11 +558,22 @@ replaceSmartClose(); } +$(document).keyup(function(e) { + if (e.keyCode == 27) { // escape key maps to keycode `27` + // close popups + $('#load_topic_div').css("display", "none"); + $('#new_topic_div').css("display", "none"); + $('#load_regex_div').css("display", "none"); + $('#regex_generator').css("display", "none"); + $('#smartRegexPopUpDiv').css("display", "none"); + $('.questionMarkClass').css("display", "none"); + $('.tagItemDivClass').css("display", "none"); + } +}); + $(document).on("click", '#smartRegexShowDiv > span', function (e) { - - $('#smartRegexPopUpDiv').css("display", "block"); $('#smartRegexPopUpDiv').attr("editID", $(this).attr("id"));