View | Details | Raw Unified | Return to bug 15219
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-161 / +217 lines)
Lines 22-253 function disableGrouping(datatable) { Link Here
22
    }
22
    }
23
}
23
}
24
24
25
var mRenders = {
25
var renderers = {
26
    groupOrder: function (oData, sType, oObj) {
26
    groupOrder: function (data, type, row) {
27
        if ( oObj.issued_today ) {
27
        if ( row.issued_today ) {
28
            return "1";
28
            return "1";
29
        } else {
29
        } else {
30
            return "0";
30
            return "0";
31
        }
31
        }
32
    },
32
    },
33
    groupName: function (oData, sType, oObj) {
33
    groupName: function (data, type, row) {
34
        if (oObj.issued_today) {
34
        if (row.issued_today) {
35
            return "<strong>" + TODAYS_CHECKOUTS + "</strong>";
35
            return "<strong>" + TODAYS_CHECKOUTS + "</strong>";
36
        } else {
36
        } else {
37
            return "<strong>" + PREVIOUS_CHECKOUTS + "</strong>";
37
            return "<strong>" + PREVIOUS_CHECKOUTS + "</strong>";
38
        }
38
        }
39
    },
39
    },
40
    dateDueFormatted: function (oData, sType, oObj) {
40
    dateDueFormatted: function (data, type, row) {
41
        var due = oObj.date_due_formatted;
41
        var due = row.date_due_formatted;
42
42
43
        if ( oObj.date_due_overdue ) {
43
        if ( row.date_due_overdue ) {
44
            due = "<span class='overdue'>" + due + "</span>";
44
            due = "<span class='overdue'>" + due + "</span>";
45
        }
45
        }
46
46
47
        due = "<span id='date_due_" + oObj.itemnumber + "' class='date_due'>" + due + "</span>";
47
        due = "<span id='date_due_" + row.itemnumber + "' class='date_due'>" + due + "</span>";
48
48
49
        if ( oObj.lost ) {
49
        if ( row.lost ) {
50
            due += "<span class='lost'>" + oObj.lost.escapeHtml() + "</span>";
50
            due += "<span class='lost'>" + row.lost.escapeHtml() + "</span>";
51
        }
51
        }
52
52
53
        if ( oObj.damaged ) {
53
        if ( row.damaged ) {
54
            due += "<span class='dmg'>" + oObj.damaged.escapeHtml() + "</span>";
54
            due += "<span class='dmg'>" + row.damaged.escapeHtml() + "</span>";
55
        }
55
        }
56
56
57
        return due;
57
        return due;
58
    },
58
    },
59
    title: function (oData, sType, oObj) {
59
    title: function (data, type, row) {
60
        var title = "<span id='title_" + oObj.itemnumber + "' class='strong'><a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber="
60
        var title = "<span id='title_" + row.itemnumber + "' class='strong'><a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber="
61
              + oObj.biblionumber
61
              + row.biblionumber
62
              + "'>"
62
              + "'>"
63
              + oObj.title.escapeHtml();
63
              + row.title.escapeHtml();
64
64
65
        $.each(oObj.subtitle, function( index, value ) {
65
        $.each(row.subtitle, function( index, value ) {
66
                  title += " " + value.subfield.escapeHtml();
66
                  title += " " + value.subfield.escapeHtml();
67
        });
67
        });
68
68
69
        if ( oObj.enumchron ) {
69
        if ( row.enumchron ) {
70
            title += " (" + oObj.enumchron.escapeHtml() + ")";
70
            title += " (" + row.enumchron.escapeHtml() + ")";
71
        }
71
        }
72
72
73
        title += "</a></span>";
73
        title += "</a></span>";
74
74
75
        if ( oObj.author ) {
75
        if ( row.author ) {
76
            title += " " + BY.replace( "_AUTHOR_",  " " + oObj.author.escapeHtml() );
76
            title += " " + BY.replace( "_AUTHOR_",  " " + row.author.escapeHtml() );
77
        }
77
        }
78
78
79
        if ( oObj.itemnotes ) {
79
        if ( row.itemnotes ) {
80
            var span_class = "text-muted";
80
            var span_class = "text-muted";
81
            if ( $.datepicker.formatDate('yy-mm-dd', new Date(oObj.issuedate) ) == ymd ) {
81
            if ( $.datepicker.formatDate('yy-mm-dd', new Date(row.issuedate) ) == ymd ) {
82
                span_class = "circ-hlt";
82
                span_class = "circ-hlt";
83
            }
83
            }
84
            title += " - <span class='" + span_class + " item-note-public'>" + oObj.itemnotes.escapeHtml() + "</span>";
84
            title += " - <span class='" + span_class + " item-note-public'>" + row.itemnotes.escapeHtm() + "</span>";
85
        }
85
        }
86
86
87
        if ( oObj.itemnotes_nonpublic ) {
87
        if ( row.itemnotes_nonpublic ) {
88
            var span_class = "text-danger";
88
            var span_class = "text-danger";
89
            if ( $.datepicker.formatDate('yy-mm-dd', new Date(oObj.issuedate) ) == ymd ) {
89
            if ( $.datepicker.formatDate('yy-mm-dd', new Date(row.issuedate) ) == ymd ) {
90
                span_class = "circ-hlt";
90
                span_class = "circ-hlt";
91
            }
91
            }
92
            title += " - <span class='" + span_class + " item-note-nonpublic'>" + oObj.itemnotes_nonpublic.escapeHtml() + "</span>";
92
            title += " - <span class='" + span_class + " item-note-nonpublic'>" + row.itemnotes_nonpublic.escapeHtml() + "</span>";
93
        }
93
        }
94
94
95
        var onsite_checkout = '';
95
        var onsite_checkout = '';
96
        if ( oObj.onsite_checkout == 1 ) {
96
        if ( row.onsite_checkout == 1 ) {
97
            onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>";
97
            onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>";
98
        }
98
        }
99
99
100
        title += " "
100
        title += " "
101
              + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber="
101
              + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber="
102
              + oObj.biblionumber
102
              + row.biblionumber
103
              + "&itemnumber="
103
              + "&itemnumber="
104
              + oObj.itemnumber
104
              + row.itemnumber
105
              + "#"
105
              + "#"
106
              + oObj.itemnumber
106
              + row.itemnumber
107
              + "'>"
107
              + "'>"
108
              + oObj.barcode.escapeHtml()
108
              + row.barcode.escapeHtml()
109
              + "</a>"
109
              + "</a>"
110
              + onsite_checkout
110
              + onsite_checkout
111
111
112
        return title;
112
        return title;
113
    },
113
    },
114
    itemtype: function (oData, sType, oObj) {
114
    itemtype: function (data, type, row) {
115
        return oObj.itemtype_description.escapeHtml();
115
        return row.itemtype_description.escapeHtml();
116
    },
116
    },
117
    collection: function (oData, sType, oObj) {
117
    collection: function (data, type, row) {
118
        return oObj.collection ? oObj.collection.escapeHtml() : '';
118
        return row.collection ? row.collection.escapeHtml() : '';
119
    },
119
    },
120
    location: function (oData, sType, oObj) {
120
    location: function (data, type, row) {
121
        return oObj.location ? oObj.location.escapeHtml() : '';
121
        return row.location ? row.location.escapeHtml() : '';
122
    },
122
    },
123
    homebranch: function (oData, sType, oObj) {
123
    homebranch: function (data, type, row) {
124
        return oObj.homebranch.escapeHtml();
124
        return row.homebranch.escapeHtml();
125
    },
125
    },
126
    issuedate: function (oData, sType, oObj) {
126
    issuedate: function (data, type, row) {
127
        return oObj.issuedate_formatted;
127
        return row.issuedate_formatted;
128
    },
128
    },
129
    branch: function (oData, sType, oObj) {
129
    branch: function (data, type, row) {
130
        return oObj.branchname.escapeHtml();
130
        return row.branchname.escapeHtml();
131
    },
131
    },
132
    itemcallnumber: function (oData, sType, oObj) {
132
    itemcallnumber: function (data, type, row) {
133
        return oObj.itemcallnumber ? oObj.itemcallnumber.escapeHtml() : '';
133
        return row.itemcallnumber ? row.itemcallnumber.escapeHtml() : '';
134
    },
134
    },
135
    charge: function (oData, sType, oObj) {
135
    charge: function (data, type, row) {
136
        if (!oObj.charge) oObj.charge = 0;
136
        if (!row.charge) row.charge = 0;
137
        return '<span style="text-align: right; display: block;">' + parseFloat(oObj.charge).toFixed(2) + '<span>';
137
        return '<span style="text-align: right; display: block;">' + parseFloat(row.charge).toFixed(2) + '<span>';
138
    },
138
    },
139
    fine: function (oData, sType, oObj) {
139
    fine: function (data, type, row) {
140
        if (!oObj.fine) oObj.fine = 0;
140
        if (!row.fine) row.fine = 0;
141
        return '<span style="text-align: right; display: block;">' + parseFloat(oObj.fine).toFixed(2)  + '<span>';
141
        return '<span style="text-align: right; display: block;">' + parseFloat(row.fine).toFixed(2)  + '<span>';
142
    },
142
    },
143
    price: function (oData, sType, oObj) {
143
    price: function (data, type, row) {
144
        if (!oObj.price) oObj.price = 0;
144
        if (!row.price) row.price = 0;
145
        return parseFloat(oObj.price).toFixed(2);
145
        return parseFloat(row.price).toFixed(2);
146
    },
146
    },
147
    renew: function (oData, sType, oObj) {
147
    renew: function (data, type, row) {
148
        var content = "";
148
        var content = "";
149
        var span_style = "";
149
        var span_style = "";
150
        var span_class = "";
150
        var span_class = "";
151
151
152
        content += "<span>";
152
        content += "<span>";
153
        content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>";
153
        content += "<span style='padding: 0 1em;'>" + row.renewals_count + "</span>";
154
154
155
        if ( oObj.can_renew ) {
155
        if ( row.can_renew ) {
156
            // Do nothing
156
            // Do nothing
157
        } else if ( oObj.can_renew_error == "on_reserve" ) {
157
        } else if ( row.can_renew_error == "on_reserve" ) {
158
            content += "<span class='renewals-disabled-no-override'>"
158
            content += "<span class='renewals-disabled-no-override'>"
159
                    + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>"
159
                    + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + row.biblionumber + "'>" + ON_HOLD + "</a>"
160
                    + "</span>";
160
                    + "</span>";
161
161
162
            span_style = "display: none";
162
            span_style = "display: none";
163
            span_class = "renewals-allowed";
163
            span_class = "renewals-allowed";
164
        } else if ( oObj.can_renew_error == "too_many" ) {
164
        } else if ( row.can_renew_error == "too_many" ) {
165
            content += "<span class='renewals-disabled'>"
165
            content += "<span class='renewals-disabled'>"
166
                    + NOT_RENEWABLE
166
                    + NOT_RENEWABLE
167
                    + "</span>";
167
                    + "</span>";
168
168
169
            span_style = "display: none";
169
            span_style = "display: none";
170
            span_class = "renewals-allowed";
170
            span_class = "renewals-allowed";
171
        } else if ( oObj.can_renew_error == "restriction" ) {
171
        } else if ( row.can_renew_error == "restriction" ) {
172
            content += "<span class='renewals-disabled'>"
172
            content += "<span class='renewals-disabled'>"
173
                    + NOT_RENEWABLE_RESTRICTION
173
                    + NOT_RENEWABLE_RESTRICTION
174
                    + "</span>";
174
                    + "</span>";
175
175
176
            span_style = "display: none";
176
            span_style = "display: none";
177
            span_class = "renewals-allowed";
177
            span_class = "renewals-allowed";
178
        } else if ( oObj.can_renew_error == "overdue" ) {
178
        } else if ( row.can_renew_error == "overdue" ) {
179
            content += "<span class='renewals-disabled'>"
179
            content += "<span class='renewals-disabled'>"
180
                    + NOT_RENEWABLE_OVERDUE
180
                    + NOT_RENEWABLE_OVERDUE
181
                    + "</span>";
181
                    + "</span>";
182
182
183
            span_style = "display: none";
183
            span_style = "display: none";
184
            span_class = "renewals-allowed";
184
            span_class = "renewals-allowed";
185
        } else if ( oObj.can_renew_error == "too_soon" ) {
185
        } else if ( row.can_renew_error == "too_soon" ) {
186
            content += "<span class='renewals-disabled'>"
186
            content += "<span class='renewals-disabled'>"
187
                    + NOT_RENEWABLE_TOO_SOON.format( oObj.can_renew_date )
187
                    + NOT_RENEWABLE_TOO_SOON.format( row.can_renew_date )
188
                    + "</span>";
188
                    + "</span>";
189
189
190
            span_style = "display: none";
190
            span_style = "display: none";
191
            span_class = "renewals-allowed";
191
            span_class = "renewals-allowed";
192
        } else if ( oObj.can_renew_error == "auto_too_soon" ) {
192
        } else if ( row.can_renew_error == "auto_too_soon" ) {
193
            content += "<span class='renewals-disabled'>"
193
            content += "<span class='renewals-disabled'>"
194
                    + NOT_RENEWABLE_AUTO_TOO_SOON
194
                    + NOT_RENEWABLE_AUTO_TOO_SOON
195
                    + "</span>";
195
                    + "</span>";
196
196
197
            span_style = "display: none";
197
            span_style = "display: none";
198
            span_class = "renewals-allowed";
198
            span_class = "renewals-allowed";
199
        } else if ( oObj.can_renew_error == "auto_too_late" ) {
199
        } else if ( row.can_renew_error == "auto_too_late" ) {
200
            content += "<span class='renewals-disabled'>"
200
            content += "<span class='renewals-disabled'>"
201
                    + NOT_RENEWABLE_AUTO_TOO_LATE
201
                    + NOT_RENEWABLE_AUTO_TOO_LATE
202
                    + "</span>";
202
                    + "</span>";
203
203
204
            span_style = "display: none";
204
            span_style = "display: none";
205
            span_class = "renewals-allowed";
205
            span_class = "renewals-allowed";
206
        } else if ( oObj.can_renew_error == "auto_too_much_oweing" ) {
206
        } else if ( row.can_renew_error == "auto_too_much_oweing" ) {
207
            content += "<span class='renewals-disabled'>"
207
            content += "<span class='renewals-disabled'>"
208
                    + NOT_RENEWABLE_AUTO_TOO_MUCH_OWEING
208
                    + NOT_RENEWABLE_AUTO_TOO_MUCH_OWEING
209
                    + "</span>";
209
                    + "</span>";
210
210
211
            span_style = "display: none";
211
            span_style = "display: none";
212
            span_class = "renewals-allowed";
212
            span_class = "renewals-allowed";
213
        } else if ( oObj.can_renew_error == "auto_account_expired" ) {
213
        } else if ( row.can_renew_error == "auto_account_expired" ) {
214
            content += "<span class='renewals-disabled'>"
214
            content += "<span class='renewals-disabled'>"
215
                    + NOT_RENEWABLE_AUTO_ACCOUNT_EXPIRED
215
                    + NOT_RENEWABLE_AUTO_ACCOUNT_EXPIRED
216
                    + "</span>";
216
                    + "</span>";
217
217
218
            span_style = "display: none";
218
            span_style = "display: none";
219
            span_class = "renewals-allowed";
219
            span_class = "renewals-allowed";
220
        } else if ( oObj.can_renew_error == "auto_renew" ) {
220
        } else if ( row.can_renew_error == "auto_renew" ) {
221
            content += "<span class='renewals-disabled'>"
221
            content += "<span class='renewals-disabled'>"
222
                    + NOT_RENEWABLE_AUTO_RENEW
222
                    + NOT_RENEWABLE_AUTO_RENEW
223
                    + "</span>";
223
                    + "</span>";
224
224
225
            span_style = "display: none";
225
            span_style = "display: none";
226
            span_class = "renewals-allowed";
226
            span_class = "renewals-allowed";
227
        } else if ( oObj.can_renew_error == "onsite_checkout" ) {
227
        } else if ( row.can_renew_error == "onsite_checkout" ) {
228
            // Don't display something if it's an onsite checkout
228
            // Don't display something if it's an onsite checkout
229
        } else {
229
        } else {
230
            content += "<span class='renewals-disabled'>"
230
            content += "<span class='renewals-disabled'>"
231
                    + oObj.can_renew_error
231
                    + row.can_renew_error
232
                    + "</span>";
232
                    + "</span>";
233
233
234
            span_style = "display: none";
234
            span_style = "display: none";
235
            span_class = "renewals-allowed";
235
            span_class = "renewals-allowed";
236
        }
236
        }
237
237
238
        var can_force_renew = ( oObj.onsite_checkout == 0 ) && ( oObj.can_renew_error != "on_reserve" );
238
        var can_force_renew = ( row.onsite_checkout == 0 ) && ( row.can_renew_error != "on_reserve" );
239
        var can_renew = ( oObj.renewals_remaining > 0  && !oObj.can_renew_error );
239
        var can_renew = ( row.renewals_remaining > 0  && !row.can_renew_error );
240
        if ( can_renew || can_force_renew ) {
240
        if ( can_renew || can_force_renew ) {
241
            content += "<span class='" + span_class + "' style='" + span_style + "'>"
241
            content += "<span class='" + span_class + "' style='" + span_style + "'>"
242
                    +  "<input type='checkbox' ";
242
                    +  "<input type='checkbox' ";
243
            if ( oObj.date_due_overdue && can_renew ) {
243
            if ( row.date_due_overdue && can_renew ) {
244
                content += "checked='checked' ";
244
                content += "checked='checked' ";
245
            }
245
            }
246
            content += "class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
246
            content += "class='renew' id='renew_" + row.itemnumber + "' name='renew' value='" + row.itemnumber +"'/>"
247
                    +  "</span>";
247
                    +  "</span>";
248
248
249
            content += "<span class='renewals'>("
249
            content += "<span class='renewals'>("
250
                    + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
250
                    + RENEWALS_REMAINING.format( row.renewals_remaining, row.renewals_allowed )
251
                    + ")</span>";
251
                    + ")</span>";
252
        }
252
        }
253
253
Lines 255-279 var mRenders = { Link Here
255
255
256
        return content;
256
        return content;
257
    },
257
    },
258
    checkin: function (oData, sType, oObj) {
258
    checkin: function (data, type, row) {
259
        if (oObj.can_renew_error == "on_reserve") {
259
        if (row.can_renew_error == "on_reserve") {
260
            return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>";
260
            return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + row.biblionumber + "'>" + ON_HOLD + "</a>";
261
        } else {
261
        } else {
262
            return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>";
262
            return "<input type='checkbox' class='checkin' id='checkin_" + row.itemnumber + "' name='checkin' value='" + row.itemnumber +"'></input>";
263
        }
263
        }
264
    },
264
    },
265
    export: function (oData, sType, oObj) {
265
    export: function (data, type, row) {
266
        var s = "<input type='checkbox' name='itemnumbers' value='" + oObj.itemnumber + "' style='visibility:hidden;' />";
266
        var s = "<input type='checkbox' name='itemnumbers' value='" + row.itemnumber + "' style='visibility:hidden;' />";
267
267
268
        s += "<input type='checkbox' class='export' id='export_" + oObj.biblionumber + "' name='biblionumbers' value='" + oObj.biblionumber + "' />";
268
        s += "<input type='checkbox' class='export' id='export_" + row.biblionumber + "' name='biblionumbers' value='" + row.biblionumber + "' />";
269
        return s;
269
        return s;
270
    },
270
    },
271
    patron: function (oData, sType, oObj) {
271
    patron: function (data, type, row) {
272
        return "<a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=" + oObj.borrowernumber + "'>"
272
        return "<a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=" + row.borrowernumber + "'>"
273
             + oObj.borrower.firstname.escapeHtml()
273
             + row.borrower.firstname.escapeHtml()
274
             + " "
274
             + " "
275
             + oObj.borrower.surname.escapeHtml()
275
             + row.borrower.surname.escapeHtml()
276
             + " (" + oObj.borrower.cardnumber.escapeHtml() + ")</a>"
276
             + " (" + row.borrower.cardnumber.escapeHtml() + ")</a>"
277
    }
277
    }
278
};
278
};
279
279
Lines 493-506 $(document).ready(function() { Link Here
493
            "sPaginationType": "four_button",
493
            "sPaginationType": "four_button",
494
            "dom": 'B<"clearfix"><"top pager"ilp>rt',
494
            "dom": 'B<"clearfix"><"top pager"ilp>rt',
495
            "aaSorting": [],
495
            "aaSorting": [],
496
            "aoColumns": [
496
            "columns": [
497
                {
497
                {
498
                    "mData": "issued_today",
498
                    "data": "issued_today",
499
                    "mRender": mRenders.groupOrder
499
                    "render": renderers.groupOrder
500
                },
500
                },
501
                {
501
                {
502
                    "mData": function (oObj) {
502
                    "data": function (row) {
503
                        if (oObj.issued_today) {
503
                        if (row.issued_today) {
504
                            return "<strong>" + TODAYS_CHECKOUTS + "</strong>";
504
                            return "<strong>" + TODAYS_CHECKOUTS + "</strong>";
505
                        } else {
505
                        } else {
506
                            return "<strong>" + PREVIOUS_CHECKOUTS + "</strong>";
506
                            return "<strong>" + PREVIOUS_CHECKOUTS + "</strong>";
Lines 508-577 $(document).ready(function() { Link Here
508
                    }
508
                    }
509
                },
509
                },
510
                {
510
                {
511
                    "mData": "date_due",
511
                    "data": "date_due",
512
                    "mRender": mRenders.dateDueFormatted
512
                    "render": {
513
                        "display": renderers.dateDueFormatted
514
                    }
513
                },
515
                },
514
                {
516
                {
515
                    "mData": "title",
517
                    "data": "title",
516
                    "mRender": mRenders.title
518
                    "render": {
519
                        "display": renderers.title
520
                    }
517
                },
521
                },
518
                {
522
                {
519
                    "mData": "itemtype",
523
                    "data": "itemtype",
520
                    "mRender": mRenders.itemtype
524
                    "render": {
525
                        "display": renderers.itemtype
526
                    }
521
                },
527
                },
522
                {
528
                {
523
                    "mData": "ccode",
529
                    "data": "collection",
524
                    "mRender": mRenders.collection
530
                    "render": {
531
                        "display": renderers.collection
532
                    }
525
                },
533
                },
526
                {
534
                {
527
                    "mData": "location",
535
                    "data": "location",
528
                    "mRender": mRenders.location
536
                    "render": {
537
                        "display": renderers.location
538
                    }
529
                },
539
                },
530
                {
540
                {
531
                    "mData": "homebranch",
541
                    "data": "homebranch",
532
                    "mRender": mRenders.homebranch
542
                    "render": {
543
                        "display": renderers.homebranch
544
                    }
533
                },
545
                },
534
                {
546
                {
535
                    "mData": "issuedate",
547
                    "data": "issuedate",
536
                    "mRender": mRenders.issuedate
548
                    "render": {
549
                        "display": renderers.issuedate
550
                    }
537
                },
551
                },
538
                {
552
                {
539
                    "mData": "branchcode",
553
                    "data": "branchcode",
540
                    "mRender": mRenders.branch
554
                    "render": {
555
                        "display": renderers.branch
556
                    }
541
                },
557
                },
542
                {
558
                {
543
                    "mData": "itemcallnumber",
559
                    "data": "itemcallnumber",
544
                    "mRender": mRender.itemcallnumber
560
                    "render": {
561
                        "display": renderers.itemcallnumber
562
                    }
545
                },
563
                },
546
                {
564
                {
547
                    "mData": "charge",
565
                    "data": "charge",
548
                    "mRender": mRenders.charge,
566
                    "render": {
549
                    "bSortable": ServerSideCheckoutsTables ? false : true
567
                        "display": renderers.charge
568
                    },
569
                    "orderable": ServerSideCheckoutsTables ? false : true
550
                },
570
                },
551
                {
571
                {
552
                    "mData": "fine",
572
                    "data": "fine",
553
                    "mRender": mRenders.fine,
573
                    "render": {
554
                    "bSortable": ServerSideCheckoutsTables ? false : true
574
                        "display": renderers.fine
575
                    },
576
                    "orderable": ServerSideCheckoutsTables ? false : true
555
                },
577
                },
556
                {
578
                {
557
                    "mData": "replacementprice",
579
                    "data": "price",
558
                    "mRender": mRenders.price,
580
                    "render": {
559
                    "bSortable": ServerSideCheckoutsTables ? false : true
581
                        "display": renderers.price
582
                    },
583
                    "orderable": ServerSideCheckoutsTables ? false : true
560
                },
584
                },
561
                {
585
                {
562
                    "bVisible": AllowCirculate ? true : false,
586
                    "data": null,
563
                    "mRender": mRenders.renew,
587
                    "render": {
564
                    "bSortable": false
588
                        "display": renderers.renew
589
                    },
590
                    "visible": AllowCirculate ? true : false,
591
                    "orderable": false
565
                },
592
                },
566
                {
593
                {
567
                    "bVisible": AllowCirculate ? true : false,
594
                    "data": null,
568
                    "mRender": mRenders.checkin,
595
                    "render": {
569
                    "bSortable": false
596
                        "display": renderers.checkin
597
                    },
598
                    "visible": AllowCirculate ? true : false,
599
                    "orderable": false
570
                },
600
                },
571
                {
601
                {
572
                    "bVisible": exports_enabled == 1 ? true : false,
602
                    "data": null,
573
                    "bSortable": false,
603
                    "render": {
574
                    "mRender": mRenders.export
604
                        "display": renderers.export
605
                    },
606
                    "visible": exports_enabled == 1 ? true : false,
607
                    "orderable": false
575
                }
608
                }
576
            ],
609
            ],
577
            "fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
610
            "fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
Lines 638-695 $(document).ready(function() { Link Here
638
                },
671
                },
639
                "bPaginate": true,
672
                "bPaginate": true,
640
                "sPaginationType": "four_button",
673
                "sPaginationType": "four_button",
641
                "aoColumns": [
674
                "columns": [
642
                    {
675
                    {
643
                        "mData": "date_due",
676
                        "data": "date_due",
644
                        "mRender": mRenders.dateDueFormatted
677
                        "render": {
678
                            "display": renderers.dateDueFormatted
679
                        }
645
                    },
680
                    },
646
                    {
681
                    {
647
                        "mData": "title",
682
                        "data": "title",
648
                        "mRender": mRenders.title,
683
                        "render": {
684
                            "display": renderers.title
685
                        }
649
                    },
686
                    },
650
                    {
687
                    {
651
                        "mData": "itemtype",
688
                        "data": "itemtype",
652
                        "mRender": mRenders.itemtype
689
                        "render": {
690
                            "display": renderers.itemtype
691
                        }
653
                    },
692
                    },
654
                    {
693
                    {
655
                        "mData": "ccode",
694
                        "data": "collection",
656
                        "mRender": mRenders.collection
695
                        "render": {
696
                            "display": renderers.collection
697
                        }
657
                    },
698
                    },
658
                    {
699
                    {
659
                        "mData": "location",
700
                        "data": "location",
660
                        "mRender": mRenders.location
701
                        "render": {
702
                            "display": renderers.location
703
                        }
661
                    },
704
                    },
662
                    {
705
                    {
663
                        "mData": "issuedate",
706
                        "data": "issuedate",
664
                        "mRender": mRenders.issuedate
707
                        "render": {
708
                            "display": renderers.issuedate
709
                        }
665
                    },
710
                    },
666
                    {
711
                    {
667
                        "mData": "branchcode",
712
                        "data": "branchcode",
668
                        "mRender": mRenders.branch
713
                        "render": {
714
                            "display": renderers.branch
715
                        }
669
                    },
716
                    },
670
                    {
717
                    {
671
                        "mData": "itemcallnumber",
718
                        "data": "itemcallnumber",
672
                        "mRender": mRenders.itemcallnumber
719
                        "render": {
720
                            "display": renderers.itemcallnumber
721
                        }
673
                    },
722
                    },
674
                    {
723
                    {
675
                        "mData": "charge",
724
                        "data": "charge",
676
                        "mRender": mRenders.charge,
725
                        "render": {
677
                        "bSortable": ServerSideCheckoutsTables ? false : true
726
                            "display": renderers.charge
727
                        },
728
                        "orderable": ServerSideCheckoutsTables ? false : true
678
                    },
729
                    },
679
                    {
730
                    {
680
                        "mData": "fine",
731
                        "data": "fine",
681
                        "mRender": mRenders.fine,
732
                        "render": {
682
                        "bSortable": ServerSideCheckoutsTables ? false : true
733
                            "display": renderers.fine
734
                        },
735
                        "orderable": ServerSideCheckoutsTables ? false : true
683
                    },
736
                    },
684
                    {
737
                    {
685
                        "mData": "replacementprice",
738
                        "data": "replacementprice",
686
                        "mRender": mRenders.price,
739
                        "render": {
687
                        "bSortable": ServerSideCheckoutsTables ? false : true
740
                            "display": renderers.price
741
                        },
742
                        "orderable": ServerSideCheckoutsTables ? false : true
688
                    },
743
                    },
689
                    {
744
                    {
690
                        "mData": "borrowernumber",
745
                        "data": "borrowernumber",
691
                        "mRender": mRenders.patron,
746
                        "render": {
692
                        "bSortable": ServerSideCheckoutsTables ? false : true
747
                            "display": renderers.patron
748
                        },
749
                        "orderable": ServerSideCheckoutsTables ? false : true
693
                    }
750
                    }
694
                ]
751
                ]
695
            }, relatives_columns_settings);
752
            }, relatives_columns_settings);
696
- 

Return to bug 15219