Mercurial > hg > extraction-interface
diff develop/views/Extractapp/taggingtext.php @ 27:4a29bccb6c59
modify the SmartRegexSave method to prevent duplicated records in topic_regex_relation table and provide better promting to user to force saving regex file or not
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 03 Mar 2015 11:47:41 +0100 |
parents | 579f03f8bee5 |
children | e6e9bdc4f256 |
line wrap: on
line diff
--- a/develop/views/Extractapp/taggingtext.php Tue Mar 03 10:33:42 2015 +0100 +++ b/develop/views/Extractapp/taggingtext.php Tue Mar 03 11:47:41 2015 +0100 @@ -358,6 +358,10 @@ hiddenField.setAttribute("value", topic_id); form.appendChild(hiddenField); + _postForContineTagging(form); + + + /* var section_id = JSON.parse('<?php echo json_encode($section_id) ?>'); console.log("section_id: "+section_id+", topic_id: "+topic_id); @@ -393,6 +397,7 @@ } else { form.submit(); // works under IE and Chrome, but not FF } + */ } @@ -403,7 +408,6 @@ var str= "" + el.innerHTML; var form = document.createElement("form"); form.setAttribute("method", "post"); - //form.setAttribute("action", "exportTable.php"); form.setAttribute("action", "./ExportTable");//+section_id); // hand to controller form.setAttribute("target", "_blank"); @@ -417,6 +421,10 @@ hiddenField.setAttribute("value", topic_id); form.appendChild(hiddenField); + _postForContineTagging(form); + + +/* var section_id = JSON.parse('<?php echo json_encode($section_id) ?>'); console.log("section_id: "+section_id+", topic_id: "+topic_id); @@ -444,6 +452,7 @@ form.appendChild(hiddenField); }; + if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { document.body.appendChild(form); @@ -451,7 +460,7 @@ } else { form.submit(); // works under IE and Chrome, but not FF } - + */ } // =========== @@ -562,8 +571,6 @@ var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", "./TaggingText"); // hand to controller - - // form.setAttribute("action", "./"+info['section_id']); // hand to controller form.setAttribute("target", "_self"); var hiddenField = document.createElement("input"); @@ -571,6 +578,20 @@ hiddenField.setAttribute("value", "SaveFullTextToLGService"); form.appendChild(hiddenField); + + var hiddenField = document.createElement("input"); + hiddenField.setAttribute("name", "label"); + hiddenField.setAttribute("value", label); + form.appendChild(hiddenField); + + var hiddenField = document.createElement("input"); + hiddenField.setAttribute("name", "topic_id"); + hiddenField.setAttribute("value", topic_id); + form.appendChild(hiddenField); + + _postForContineTagging(form); + + /* if (info) { var hiddenField = document.createElement("input"); hiddenField.setAttribute("name", "fileId"); @@ -602,13 +623,8 @@ hiddenField.setAttribute("value", info['book_name']); form.appendChild(hiddenField); - } - var hiddenField = document.createElement("input"); - hiddenField.setAttribute("name", "label"); - hiddenField.setAttribute("value", label); - form.appendChild(hiddenField); - + var hiddenField = document.createElement("input"); hiddenField.setAttribute("name", "text"); var el = document.getElementById("editable-area"); @@ -617,21 +633,13 @@ hiddenField.setAttribute("value", text); form.appendChild(hiddenField); - var hiddenField = document.createElement("input"); - hiddenField.setAttribute("name", "topic_id"); - hiddenField.setAttribute("value", topic_id); - form.appendChild(hiddenField); - - - - if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { document.body.appendChild(form); form.submit(); } else { form.submit(); // works under IE and Chrome, but not FF } - + */ }