Mercurial > hg > extraction-interface
changeset 99:c3e149277b58 extractapp
modifications based on the docs 'Improving LGServices interface.docx'
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 02 May 2016 14:21:41 +0200 |
parents | 5bea390e7ca9 |
children | 8a97db7b9108 |
files | js/taggingtext.js views/Extractapp/EditTaglist.php views/Extractapp/TaggingText.php |
diffstat | 3 files changed, 42 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/js/taggingtext.js Mon Mar 14 14:43:42 2016 +0100 +++ b/js/taggingtext.js Mon May 02 14:21:41 2016 +0200 @@ -268,7 +268,7 @@ }); newbutton.appendTo(newdiv); - var newbutton = $('<button class="btn btn-default">Remove this(with newline)</button>').mouseup(function (e2) { + var newbutton = $('<button class="btn btn-default">Remove this(with line break)</button>').mouseup(function (e2) { var textKeep = $(this).parent().parent().html(); var regexText=/<div(.*?)<\/div>/g; var replaceText=""; @@ -304,7 +304,7 @@ }); newbutton.appendTo(newdiv); - var newbutton = $('<button class="btn btn-default">Remove all(with newline)</button>').mouseup(function (e2) { + var newbutton = $('<button class="btn btn-default">Remove all(with line break)</button>').mouseup(function (e2) { var textKeep = $(this).parent().parent().html(); var regexText=/<div(.*?)<\/div>/g; var replaceText="";
--- a/views/Extractapp/EditTaglist.php Mon Mar 14 14:43:42 2016 +0100 +++ b/views/Extractapp/EditTaglist.php Mon May 02 14:21:41 2016 +0200 @@ -46,9 +46,10 @@ <body> -<h3>Topic Tag is "<?php echo $taglistArray[$topic_tag_id][1]; ?>" </h3> +<h3 width="90%" align="center">You are currently editing the tag list for topic: <?php echo $taglistArray[$topic_tag_id][1]; ?> </h3> -<table width="100%" border="1" id="tableMain"> </table> + +<table width="90%" align="center" border="1" id="tableMain"> </table> <script type="text/javascript"> @@ -74,8 +75,10 @@ // esc: 27 // shift, ctr, alt: 16, 17, 18, 20 // cmd: 91 + // -: 189 - if (event.keyCode == 8 || event.keyCode == 9 || (event.keyCode >= 16 && event.keyCode <= 20) || event.keyCode == 27 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 91 || englishAlphabetAndWhiteSpace.test(key)) { + + if (event.keyCode == 8 || event.keyCode == 9 || (event.keyCode >= 16 && event.keyCode <= 20) || event.keyCode == 27 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 91 || event.keyCode == 189 || englishAlphabetAndWhiteSpace.test(key)) { return true; } @@ -247,7 +250,8 @@ if ( color=="Color") { row.appendChild(newcolumn).innerHTML="Delete"; } else if (id == topic_tag_id) { - row.appendChild(newcolumn).innerHTML="-"; + row.appendChild(newcolumn).innerHTML="<b>(Main tag)</b>"; + } else { row.appendChild(newcolumn).innerHTML="<button onclick=\"DeleteTag("+id+")\">Delete</button>"; }
--- a/views/Extractapp/TaggingText.php Mon Mar 14 14:43:42 2016 +0100 +++ b/views/Extractapp/TaggingText.php Mon May 02 14:21:41 2016 +0200 @@ -1487,7 +1487,7 @@ <p class="text-muted">(Only the lines with the tag will be in the exported table.)</p> </div> <button onclick="editTaglist(<?php echo $default_topic_id; ?>)" class="btn btn-default btn-block">Edit Tag List</button> - <button onclick="configTagsInTopic(<?php echo $default_topic_id;?>)" class="btn btn-default btn-block">Select Existing Tags</button> + <button onclick="configTagsInTopic(<?php echo $default_topic_id;?>)" class="btn btn-default btn-block">Select Existing Tags (testing)</button> </div> </fieldset> @@ -1504,27 +1504,48 @@ </div> </fieldset> --> + <fieldset class="tool-frame"> + <legend><h5 class="tool-topic" data-toggle="collapse" data-target="#tool_edit"> Edit, Save, and Export: <span class="caret"></span></h5></legend> + <!--<button onclick="cleanUpTextArea()" style="height: 30px; width: 220px">Reform the text</button></br>--> + <!-- save text in local. replaced by saveTextToLGService, which is also saving on copy in local in development stage --> + <!-- + <button onclick="saveText(<?php echo $section_id; ?>)" style="height: 30px; width: 220px">Save the text</button></br> + --> + <div class="collapse in" id="tool_edit"> + <button onclick="editText()" id="editTextId" class="btn btn-default">Edit text</button> + <button onclick="Undo()" class="btn btn-default" id="buttonUndo" disabled="true">Undo changes</button> + + + <button onclick="saveTextToLGService()" id="save_text_to_LGService_id" class="btn btn-default btn-block">Save to LGService</button> + <button onclick="exportAll(<?php echo $default_topic_id;?>)" class="btn btn-default btn-block">Export All</button> + Page: <input type="text" size="5" id="exportPageStart">to<input type="text" size="5" id="exportPageEnd"> + <button onclick="exportPage(<?php echo $default_topic_id;?>)" class="btn btn-default btn-sm">Export</button></br> + </div> + + + </fieldset> <fieldset class="tool-frame"> - <legend><h5 class="tool-topic" data-toggle="collapse" data-target="#tool_regex"> Replace By <i><b>Smart Regex</b></i>©: <span class="caret"></span></h5></legend> - + <legend><h5 class="tool-topic" data-toggle="collapse" data-target="#tool_regex"> Tag by <i><b>Smart Regex</b></i>©:<span class="caret"></span></h5></legend> + <!-- rename: "Replace By <i><b>Smart Regex</b></i>©:" to "Tag by Smart Regex" --> + <div id="tool_regex" class="collapse in"> <div id="smartRegexShowDiv"></div><br> <!-- <button onclick="smartRegexNew()" class="btn-lg">Add Regex Group</button></br> --> - <button onclick="smartRegexNew()" id="smart_regex_new_id" class="btn btn-default btn-block">Search by Patterns (Smart Regex)</button> - + <button onclick="smartRegexNew()" id="smart_regex_new_id" class="btn btn-default btn-block">Compile a new Regex</button> + <!-- rename "Search by Patterns (Smart Regex)" to "Compile a new Regex"--> + <button onclick="smartRegexLoad(<?php echo $default_topic_id; ?>)" class="btn btn-default">Load</button> <button onclick="smartRegexSave(<?php echo $default_topic_id; ?>)" class="btn btn-default">Save</button> <button onclick="smartRegexEmpty()" class="btn btn-default">Clear</button></br></br> - - - Range: <input type="text" size="5" id="regexPageStart">to<input type="text" size="5" id="regexPageEnd"><br> - <button onclick="replaceSmartRun()" class="btn btn-default btn-block">Run</button> - <button onclick="replaceSmartRunWithBr()" class="btn btn-default btn-block">Run(in new line)</button> + Tag only for this range: <br> + <input type="text" size="5" id="regexPageStart">to<input type="text" size="5" id="regexPageEnd"><br> + <button onclick="replaceSmartRun()" class="btn btn-default">Tag</button> + <button onclick="replaceSmartRunWithBr()" class="btn btn-default">Tag (with line break)</button> <!-- <button onclick="replaceSmartRunSpace()" class="btn-lg">Run(Allow space between Group)</button></br> --> - <button onclick="replaceSmartRunSpace()" class="btn btn-default btn-block">Run(Allow space between block)</button></br> + <button onclick="replaceSmartRunSpace()" class="btn btn-default btn-block">Tag (Allow space within block)</button></br> <button onclick="window.open('./EditWordlist')" class="btn btn-default btn-block">Edit WordList</button></br> @@ -1551,28 +1572,7 @@ <?php }?> - <fieldset class="tool-frame"> - <legend><h5 class="tool-topic" data-toggle="collapse" data-target="#tool_edit"> Edit: <span class="caret"></span></h5></legend> - <!--<button onclick="cleanUpTextArea()" style="height: 30px; width: 220px">Reform the text</button></br>--> - <!-- save text in local. replaced by saveTextToLGService, which is also saving on copy in local in development stage --> - <!-- - <button onclick="saveText(<?php echo $section_id; ?>)" style="height: 30px; width: 220px">Save the text</button></br> - --> - <div class="collapse in" id="tool_edit"> - <button onclick="editText()" id="editTextId" class="btn btn-default btn-block">Edit the text</button> - <button onclick="Undo()" class="btn btn-default btn-block" id="buttonUndo" disabled="true">Undo</button> - </div> - </fieldset> - <fieldset class="tool-frame"> - <legend><h5 class="tool-topic" data-toggle="collapse" data-target="#tool_save"> Save and Export: <span class="caret"></span></h5></legend> - <div class="collapse in" id="tool_save"> - <button onclick="saveTextToLGService()" id="save_text_to_LGService_id" class="btn btn-default btn-block">Save to LGService</button> - <button onclick="exportAll(<?php echo $default_topic_id;?>)" class="btn btn-default btn-block">Export All</button> - Page: <input type="text" size="5" id="exportPageStart">to<input type="text" size="5" id="exportPageEnd"> - <button onclick="exportPage(<?php echo $default_topic_id;?>)" class="btn btn-default btn-sm">Export</button></br> - </div> - </fieldset> <fieldset class="tool-frame"> <legend><h5 class="tool-topic" data-toggle="collapse" data-target="#tool_replace_by"> Replace By <i><b>Regex</b></i>: <span class="caret"></span></h5></legend>