Lines 239-244
Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
Link Here
|
239 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %] |
239 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %] |
240 |
</select> |
240 |
</select> |
241 |
</li> |
241 |
</li> |
|
|
242 |
<li> |
243 |
<label> |
244 |
<input type="checkbox" name="show_expired" id="show_expired" /> Show expired |
245 |
</label> |
246 |
</li> |
242 |
</ol> |
247 |
</ol> |
243 |
</fieldset> |
248 |
</fieldset> |
244 |
</form> |
249 |
</form> |
Lines 291-296
Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
Link Here
|
291 |
} |
296 |
} |
292 |
} |
297 |
} |
293 |
|
298 |
|
|
|
299 |
/* Custom table search configuration: If a table row |
300 |
has an "expired" class, hide it UNLESS the |
301 |
show_expired checkbox is checked */ |
302 |
$.fn.dataTable.ext.search.push( |
303 |
function( settings, searchData, index, rowData, counter ) { |
304 |
var row = $(settings.aoData[index].nTr); |
305 |
if( row.hasClass("expired") && !$("#show_expired").prop("checked") ){ |
306 |
return false; |
307 |
} else { |
308 |
return true; |
309 |
} |
310 |
} |
311 |
); |
312 |
|
294 |
$(document).ready(function() { |
313 |
$(document).ready(function() { |
295 |
var newst = $("#newst").DataTable($.extend(true, {}, dataTablesDefaults, { |
314 |
var newst = $("#newst").DataTable($.extend(true, {}, dataTablesDefaults, { |
296 |
"order": [[ 4, "desc" ]], |
315 |
"order": [[ 4, "desc" ]], |
Lines 315-320
Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
Link Here
|
315 |
} |
334 |
} |
316 |
}); |
335 |
}); |
317 |
|
336 |
|
|
|
337 |
$("#show_expired").on("change", function(){ |
338 |
/* redraw the DataTable according to the custom search function */ |
339 |
newst.draw(); |
340 |
}); |
341 |
|
318 |
newst.on( 'search.dt', function () { |
342 |
newst.on( 'search.dt', function () { |
319 |
var term = newst.search(); |
343 |
var term = newst.search(); |
320 |
$("#news_keyword").val( term ); |
344 |
$("#news_keyword").val( term ); |
321 |
- |
|
|