Lines 7-524
Link Here
|
7 |
[% INCLUDE 'doc-head-open.inc' %] |
7 |
[% INCLUDE 'doc-head-open.inc' %] |
8 |
<title>Koha › ILL requests</title> |
8 |
<title>Koha › ILL requests</title> |
9 |
[% INCLUDE 'doc-head-close.inc' %] |
9 |
[% INCLUDE 'doc-head-close.inc' %] |
10 |
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] |
|
|
11 |
[% Asset.css("css/datatables.css") | $raw %] |
10 |
[% Asset.css("css/datatables.css") | $raw %] |
12 |
[% INCLUDE 'datatables.inc' %] |
|
|
13 |
[% INCLUDE 'calendar.inc' %] |
14 |
<script type="text/javascript"> |
15 |
//<![CDATA[ |
16 |
$(document).ready(function() { |
17 |
|
18 |
// Illview Datatable setup |
19 |
|
20 |
var table; |
21 |
|
22 |
// Filters that are active |
23 |
var activeFilters = {}; |
24 |
|
25 |
// Fields we don't want to display |
26 |
var ignore = [ |
27 |
'accessurl', |
28 |
'backend', |
29 |
'branchcode', |
30 |
'completed', |
31 |
'capabilities', |
32 |
'cost', |
33 |
'medium', |
34 |
'notesopac', |
35 |
'notesstaff', |
36 |
'replied' |
37 |
]; |
38 |
|
39 |
// Fields we need to expand (flatten) |
40 |
var expand = [ |
41 |
'metadata', |
42 |
'patron' |
43 |
]; |
44 |
|
45 |
// Expanded fields |
46 |
// This is auto populated |
47 |
var expanded = {}; |
48 |
|
49 |
// The core fields that should be displayed first |
50 |
var core = [ |
51 |
'metadata_author', |
52 |
'metadata_title', |
53 |
'borrowername', |
54 |
'patron_cardnumber', |
55 |
'biblio_id', |
56 |
'library', |
57 |
'status', |
58 |
'placed', |
59 |
'placed_formatted', |
60 |
'updated', |
61 |
'updated_formatted', |
62 |
'illrequest_id', |
63 |
'comments', |
64 |
'action' // Action should always be last |
65 |
]; |
66 |
|
67 |
// Filterable columns |
68 |
var filterable = { |
69 |
status: { |
70 |
prep: function(tableData, oData) { |
71 |
var uniques = {}; |
72 |
tableData.forEach(function(row) { |
73 |
var resolvedName = getStatusName( |
74 |
oData[0].capabilities[row.status].name |
75 |
); |
76 |
uniques[resolvedName] = 1 |
77 |
}); |
78 |
Object.keys(uniques).sort().forEach(function(unique) { |
79 |
$('#illfilter_status').append( |
80 |
'<option value="' + unique + |
81 |
'">' + unique + '</option>' |
82 |
); |
83 |
}); |
84 |
}, |
85 |
listener: function() { |
86 |
var me = 'status'; |
87 |
$('#illfilter_status').change(function() { |
88 |
var sel = $('#illfilter_status option:selected').val(); |
89 |
if (sel && sel.length > 0) { |
90 |
activeFilters[me] = function() { |
91 |
table.column(6).search(sel); |
92 |
} |
93 |
} else { |
94 |
if (activeFilters.hasOwnProperty(me)) { |
95 |
delete activeFilters[me]; |
96 |
} |
97 |
} |
98 |
}); |
99 |
}, |
100 |
clear: function() { |
101 |
$('#illfilter_status').val(''); |
102 |
} |
103 |
}, |
104 |
pickupBranch: { |
105 |
prep: function(tableData, oData) { |
106 |
var uniques = {}; |
107 |
tableData.forEach(function(row) { |
108 |
uniques[row.library.branchname] = 1 |
109 |
}); |
110 |
Object.keys(uniques).sort().forEach(function(unique) { |
111 |
$('#illfilter_branchname').append( |
112 |
'<option value="' + unique + |
113 |
'">' + unique + '</option>' |
114 |
); |
115 |
}); |
116 |
}, |
117 |
listener: function() { |
118 |
var me = 'pickupBranch'; |
119 |
$('#illfilter_branchname').change(function() { |
120 |
var sel = $('#illfilter_branchname option:selected').val(); |
121 |
if (sel && sel.length > 0) { |
122 |
activeFilters[me] = function() { |
123 |
table.column(5).search(sel); |
124 |
} |
125 |
} else { |
126 |
if (activeFilters.hasOwnProperty(me)) { |
127 |
delete activeFilters[me]; |
128 |
} |
129 |
} |
130 |
}); |
131 |
}, |
132 |
clear: function() { |
133 |
$('#illfilter_branchname').val(''); |
134 |
} |
135 |
}, |
136 |
barcode: { |
137 |
listener: function() { |
138 |
var me = 'barcode'; |
139 |
$('#illfilter_barcode').change(function() { |
140 |
var val = $('#illfilter_barcode').val(); |
141 |
if (val && val.length > 0) { |
142 |
activeFilters[me] = function() { |
143 |
table.column(3).search(val); |
144 |
} |
145 |
} else { |
146 |
if (activeFilters.hasOwnProperty(me)) { |
147 |
delete activeFilters[me]; |
148 |
} |
149 |
} |
150 |
}); |
151 |
}, |
152 |
clear: function() { |
153 |
$('#illfilter_barcode').val(''); |
154 |
} |
155 |
}, |
156 |
dateModified: { |
157 |
clear: function() { |
158 |
$('#illfilter_datemodified_start, #illfilter_datemodified_end').val(''); |
159 |
} |
160 |
}, |
161 |
datePlaced: { |
162 |
clear: function() { |
163 |
$('#illfilter_dateplaced_start, #illfilter_dateplaced_end').val(''); |
164 |
} |
165 |
} |
166 |
}; |
167 |
|
168 |
// Remove any fields we're ignoring |
169 |
var removeIgnore = function(dataObj) { |
170 |
dataObj.forEach(function(thisRow) { |
171 |
ignore.forEach(function(thisIgnore) { |
172 |
if (thisRow.hasOwnProperty(thisIgnore)) { |
173 |
delete thisRow[thisIgnore]; |
174 |
} |
175 |
}); |
176 |
}); |
177 |
}; |
178 |
|
179 |
// Expand any fields we're expanding |
180 |
var expandExpand = function(row) { |
181 |
expand.forEach(function(thisExpand) { |
182 |
if (row.hasOwnProperty(thisExpand)) { |
183 |
if (!expanded.hasOwnProperty(thisExpand)) { |
184 |
expanded[thisExpand] = []; |
185 |
} |
186 |
var expandObj = row[thisExpand]; |
187 |
Object.keys(expandObj).forEach( |
188 |
function(thisExpandCol) { |
189 |
var expColName = thisExpand + '_' + thisExpandCol; |
190 |
// Keep a list of fields that have been expanded |
191 |
// so we can create toggle links for them |
192 |
if (expanded[thisExpand].indexOf(expColName) == -1) { |
193 |
expanded[thisExpand].push(expColName); |
194 |
} |
195 |
expandObj[expColName] = |
196 |
expandObj[thisExpandCol]; |
197 |
delete expandObj[thisExpandCol]; |
198 |
} |
199 |
); |
200 |
$.extend(true, row, expandObj); |
201 |
delete row[thisExpand]; |
202 |
} |
203 |
}); |
204 |
}; |
205 |
|
206 |
// Build a de-duped list of all column names |
207 |
var allCols = {}; |
208 |
core.map(function(thisCore) { |
209 |
allCols[thisCore] = 1; |
210 |
}); |
211 |
|
212 |
// Strip the expand prefix if it exists, we do this for display |
213 |
var stripPrefix = function(value) { |
214 |
expand.forEach(function(thisExpand) { |
215 |
var regex = new RegExp(thisExpand + '_', 'g'); |
216 |
value = value.replace(regex, ''); |
217 |
}); |
218 |
return value; |
219 |
}; |
220 |
|
221 |
// Our 'render' function for borrowerlink |
222 |
var createPatronLink = function(data, type, row) { |
223 |
var patronLink = '<a title="' + _("View borrower details") + '" ' + |
224 |
'href="/cgi-bin/koha/members/moremember.pl?' + |
225 |
'borrowernumber='+row.borrowernumber+'">'; |
226 |
if ( row.patron_firstname ) { |
227 |
patronLink = patronLink + row.patron_firstname + ' '; |
228 |
} |
229 |
patronLink = patronLink + row.patron_surname + '</a>'; |
230 |
return patronLink |
231 |
}; |
232 |
|
233 |
// Our 'render' function for biblio_id |
234 |
var createBiblioLink = function(data, type, row) { |
235 |
return (row.biblio_id) ? |
236 |
'<a title="' + _("View biblio details") + '" ' + |
237 |
'href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + |
238 |
row.biblio_id + '">' + |
239 |
row.biblio_id + |
240 |
'</a>' : ''; |
241 |
}; |
242 |
|
243 |
// Our 'render' function for the library name |
244 |
var createLibrary = function(data, type, row) { |
245 |
return row.library.branchname; |
246 |
}; |
247 |
|
248 |
// Render function for request ID |
249 |
var createRequestId = function(data, type, row) { |
250 |
return row.id_prefix + row.illrequest_id; |
251 |
}; |
252 |
|
253 |
// Render function for request status |
254 |
var createStatus = function(data, type, row, meta) { |
255 |
var origData = meta.settings.oInit.originalData; |
256 |
if (origData.length > 0) { |
257 |
var status_name = meta.settings.oInit.originalData[0].capabilities[ |
258 |
row.status |
259 |
].name; |
260 |
return getStatusName(status_name); |
261 |
} else { |
262 |
return ''; |
263 |
} |
264 |
}; |
265 |
|
266 |
var getStatusName = function(origName) { |
267 |
switch( origName ) { |
268 |
case "New request": |
269 |
return _("New request"); |
270 |
case "Requested": |
271 |
return _("Requested"); |
272 |
case "Requested from partners": |
273 |
return _("Requested from partners"); |
274 |
case "Request reverted": |
275 |
return _("Request reverted"); |
276 |
case "Queued request": |
277 |
return _("Queued request"); |
278 |
case "Cancellation requested": |
279 |
return _("Cancellation requested"); |
280 |
case "Completed": |
281 |
return _("Completed"); |
282 |
case "Delete request": |
283 |
return _("Delete request"); |
284 |
default: |
285 |
return origName; |
286 |
} |
287 |
}; |
288 |
|
289 |
// Render function for creating a row's action link |
290 |
var createActionLink = function(data, type, row) { |
291 |
return '<a class="btn btn-default btn-sm" ' + |
292 |
'href="/cgi-bin/koha/ill/ill-requests.pl?' + |
293 |
'method=illview&illrequest_id=' + |
294 |
row.illrequest_id + |
295 |
'">' + _("Manage request") + '</a>'; |
296 |
}; |
297 |
|
298 |
// Columns that require special treatment |
299 |
var specialCols = { |
300 |
action: { |
301 |
name: '', |
302 |
func: createActionLink |
303 |
}, |
304 |
borrowername: { |
305 |
name: _("Patron"), |
306 |
func: createPatronLink |
307 |
}, |
308 |
illrequest_id: { |
309 |
name: _("Request number"), |
310 |
func: createRequestId |
311 |
}, |
312 |
status: { |
313 |
name: _("Status"), |
314 |
func: createStatus |
315 |
}, |
316 |
biblio_id: { |
317 |
name: _("Bibliographic record ID"), |
318 |
func: createBiblioLink |
319 |
}, |
320 |
library: { |
321 |
name: _("Library"), |
322 |
func: createLibrary |
323 |
}, |
324 |
updated: { |
325 |
name: _("Updated on"), |
326 |
}, |
327 |
patron_cardnumber: { |
328 |
name: _("Patron barcode") |
329 |
} |
330 |
}; |
331 |
|
332 |
// Toggle request attributes in Illview |
333 |
$('#toggle_requestattributes').on('click', function(e) { |
334 |
e.preventDefault(); |
335 |
$('#requestattributes').toggleClass('content_hidden'); |
336 |
}); |
337 |
|
338 |
// Toggle new comment form in Illview |
339 |
$('#toggle_addcomment').on('click', function(e) { |
340 |
e.preventDefault(); |
341 |
$('#addcomment').toggleClass('content_hidden'); |
342 |
}); |
343 |
|
344 |
// Filter partner list |
345 |
$('#partner_filter').keyup(function() { |
346 |
var needle = $('#partner_filter').val(); |
347 |
$('#partners > option').each(function() { |
348 |
var regex = new RegExp(needle, 'i'); |
349 |
if ( |
350 |
needle.length == 0 || |
351 |
$(this).is(':selected') || |
352 |
$(this).text().match(regex) |
353 |
) { |
354 |
$(this).show(); |
355 |
} else { |
356 |
$(this).hide(); |
357 |
} |
358 |
}); |
359 |
}); |
360 |
|
361 |
// Display the modal containing request supplier metadata |
362 |
$('#ill-request-display-metadata').on('click', function(e) { |
363 |
e.preventDefault(); |
364 |
$('#dataPreview').modal({show:true}); |
365 |
}); |
366 |
|
367 |
// Get our data from the API and process it prior to passing |
368 |
// it to datatables |
369 |
var ajax = $.ajax( |
370 |
'/api/v1/illrequests?embed=metadata,patron,capabilities,library,comments' |
371 |
).done(function() { |
372 |
var data = JSON.parse(ajax.responseText); |
373 |
// Make a copy, we'll be removing columns next and need |
374 |
// to be able to refer to data that has been removed |
375 |
var dataCopy = $.extend(true, [], data); |
376 |
// Remove all columns we're not interested in |
377 |
removeIgnore(dataCopy); |
378 |
// Expand columns that need it and create an array |
379 |
// of all column names |
380 |
$.each(dataCopy, function(k, row) { |
381 |
expandExpand(row); |
382 |
}); |
383 |
|
384 |
// Assemble an array of column definitions for passing |
385 |
// to datatables |
386 |
var colData = []; |
387 |
Object.keys(allCols).forEach(function(thisCol) { |
388 |
// Create the base column object |
389 |
var colObj = { |
390 |
name: thisCol, |
391 |
className: thisCol, |
392 |
defaultContent: '' |
393 |
}; |
394 |
// We may need to process the data going in this |
395 |
// column, so do it if necessary |
396 |
if ( |
397 |
specialCols.hasOwnProperty(thisCol) && |
398 |
specialCols[thisCol].hasOwnProperty('func') |
399 |
) { |
400 |
colObj.render = specialCols[thisCol].func; |
401 |
} else { |
402 |
colObj.data = thisCol; |
403 |
} |
404 |
colData.push(colObj); |
405 |
}); |
406 |
|
407 |
// Initialise the datatable |
408 |
table = $('#ill-requests').DataTable($.extend(true, {}, dataTablesDefaults, { |
409 |
'aoColumnDefs': [ |
410 |
{ // Last column shouldn't be sortable or searchable |
411 |
'aTargets': [ 'actions' ], |
412 |
'bSortable': false, |
413 |
'bSearchable': false |
414 |
}, |
415 |
{ // Hide the two date columns we use just for sorting |
416 |
'aTargets': [ 'placed', 'updated' ], |
417 |
'bVisible': false, |
418 |
'bSearchable': true |
419 |
}, |
420 |
{ // When sorting 'placed', we want to use the |
421 |
// unformatted column |
422 |
'aTargets': [ 'placed_formatted'], |
423 |
'iDataSort': 7 |
424 |
}, |
425 |
{ // When sorting 'updated', we want to use the |
426 |
// unformatted column |
427 |
'aTargets': [ 'updated_formatted'], |
428 |
'iDataSort': 9 |
429 |
} |
430 |
], |
431 |
'aaSorting': [[ 9, 'desc' ]], // Default sort, updated descending |
432 |
'processing': true, // Display a message when manipulating |
433 |
'iDisplayLength': 10, // 10 results per page |
434 |
'sPaginationType': "full_numbers", // Pagination display |
435 |
'deferRender': true, // Improve performance on big datasets |
436 |
'data': dataCopy, |
437 |
'columns': colData, |
438 |
'originalData': data, // Enable render functions to access |
439 |
// our original data |
440 |
'initComplete': function() { |
441 |
|
442 |
// Prepare any filter elements that need it |
443 |
for (var el in filterable) { |
444 |
if (filterable.hasOwnProperty(el)) { |
445 |
if (filterable[el].hasOwnProperty('prep')) { |
446 |
filterable[el].prep(dataCopy, data); |
447 |
} |
448 |
if (filterable[el].hasOwnProperty('listener')) { |
449 |
filterable[el].listener(); |
450 |
} |
451 |
} |
452 |
} |
453 |
|
454 |
} |
455 |
})); |
456 |
|
457 |
// Custom date range filtering |
458 |
$.fn.dataTable.ext.search.push(function(settings, data, dataIndex) { |
459 |
var placedStart = $('#illfilter_dateplaced_start').datepicker('getDate'); |
460 |
var placedEnd = $('#illfilter_dateplaced_end').datepicker('getDate'); |
461 |
var modifiedStart = $('#illfilter_datemodified_start').datepicker('getDate'); |
462 |
var modifiedEnd = $('#illfilter_datemodified_end').datepicker('getDate'); |
463 |
var rowPlaced = data[7] ? new Date(data[7]) : null; |
464 |
var rowModified = data[9] ? new Date(data[9]) : null; |
465 |
var placedPassed = true; |
466 |
var modifiedPassed = true; |
467 |
if (placedStart && rowPlaced && rowPlaced < placedStart) { |
468 |
placedPassed = false |
469 |
}; |
470 |
if (placedEnd && rowPlaced && rowPlaced > placedEnd) { |
471 |
placedPassed = false; |
472 |
} |
473 |
if (modifiedStart && rowModified && rowModified < modifiedStart) { |
474 |
modifiedPassed = false |
475 |
}; |
476 |
if (modifiedEnd && rowModified && rowModified > modifiedEnd) { |
477 |
modifiedPassed = false; |
478 |
} |
479 |
|
480 |
return placedPassed && modifiedPassed; |
481 |
|
482 |
}); |
483 |
|
484 |
} |
485 |
); |
486 |
|
487 |
var clearSearch = function() { |
488 |
table.search('').columns().search(''); |
489 |
activeFilters = {}; |
490 |
for (var filter in filterable) { |
491 |
if ( |
492 |
filterable.hasOwnProperty(filter) && |
493 |
filterable[filter].hasOwnProperty('clear') |
494 |
) { |
495 |
filterable[filter].clear(); |
496 |
} |
497 |
} |
498 |
table.draw(); |
499 |
}; |
500 |
|
501 |
// Apply any search filters, or clear any previous |
502 |
// ones |
503 |
$('#illfilter_form').submit(function(event) { |
504 |
event.preventDefault(); |
505 |
table.search('').columns().search(''); |
506 |
for (var active in activeFilters) { |
507 |
if (activeFilters.hasOwnProperty(active)) { |
508 |
activeFilters[active](); |
509 |
} |
510 |
} |
511 |
table.draw(); |
512 |
}); |
513 |
|
514 |
// Clear all filters |
515 |
$('#clear_search').click(function() { |
516 |
clearSearch(); |
517 |
}); |
518 |
|
519 |
}); |
520 |
//]]> |
521 |
</script> |
522 |
</head> |
11 |
</head> |
523 |
|
12 |
|
524 |
<body id="illrequests" class="ill"> |
13 |
<body id="illrequests" class="ill"> |
Lines 979-984
Link Here
|
979 |
<th class="updated_formatted">Updated on</th> |
468 |
<th class="updated_formatted">Updated on</th> |
980 |
<th>Request number</th> |
469 |
<th>Request number</th> |
981 |
<th>Comments</th> |
470 |
<th>Comments</th> |
|
|
471 |
<th class="patron_cardnumber">Patron barcode</th> |
982 |
<th class="actions"></th> |
472 |
<th class="actions"></th> |
983 |
</tr> |
473 |
</tr> |
984 |
</thead> |
474 |
</thead> |
Lines 1004-1009
Link Here
|
1004 |
[% MACRO jsinclude BLOCK %] |
494 |
[% MACRO jsinclude BLOCK %] |
1005 |
[% INCLUDE 'datatables.inc' %] |
495 |
[% INCLUDE 'datatables.inc' %] |
1006 |
[% INCLUDE 'calendar.inc' %] |
496 |
[% INCLUDE 'calendar.inc' %] |
|
|
497 |
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] |
1007 |
<script> |
498 |
<script> |
1008 |
$(document).ready(function() { |
499 |
$(document).ready(function() { |
1009 |
|
500 |
|
Lines 1040-1049
Link Here
|
1040 |
|
531 |
|
1041 |
// The core fields that should be displayed first |
532 |
// The core fields that should be displayed first |
1042 |
var core = [ |
533 |
var core = [ |
1043 |
'metadata_Author', |
534 |
'metadata_author', |
1044 |
'metadata_Title', |
535 |
'metadata_title', |
1045 |
'borrowername', |
536 |
'borrowername', |
1046 |
'patron_cardnumber', |
|
|
1047 |
'biblio_id', |
537 |
'biblio_id', |
1048 |
'library', |
538 |
'library', |
1049 |
'status', |
539 |
'status', |
Lines 1052-1057
Link Here
|
1052 |
'updated', |
542 |
'updated', |
1053 |
'updated_formatted', |
543 |
'updated_formatted', |
1054 |
'illrequest_id', |
544 |
'illrequest_id', |
|
|
545 |
'comments', |
546 |
'patron_cardnumber', |
1055 |
'action' |
547 |
'action' |
1056 |
]; |
548 |
]; |
1057 |
|
549 |
|
Lines 1079-1085
Link Here
|
1079 |
var sel = $('#illfilter_status option:selected').val(); |
571 |
var sel = $('#illfilter_status option:selected').val(); |
1080 |
if (sel && sel.length > 0) { |
572 |
if (sel && sel.length > 0) { |
1081 |
activeFilters[me] = function() { |
573 |
activeFilters[me] = function() { |
1082 |
table.column(6).search(sel); |
574 |
table.column(5).search(sel); |
1083 |
} |
575 |
} |
1084 |
} else { |
576 |
} else { |
1085 |
if (activeFilters.hasOwnProperty(me)) { |
577 |
if (activeFilters.hasOwnProperty(me)) { |
Lines 1111-1117
Link Here
|
1111 |
var sel = $('#illfilter_branchname option:selected').val(); |
603 |
var sel = $('#illfilter_branchname option:selected').val(); |
1112 |
if (sel && sel.length > 0) { |
604 |
if (sel && sel.length > 0) { |
1113 |
activeFilters[me] = function() { |
605 |
activeFilters[me] = function() { |
1114 |
table.column(5).search(sel); |
606 |
table.column(4).search(sel); |
1115 |
} |
607 |
} |
1116 |
} else { |
608 |
} else { |
1117 |
if (activeFilters.hasOwnProperty(me)) { |
609 |
if (activeFilters.hasOwnProperty(me)) { |
Lines 1131-1137
Link Here
|
1131 |
var val = $('#illfilter_barcode').val(); |
623 |
var val = $('#illfilter_barcode').val(); |
1132 |
if (val && val.length > 0) { |
624 |
if (val && val.length > 0) { |
1133 |
activeFilters[me] = function() { |
625 |
activeFilters[me] = function() { |
1134 |
table.column(3).search(val); |
626 |
table.column(12).search(val); |
1135 |
} |
627 |
} |
1136 |
} else { |
628 |
} else { |
1137 |
if (activeFilters.hasOwnProperty(me)) { |
629 |
if (activeFilters.hasOwnProperty(me)) { |
Lines 1312-1317
Link Here
|
1312 |
$('#requestattributes').toggleClass('content_hidden'); |
804 |
$('#requestattributes').toggleClass('content_hidden'); |
1313 |
}); |
805 |
}); |
1314 |
|
806 |
|
|
|
807 |
// Toggle new comment form in Illview |
808 |
$('#toggle_addcomment').on('click', function(e) { |
809 |
e.preventDefault(); |
810 |
$('#addcomment').toggleClass('content_hidden'); |
811 |
}); |
812 |
|
1315 |
// Filter partner list |
813 |
// Filter partner list |
1316 |
$('#partner_filter').keyup(function() { |
814 |
$('#partner_filter').keyup(function() { |
1317 |
var needle = $('#partner_filter').val(); |
815 |
var needle = $('#partner_filter').val(); |
Lines 1397-1402
Link Here
|
1397 |
// unformatted column |
895 |
// unformatted column |
1398 |
'aTargets': [ 'updated_formatted'], |
896 |
'aTargets': [ 'updated_formatted'], |
1399 |
'iDataSort': 9 |
897 |
'iDataSort': 9 |
|
|
898 |
}, |
899 |
{ |
900 |
'aTargets': [ 'patron_cardnumber' ], |
901 |
'bVisible': false, |
902 |
'bSearchable': true |
1400 |
} |
903 |
} |
1401 |
], |
904 |
], |
1402 |
'aaSorting': [[ 9, 'desc' ]], // Default sort, updated descending |
905 |
'aaSorting': [[ 9, 'desc' ]], // Default sort, updated descending |
Lines 1430-1437
Link Here
|
1430 |
var placedEnd = $('#illfilter_dateplaced_end').datepicker('getDate'); |
933 |
var placedEnd = $('#illfilter_dateplaced_end').datepicker('getDate'); |
1431 |
var modifiedStart = $('#illfilter_datemodified_start').datepicker('getDate'); |
934 |
var modifiedStart = $('#illfilter_datemodified_start').datepicker('getDate'); |
1432 |
var modifiedEnd = $('#illfilter_datemodified_end').datepicker('getDate'); |
935 |
var modifiedEnd = $('#illfilter_datemodified_end').datepicker('getDate'); |
1433 |
var rowPlaced = data[7] ? new Date(data[7]) : null; |
936 |
var rowPlaced = data[6] ? new Date(data[6]) : null; |
1434 |
var rowModified = data[9] ? new Date(data[9]) : null; |
937 |
var rowModified = data[8] ? new Date(data[8]) : null; |
1435 |
var placedPassed = true; |
938 |
var placedPassed = true; |
1436 |
var modifiedPassed = true; |
939 |
var modifiedPassed = true; |
1437 |
if (placedStart && rowPlaced && rowPlaced < placedStart) { |
940 |
if (placedStart && rowPlaced && rowPlaced < placedStart) { |
1438 |
- |
|
|