| Line 75... |
Line 75... |
| 75 |
var end = $( "#good-inventory-paginated .end" ).text();
|
75 |
var end = $( "#good-inventory-paginated .end" ).text();
|
| 76 |
var searchText = $("#good-inventory-search-text").val();
|
76 |
var searchText = $("#good-inventory-search-text").val();
|
| 77 |
if (typeof (searchText) == "undefined" || !searchText){
|
77 |
if (typeof (searchText) == "undefined" || !searchText){
|
| 78 |
searchText = "";
|
78 |
searchText = "";
|
| 79 |
}
|
79 |
}
|
| - |
|
80 |
var size = $("#good-inventory-paginated .size").text();
|
| - |
|
81 |
if(parseInt(end) == parseInt(size)){
|
| - |
|
82 |
var mod = parseInt(end) % 10;
|
| - |
|
83 |
end = parseInt(end) + (10 - mod);
|
| - |
|
84 |
}
|
| 80 |
var pre = end - 20;
|
85 |
var pre = end - 20;
|
| 81 |
getPreviousItems(start, end, pre, searchText);
|
86 |
getPreviousItems(start, end, pre, searchText);
|
| 82 |
$("#good-inventory-paginated .previous").blur();
|
87 |
$("#good-inventory-paginated .previous").blur();
|
| 83 |
});
|
88 |
});
|
| 84 |
|
89 |
|
| Line 114... |
Line 119... |
| 114 |
var end = $( "#catalog-paginated .end" ).text();
|
119 |
var end = $( "#catalog-paginated .end" ).text();
|
| 115 |
var searchText = $("#catalog-search-text").val();
|
120 |
var searchText = $("#catalog-search-text").val();
|
| 116 |
if (typeof (searchText) == "undefined" || !searchText){
|
121 |
if (typeof (searchText) == "undefined" || !searchText){
|
| 117 |
searchText = "";
|
122 |
searchText = "";
|
| 118 |
}
|
123 |
}
|
| - |
|
124 |
var size = $("#catalog-paginated .size").text();
|
| - |
|
125 |
if(parseInt(end) == parseInt(size)){
|
| - |
|
126 |
var mod = parseInt(end) % 10;
|
| - |
|
127 |
end = parseInt(end) + (10 - mod);
|
| - |
|
128 |
}
|
| 119 |
var pre = end - 20;
|
129 |
var pre = end - 20;
|
| 120 |
getPreviousCatalogItems(start,end,pre,searchText);
|
130 |
getPreviousCatalogItems(start,end,pre,searchText);
|
| 121 |
$("#catalog-paginated .previous").blur();
|
131 |
$("#catalog-paginated .previous").blur();
|
| 122 |
});
|
132 |
});
|
| 123 |
|
133 |
|
| Line 197... |
Line 207... |
| 197 |
console.log(start);
|
207 |
console.log(start);
|
| 198 |
console.log(end);
|
208 |
console.log(end);
|
| 199 |
console.log(+end + +10);
|
209 |
console.log(+end + +10);
|
| 200 |
console.log(+start + +10);
|
210 |
console.log(+start + +10);
|
| 201 |
doAjaxRequestHandler(context+"/getPaginatedCurrentInventorySnapshot/?offset="+end+"&searchTerm="+searchText, "GET", function(response){
|
211 |
doAjaxRequestHandler(context+"/getPaginatedCurrentInventorySnapshot/?offset="+end+"&searchTerm="+searchText, "GET", function(response){
|
| - |
|
212 |
var size = $("#good-inventory-paginated .size").text();
|
| - |
|
213 |
if((parseInt(end) + 10) > parseInt(size)){
|
| - |
|
214 |
console.log("(end + 10) > size == true");
|
| - |
|
215 |
$( "#good-inventory-paginated .end" ).text(size);
|
| - |
|
216 |
}else{
|
| - |
|
217 |
console.log("(end + 10) > size == false");
|
| 202 |
$( "#good-inventory-paginated .end" ).text(+end + +10);
|
218 |
$( "#good-inventory-paginated .end" ).text(+end + +10);
|
| - |
|
219 |
}
|
| 203 |
$( "#good-inventory-paginated .start" ).text(+start + +10);
|
220 |
$( "#good-inventory-paginated .start" ).text(+start + +10);
|
| 204 |
var last = $( "#good-inventory-paginated .end" ).text();
|
221 |
var last = $( "#good-inventory-paginated .end" ).text();
|
| 205 |
var temp = $( "#good-inventory-paginated .size" ).text();
|
222 |
var temp = $( "#good-inventory-paginated .size" ).text();
|
| 206 |
if (parseInt(last) >= parseInt(temp)){
|
223 |
if (parseInt(last) >= parseInt(temp)){
|
| 207 |
$("#good-inventory-paginated .next").prop('disabled', true);
|
224 |
$("#good-inventory-paginated .next").prop('disabled', true);
|
| Line 237... |
Line 254... |
| 237 |
console.log(start);
|
254 |
console.log(start);
|
| 238 |
console.log(end);
|
255 |
console.log(end);
|
| 239 |
console.log(+end + +10);
|
256 |
console.log(+end + +10);
|
| 240 |
console.log(+start + +10);
|
257 |
console.log(+start + +10);
|
| 241 |
doAjaxRequestHandler(context+"/getPaginatedCatalog/?offset="+end+"&searchTerm="+searchText, "GET", function(response){
|
258 |
doAjaxRequestHandler(context+"/getPaginatedCatalog/?offset="+end+"&searchTerm="+searchText, "GET", function(response){
|
| - |
|
259 |
var size = $("#catalog-paginated .size").text();
|
| - |
|
260 |
if((parseInt(end) + 10) > parseInt(size)){
|
| - |
|
261 |
console.log("(end + 10) > size == true");
|
| - |
|
262 |
$( "#catalog-paginated .end" ).text(size);
|
| - |
|
263 |
}else{
|
| - |
|
264 |
console.log("(end + 10) > size == false");
|
| 242 |
$( "#catalog-paginated .end" ).text(+end + +10);
|
265 |
$( "#catalog-paginated .end" ).text(+end + +10);
|
| - |
|
266 |
}
|
| 243 |
$( "#catalog-paginated .start" ).text(+start + +10);
|
267 |
$( "#catalog-paginated .start" ).text(+start + +10);
|
| 244 |
var last = $( "#catalog-paginated .end" ).text();
|
268 |
var last = $( "#catalog-paginated .end" ).text();
|
| 245 |
var temp = $( "#catalog-paginated .size" ).text();
|
269 |
var temp = $( "#catalog-paginated .size" ).text();
|
| 246 |
if (parseInt(last) >= parseInt(temp)){
|
270 |
if (parseInt(last) >= parseInt(temp)){
|
| 247 |
$("#catalog-paginated .next").prop('disabled', true);
|
271 |
$("#catalog-paginated .next").prop('disabled', true);
|