| Line 219... |
Line 219... |
| 219 |
});
|
219 |
});
|
| 220 |
|
220 |
|
| 221 |
$("#grn-history-paginated .previous").live('click', function() {
|
221 |
$("#grn-history-paginated .previous").live('click', function() {
|
| 222 |
var start = $( "#grn-history-paginated .start" ).text();
|
222 |
var start = $( "#grn-history-paginated .start" ).text();
|
| 223 |
var end = $( "#grn-history-paginated .end" ).text();
|
223 |
var end = $( "#grn-history-paginated .end" ).text();
|
| - |
|
224 |
var size = $("#grn-history-paginated .size").text();
|
| - |
|
225 |
if(parseInt(end) == parseInt(size)){
|
| - |
|
226 |
var mod = parseInt(end) % 10;
|
| - |
|
227 |
end = parseInt(end) + (10 - mod);
|
| - |
|
228 |
}
|
| 224 |
var pre = end - 20;
|
229 |
var pre = end - 20;
|
| 225 |
getGrnHistoryPreviousItems(start,end,pre,grnhistory.searchText,grnhistory.searchType,grnhistory.startTime,grnhistory.endTime);
|
230 |
getGrnHistoryPreviousItems(start,end,pre,grnhistory.searchText,grnhistory.searchType,grnhistory.startTime,grnhistory.endTime);
|
| 226 |
$("#grn-history-paginated .previous").blur();
|
231 |
$("#grn-history-paginated .previous").blur();
|
| 227 |
});
|
232 |
});
|
| 228 |
|
233 |
|
| Line 311... |
Line 316... |
| 311 |
console.log(+end + +10);
|
316 |
console.log(+end + +10);
|
| 312 |
console.log(+start + +10);
|
317 |
console.log(+start + +10);
|
| 313 |
doAjaxRequestHandler(context+"/getPaginatedGrnHistory/?purchaseReference="+purchase_reference+"&searchType="+searchType
|
318 |
doAjaxRequestHandler(context+"/getPaginatedGrnHistory/?purchaseReference="+purchase_reference+"&searchType="+searchType
|
| 314 |
+"&startTime="+startTime
|
319 |
+"&startTime="+startTime
|
| 315 |
+"&endTime="+endTime+"&offset="+end, "GET", function(response){
|
320 |
+"&endTime="+endTime+"&offset="+end, "GET", function(response){
|
| - |
|
321 |
var size = $("#grn-history-paginated .size").text();
|
| - |
|
322 |
if((parseInt(end) + 10) > parseInt(size)){
|
| - |
|
323 |
console.log("(end + 10) > size == true");
|
| - |
|
324 |
$( "#grn-history-paginated .end" ).text(size);
|
| - |
|
325 |
}else{
|
| - |
|
326 |
console.log("(end + 10) > size == false");
|
| 316 |
$( "#grn-history-paginated .end" ).text(+end + +10);
|
327 |
$( "#grn-history-paginated .end" ).text(+end + +10);
|
| - |
|
328 |
}
|
| 317 |
$( "#grn-history-paginated .start" ).text(+start + +10);
|
329 |
$( "#grn-history-paginated .start" ).text(+start + +10);
|
| 318 |
var last = $( "#grn-history-paginated .end" ).text();
|
330 |
var last = $( "#grn-history-paginated .end" ).text();
|
| 319 |
var temp = $( "#grn-history-paginated .size" ).text();
|
331 |
var temp = $( "#grn-history-paginated .size" ).text();
|
| 320 |
if (parseInt(last) >= parseInt(temp)){
|
332 |
if (parseInt(last) >= parseInt(temp)){
|
| 321 |
$("#grn-history-paginated .next").prop('disabled', true);
|
333 |
$("#grn-history-paginated .next").prop('disabled', true);
|