Lines 188-238
$(document).ready(function() {
Link Here
|
188 |
// Initialise the table |
188 |
// Initialise the table |
189 |
// Since we're not able to use the columns settings in core, |
189 |
// Since we're not able to use the columns settings in core, |
190 |
// we need to mock the object that it would return |
190 |
// we need to mock the object that it would return |
191 |
var columns_settings = [ |
191 |
var table_settings = { |
192 |
{ |
192 |
"columns": [ |
193 |
cannot_be_modified: 0, |
193 |
{ |
194 |
cannot_be_toggled: 0, |
194 |
cannot_be_modified : 0, |
195 |
columnname: 'source', |
195 |
cannot_be_toggled : 0, |
196 |
is_hidden: 0 |
196 |
columnname : 'source', |
197 |
}, |
197 |
is_hidden : 0 |
198 |
{ |
198 |
}, |
199 |
cannot_be_modified: 0, |
199 |
{ |
200 |
cannot_be_toggled: 0, |
200 |
cannot_be_modified : 0, |
201 |
columnname: 'title', |
201 |
cannot_be_toggled : 0, |
202 |
is_hidden: 0 |
202 |
columnname : 'title', |
203 |
}, |
203 |
is_hidden : 0 |
204 |
{ |
204 |
}, |
205 |
cannot_be_modified: 0, |
205 |
{ |
206 |
cannot_be_toggled: 0, |
206 |
cannot_be_modified : 0, |
207 |
columnname: 'author', |
207 |
cannot_be_toggled : 0, |
208 |
is_hidden: 0 |
208 |
columnname : 'author', |
209 |
}, |
209 |
is_hidden : 0 |
210 |
{ |
210 |
}, |
211 |
cannot_be_modified: 0, |
211 |
{ |
212 |
cannot_be_toggled: 0, |
212 |
cannot_be_modified : 0, |
213 |
columnname: 'isbn', |
213 |
cannot_be_toggled : 0, |
214 |
is_hidden: 0 |
214 |
columnname : 'isbn', |
215 |
}, |
215 |
is_hidden : 0 |
216 |
{ |
216 |
}, |
217 |
cannot_be_modified: 0, |
217 |
{ |
218 |
cannot_be_toggled: 0, |
218 |
cannot_be_modified : 0, |
219 |
columnname: 'issn', |
219 |
cannot_be_toggled : 0, |
220 |
is_hidden: 0 |
220 |
columnname : 'issn', |
221 |
}, |
221 |
is_hidden : 0 |
222 |
{ |
222 |
}, |
223 |
cannot_be_modified: 0, |
223 |
{ |
224 |
cannot_be_toggled: 0, |
224 |
cannot_be_modified : 0, |
225 |
columnname: 'date', |
225 |
cannot_be_toggled : 0, |
226 |
is_hidden: 0 |
226 |
columnname : 'date', |
227 |
} |
227 |
is_hidden : 0 |
228 |
]; |
228 |
} |
|
|
229 |
] |
230 |
}; |
229 |
// Hide pagination buttons if appropriate |
231 |
// Hide pagination buttons if appropriate |
230 |
tableDef.drawCallback = function() { |
232 |
tableDef.drawCallback = function() { |
231 |
var pagination = $(this).closest('.dataTables_wrapper') |
233 |
var pagination = $(this).closest('.dataTables_wrapper') |
232 |
.find('.dataTables_paginate'); |
234 |
.find('.dataTables_paginate'); |
233 |
pagination.toggle(this.api().page.info().pages > 1); |
235 |
pagination.toggle(this.api().page.info().pages > 1); |
234 |
} |
236 |
} |
235 |
KohaTable(service.id, tableDef, columns_settings); |
237 |
KohaTable(service.id, tableDef, table_settings); |
236 |
}); |
238 |
}); |
237 |
} |
239 |
} |
238 |
|
240 |
|