Lines 156-162
Link Here
|
156 |
} |
156 |
} |
157 |
}, |
157 |
}, |
158 |
{"data": "branch.name"}, |
158 |
{"data": "branch.name"}, |
159 |
{"data": "hold_date"}, |
159 |
{ |
|
|
160 |
"data": "hold_date", |
161 |
"render": function(data, type, row, meta) { |
162 |
return (data&&$date(data))||''; |
163 |
} |
164 |
}, |
160 |
{ |
165 |
{ |
161 |
"data": "expiration_date", |
166 |
"data": "expiration_date", |
162 |
"render": function(data, type, row, meta) { |
167 |
"render": function(data, type, row, meta) { |
Lines 191-203
Link Here
|
191 |
|
196 |
|
192 |
table.on('draw.dt', function(event, settings) { |
197 |
table.on('draw.dt', function(event, settings) { |
193 |
var page_info = table.page.info(); |
198 |
var page_info = table.page.info(); |
194 |
$(".controls .info").html(_("Showing page %s of %s").format(page_info.page+1, page_info.pages)); |
199 |
$(".controls .info").html(page_info.pages?_("Showing page %s of %s").format(page_info.page+1, page_info.pages):''); |
195 |
if(!page_info.page) { |
200 |
if(!page_info.page||!page_info.pages) { |
196 |
$('.controls .previous').addClass('disabled'); |
201 |
$('.controls .previous').addClass('disabled'); |
197 |
} else { |
202 |
} else { |
198 |
$('.controls .previous').removeClass('disabled'); |
203 |
$('.controls .previous').removeClass('disabled'); |
199 |
} |
204 |
} |
200 |
if(page_info.pages-1===page_info.page) { |
205 |
if(page_info.pages-1===page_info.page||!page_info.pages) { |
201 |
$('.controls .next').addClass('disabled'); |
206 |
$('.controls .next').addClass('disabled'); |
202 |
} else { |
207 |
} else { |
203 |
$('.controls .next').removeClass('disabled'); |
208 |
$('.controls .next').removeClass('disabled'); |
Lines 226-232
Link Here
|
226 |
}; |
231 |
}; |
227 |
}; |
232 |
}; |
228 |
|
233 |
|
229 |
$(".controls .search").keypress(debounce(function(event) { |
234 |
$(".controls .search").keyup(debounce(function(event) { |
230 |
table.search(this.value).draw(); |
235 |
table.search(this.value).draw(); |
231 |
}, 300)); |
236 |
}, 300)); |
232 |
}); |
237 |
}); |
233 |
- |
|
|