Mercurial > hg > extraction-interface
comparison js/taggingtext.js @ 72:6974309983d1 extractapp
Bug fixed:1.remove tagging popup window on editable-area, 2.close/disable inputs and buttons, when entering edit-text mode.
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 08 Apr 2015 15:45:53 +0200 |
parents | 359f48d58cbc |
children | 97c1e5102a22 |
comparison
equal
deleted
inserted
replaced
71:26d8c4c43d86 | 72:6974309983d1 |
---|---|
186 } | 186 } |
187 | 187 |
188 function editText() { | 188 function editText() { |
189 var el = document.getElementById("editable-area"); | 189 var el = document.getElementById("editable-area"); |
190 if ( $("#editTextId").html() == "Edit the text" ) { | 190 if ( $("#editTextId").html() == "Edit the text" ) { |
191 // --- in editing mode --- | |
191 saveUndoText(); | 192 saveUndoText(); |
192 el.contentEditable = true; | 193 el.contentEditable = true; |
194 | |
195 // disable/close functions | |
193 $("button").attr("disabled", true); | 196 $("button").attr("disabled", true); |
194 $("#editTextId").attr("disabled", false); | 197 $("#editTextId").attr("disabled", false); |
198 $("#popups").css("display","none"); // close the popup windows | |
199 $("input").attr('disabled', true); // disable input | |
200 // clean editable-area | |
201 $('.questionMarkClass').remove(); | |
202 $('.tagItemDivClass').remove(); | |
203 | |
195 $("#editTextId").html("Edit completed!"); | 204 $("#editTextId").html("Edit completed!"); |
196 } else { | 205 } else { |
206 // --- not editing mode --- | |
197 el.contentEditable = false; | 207 el.contentEditable = false; |
198 cleanUpTextArea(); | 208 cleanUpTextArea(); |
199 $("button").attr("disabled", false); | 209 $("button").attr("disabled", false); |
200 $("#editTextId").html("Edit the text"); | 210 $("#popups").css("display","block"); // open the popup windows |
211 $("input").attr('disabled', false); // enable input | |
212 $("#editTextId").html("Edit the text"); | |
201 } | 213 } |
202 } | 214 } |
203 | 215 |
204 | 216 |
205 function removeTagNewDiv( eventObject, tagName, tagObject ) { | 217 function removeTagNewDiv( eventObject, tagName, tagObject ) { |