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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt (-22 / +46 lines)
Lines 224-230 Link Here
224
[% MACRO jsinclude BLOCK %]
224
[% MACRO jsinclude BLOCK %]
225
    [% Asset.js("js/tools-menu.js") | $raw %]
225
    [% Asset.js("js/tools-menu.js") | $raw %]
226
    [% INCLUDE 'datatables.inc' %]
226
    [% INCLUDE 'datatables.inc' %]
227
    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
228
    <script>
227
    <script>
229
        var MSG_CANNOT_BE_DELETED = _("This record cannot be deleted, at least one item is currently checked out.");
228
        var MSG_CANNOT_BE_DELETED = _("This record cannot be deleted, at least one item is currently checked out.");
230
        $(document).ready(function() {
229
        $(document).ready(function() {
Lines 238-264 Link Here
238
              $("#show_list_option").show();
237
              $("#show_list_option").show();
239
            }
238
            }
240
          });
239
          });
241
          $("#selectall").click(function(e){
240
            $("#selectall").click(function(e){
242
            e.preventDefault();
241
                e.preventDefault();
243
            $(".records").checkCheckboxes(":input[type='checkbox']:not(:disabled)");
242
                $(".records input[type='checkbox']:not(:disabled)").each(function(){
244
          });
243
                    $(this).prop("checked", true);
245
          $("#clearall").click(function(e){
244
                });
246
            e.preventDefault();
245
            });
247
            $(".records").unCheckCheckboxes(":input[type='checkbox']:not(:disabled)");
246
248
          });
247
            $("#clearall").click(function(e){
249
          $("#selectwithoutitems").click(function(e){
248
                e.preventDefault();
250
            e.preventDefault();
249
                $(".records input[type='checkbox']:not(:disabled)").each(function(){
251
            $("#biblios").checkCheckboxes(":input[data-items='0']:not(:disabled)");
250
                    $(this).prop("checked", false);
252
          });
251
                });
253
          $("#selectnotreserved").click(function(e){
252
            });
254
            e.preventDefault();
253
255
            $("#biblios").checkCheckboxes(":input[data-reserves='0']:not(:disabled)");
254
            $("#selectwithoutitems").click(function(e){
255
                e.preventDefault();
256
                $(".records input[type='checkbox']:not(:disabled)").each(function(){
257
                    if( $(this).data("items") == 0 ){
258
                        $(this).prop("checked", true );
259
                    } else {
260
                        $(this).prop("checked", false );
261
                    }
262
                });
263
            });
264
265
            $("#selectnotreserved").click(function(e){
266
                e.preventDefault();
267
                $(".records input[type='checkbox']:not(:disabled)").each(function(){
268
                    if( $(this).data("reserves") == 0 ){
269
                        $(this).prop("checked", true );
270
                    } else {
271
                        $(this).prop("checked", false );
272
                    }
273
                });
274
            });
275
276
            $("#clearlinkedtobiblio").click(function(e){
277
                e.preventDefault();
278
                $(".records input[type='checkbox']:not(:disabled)").each(function(){
279
                    if( $(this).data("usage") == 0 ){
280
                        $(this).prop("checked", true );
281
                    } else {
282
                        $(this).prop("checked", false );
283
                    }
284
                });
285
            });
256
286
257
          });
258
          $("#clearlinkedtobiblio").click(function(e){
259
            e.preventDefault();
260
            $("#authorities").unCheckCheckboxes(":not(input[data-usage='0'])");
261
          });
262
          $("#selectall").click();
287
          $("#selectall").click();
263
288
264
          [% IF recordtype == 'biblio' %]
289
          [% IF recordtype == 'biblio' %]
265
- 

Return to bug 26159