Mercurial > hg > extraction-interface
comparison js/taggingtext.js @ 93:a05491461199 extractapp
bug fixed: solve the nested tagging issue
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 02 Oct 2015 12:18:34 +0200 |
parents | e681d693240e |
children | b0cecc104639 |
comparison
equal
deleted
inserted
replaced
92:f5b0cd4f25b2 | 93:a05491461199 |
---|---|
236 } | 236 } |
237 } | 237 } |
238 | 238 |
239 | 239 |
240 function removeTagNewDiv( eventObject, tagName, tagObject ) { | 240 function removeTagNewDiv( eventObject, tagName, tagObject ) { |
241 // TODO: nesting tag representaion | |
242 | |
243 saveUndoText(); | 241 saveUndoText(); |
242 | |
244 var newdiv = document.createElement("div"); | 243 var newdiv = document.createElement("div"); |
245 $(newdiv).id = "questionMarkId"; | 244 //$(newdiv).id = "questionMarkId"; |
246 $(newdiv).attr("class", "questionMarkClass"); | 245 $(newdiv).attr("class", "questionMarkClass"); |
247 | 246 |
247 | |
248 // set z-index to 3 to bring popup tag windwo to front | 248 // set z-index to 3 to bring popup tag windwo to front |
249 newdiv.style.cssText = 'top:'+eventObject.pageY+'; left:'+eventObject.pageX+';'; | 249 newdiv.style.cssText = 'top:'+eventObject.pageY+'; left:'+eventObject.pageX+';'; |
250 | 250 |
251 newdiv.innerHTML = "Tag: "+tagName+"<br>Value: "+tagObject.text()+"<br>"; | 251 newdiv.innerHTML = "Tag: "+tagName+"<br>Value: "+tagObject.text()+"<br>"; |
252 | 252 |
313 el.innerHTML = str.replace(regexText, replaceText); | 313 el.innerHTML = str.replace(regexText, replaceText); |
314 }); | 314 }); |
315 newbutton.appendTo(newdiv); | 315 newbutton.appendTo(newdiv); |
316 | 316 |
317 tagObject.append(newdiv); | 317 tagObject.append(newdiv); |
318 | |
319 | |
318 } | 320 } |
319 | 321 |
320 function saveText(section_id) { | 322 function saveText(section_id) { |
321 var el = document.getElementById("editable-area"); | 323 var el = document.getElementById("editable-area"); |
322 $.ajax({ | 324 $.ajax({ |