Commit 6d4dbc68 authored by Romain Loth's avatar Romain Loth

Ngrams table: save button also on top + save action also saves any current group modification

parent 2ea803e6
......@@ -597,11 +597,11 @@ function drawActiveGroup (tgtElementId, mainformId, linkIdsArray, ngInfos, newFr
groupHtml += '\n <p id="activeGroupButtons">';
// Ok - No
var cancelGroupButton = '<button onclick="removeActiveGroupFrameAndUpdate()">' ;
var cancelGroupButton = '<button class="btn btn-default" onclick="removeActiveGroupFrameAndUpdate()">' ;
cancelGroupButton += 'cancel' ;
cancelGroupButton += '</button>' ;
var tempoSaveGroupButton = '<button onclick="saveActiveGroup()">' ;
var tempoSaveGroupButton = '<button class="btn btn-warning" onclick="saveActiveGroup()">' ;
tempoSaveGroupButton += 'finish' ;
tempoSaveGroupButton += '</button>' ;
......@@ -1391,6 +1391,9 @@ $("#Clean_All").click(function(){
$("#Save_All").click(function(){
SaveLocalChanges()
});
$("#Save_All_Bottom").click(function(){
SaveLocalChanges()
});
// find all the consequences of changes from MAP => MAIN
......@@ -1476,6 +1479,12 @@ function InferCRUDFlags(id, oldState, desiredState, registry) {
// Save changes to all corpusA-lists
function SaveLocalChanges() {
// if there is an activeGroup modification, also finish it and save it
if (GState == 1) {
saveActiveGroup()
}
// console.clear()
// console.log("In SaveLocalChanges()")
......
......@@ -64,9 +64,12 @@
</button> -->
</center>
</h2>
<div class="pull-right" style="margin-top:1.7em;padding-left:2em;">
<!-- save button -->
<button id="Save_All" class="btn btn-primary">Save all changes permanently</button>
</div>
<!-- see in javascript function queries.functions['my_state_filter'] -->
<div class="pull-left" style="margin-top:1.85em;">
<div class="pull-left" style="margin-top:2.1em;">
Filter:
<select id="picklistmenu" name="my_state_filter">
<option value='reset'>All terms</option>
......@@ -85,9 +88,9 @@
<!-- (table id="my-ajax-table") dynamically set by Ngrams_dyna_chart_and_table -->
</div>
<!-- under the table -->
<!-- copy of save button under the table -->
<p align="right">
<button id="Save_All" class="btn btn-primary">Save changes permanently</button>
<button id="Save_All_Bottom" class="btn btn-primary">Save all changes permanently</button>
</p>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment