# HG changeset patch # User Zoe Hong # Date 1443781114 -7200 # Node ID a05491461199d8b5a300ee23d657ca1bd3b59aaa # Parent f5b0cd4f25b2c00e18f9f4b021feebc88aae4e44 bug fixed: solve the nested tagging issue diff -r f5b0cd4f25b2 -r a05491461199 js/taggingtext.js --- a/js/taggingtext.js Mon Sep 14 14:39:03 2015 +0200 +++ b/js/taggingtext.js Fri Oct 02 12:18:34 2015 +0200 @@ -238,13 +238,13 @@ function removeTagNewDiv( eventObject, tagName, tagObject ) { - // TODO: nesting tag representaion + saveUndoText(); - saveUndoText(); var newdiv = document.createElement("div"); - $(newdiv).id = "questionMarkId"; + //$(newdiv).id = "questionMarkId"; $(newdiv).attr("class", "questionMarkClass"); + // set z-index to 3 to bring popup tag windwo to front newdiv.style.cssText = 'top:'+eventObject.pageY+'; left:'+eventObject.pageX+';'; @@ -315,6 +315,8 @@ newbutton.appendTo(newdiv); tagObject.append(newdiv); + + } function saveText(section_id) { diff -r f5b0cd4f25b2 -r a05491461199 views/Extractapp/TaggingText.php --- a/views/Extractapp/TaggingText.php Mon Sep 14 14:39:03 2015 +0200 +++ b/views/Extractapp/TaggingText.php Fri Oct 02 12:18:34 2015 +0200 @@ -57,6 +57,7 @@ + - @@ -170,20 +170,22 @@ var taglistArray = JSON.parse(''); for (var i = 0; i < taglistArray.length; i++) { var taglistValue = taglistArray[i]; - + + $(document).on("click", taglistValue[2], function (e) { if ($("#editTextId").html() != "Edit the text") return 0; var tagName = $(this).prop("tagName").toLowerCase(); - /* - if ($(this).prop("tagName").toLowerCase() != taglistValue[2]) { - return 0; - } - */ + //if (tagName != taglistValue[2]) return 0; + // pop_remove_tag_window is a global variable which indicates if to show the remove-popup-window if (pop_remove_tag_window) { removeTagNewDiv( e, tagName , $(this)); }; - }); + return false; + }); + + + }; /*