Skip to content

Commit

Permalink
Fixed Table_API_p.html current table page loss on row editing.
Browse files Browse the repository at this point in the history
Reset only to the first table page when the search query is modified
  • Loading branch information
luccioman committed Jun 28, 2018
1 parent e97580d commit 3885fd6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions htroot/Table_API_p.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
document.getElementById("current_pk").value = from;
document.getElementById("apilist").submit();
}

/**
* Reset the start record to display first results page
*/
function resetStartRecord() {
var startRecordField = document.getElementById("startRecordField");
if(startRecordField != null) {
startRecordField.value = "0";
}
}
</script>
<script type="text/javascript" src="js/sorttable.js"></script>
</head>
Expand Down Expand Up @@ -59,11 +69,11 @@ <h2>Process Scheduler</h2>
<img src="env/grafics/nave.gif" alt="" />
#(/navigation)#

<input type="hidden" name="startRecord" value="0" /> <!-- This form is used to type a new query, so we start at record zero -->
<input type="hidden" name="startRecord" value="#[startRecord]#" id="startRecordField"/>
<input type="hidden" name="maximumRecords" value="#[maximumRecords]#" />
<input type="hidden" name="inline" value="#(inline)#false::true#(/inline)#" />
<input type="hidden" name="filter" value="#[filter]#" />
<input type="text" name="query" value="#[query]#" style="font-size:16px;float:left;border:0px;height:20px;background-image:url('env/grafics/find.gif');background-repeat:no-repeat;background-position:right top;" />
<input type="text" name="query" value="#[query]#" onchange="resetStartRecord()" style="font-size:16px;float:left;border:0px;height:20px;background-image:url('env/grafics/find.gif');background-repeat:no-repeat;background-position:right top;"/>

</span>
<br/>
Expand Down

0 comments on commit 3885fd6

Please sign in to comment.