# HG changeset patch # User Zoe Hong # Date 1428500753 -7200 # Node ID 6974309983d1daf21422252773eac24600e69b82 # Parent 26d8c4c43d86c41dad018a3f7889af30b89ebbbb Bug fixed:1.remove tagging popup window on editable-area, 2.close/disable inputs and buttons, when entering edit-text mode. diff -r 26d8c4c43d86 -r 6974309983d1 js/taggingtext.js --- a/js/taggingtext.js Wed Apr 08 14:57:01 2015 +0200 +++ b/js/taggingtext.js Wed Apr 08 15:45:53 2015 +0200 @@ -188,16 +188,28 @@ function editText() { var el = document.getElementById("editable-area"); if ( $("#editTextId").html() == "Edit the text" ) { + // --- in editing mode --- saveUndoText(); el.contentEditable = true; + + // disable/close functions $("button").attr("disabled", true); $("#editTextId").attr("disabled", false); + $("#popups").css("display","none"); // close the popup windows + $("input").attr('disabled', true); // disable input + // clean editable-area + $('.questionMarkClass').remove(); + $('.tagItemDivClass').remove(); + $("#editTextId").html("Edit completed!"); } else { + // --- not editing mode --- el.contentEditable = false; cleanUpTextArea(); $("button").attr("disabled", false); - $("#editTextId").html("Edit the text"); + $("#popups").css("display","block"); // open the popup windows + $("input").attr('disabled', false); // enable input + $("#editTextId").html("Edit the text"); } } diff -r 26d8c4c43d86 -r 6974309983d1 views/Extractapp/TaggingText.php --- a/views/Extractapp/TaggingText.php Wed Apr 08 14:57:01 2015 +0200 +++ b/views/Extractapp/TaggingText.php Wed Apr 08 15:45:53 2015 +0200 @@ -208,7 +208,7 @@ alert("Warning: taglist is deprecated in the current file."); } - + }); @@ -543,7 +543,7 @@ // clean editable-area $('.questionMarkClass').remove(); $('.tagItemDivClass').remove(); - + // ------------- var info = JSON.parse(''); var topic_id = JSON.parse('');