Bug 11605: fallback to default DataTables settings where possible
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 24 Jan 2014 11:15:55 +0000 (12:15 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 10 Mar 2014 19:05:51 +0000 (19:05 +0000)
The default entry is 20 and can be apply to all tables.

Bug 11555 apply the menu entries to all tables, redefining it is
uesless and can be removed.

Test plan:
Test pages impacted by this patch and verify there is no regression on
the tables.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
21 files changed:
koha-tmpl/intranet-tmpl/prog/en/js/datatables.js
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt

index faab715..aa2dcca 100644 (file)
@@ -24,7 +24,8 @@ var dataTablesDefaults = {
         "sZeroRecords"      : window.MSG_DT_ZERO_RECORDS || "No matching records found"
     },
     "sDom": '<"top pager"ilpf>t<"bottom pager"ip>',
-    "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, window.MSG_DT_ALL || "All"]]
+    "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, window.MSG_DT_ALL || "All"]],
+    "iDisplayLength": 20
 };
 
 
index b537148..e504334 100644 (file)
@@ -20,8 +20,6 @@
         var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
             "bStateSave": true,
             "iCookieDuration": 60*60*24*1000, // 1000 days
-            "iDisplayLength": 10,
-            "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
             "aoColumnDefs": [
                 { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
             ],
@@ -63,8 +61,6 @@
         var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
             "bStateSave": true,
             "iCookieDuration": 60*60*24*1000, // 1000 days
-            "iDisplayLength": 10,
-            "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
             "aoColumnDefs": [
                 { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
             ],
index 219a049..cdf7edc 100644 (file)
@@ -190,8 +190,6 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget")
                 "aoColumnDefs": [
                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
                 ],
-                "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-                "iDisplayLength": 20,
                 "sPaginationType": "four_button"
             }));
         [% ELSE %]
index aed89bc..1d7ee4f 100644 (file)
@@ -14,8 +14,6 @@
         "aoColumnDefs": [
             { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
         ],
-        "iDisplayLength": 20,
-        "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
         "sPaginationType": "four_button"
     }));
  });
index e0a22e6..27c8b7b 100644 (file)
@@ -16,8 +16,6 @@
             { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
         ],
         "aaSorting": [[ 1, "asc" ]],
-        "iDisplayLength": 20,
-        "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
         "sPaginationType": "four_button"
     }));
 
index bc0f6cf..a10dfb3 100644 (file)
@@ -35,8 +35,6 @@
             "aoColumnDefs": [
                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
             ],
-            "iDisplayLength": 20,
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
             "sPaginationType": "four_button"
         }));
        });
index e7838d9..f12107f 100644 (file)
@@ -22,7 +22,6 @@
                 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
             ],
             "iDisplayLength": 10,
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
             "sPaginationType": "four_button"
         }));
     });
index b9e6740..c32094e 100644 (file)
@@ -17,8 +17,6 @@
                 { "aTargets": [ 3,4,5 ], "sType": "natural" },
             ],
             "aaSorting": [[ 1, "asc" ]],
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-            "iDisplayLength": 20,
             "sPaginationType": "four_button"
         }));
 
index e6acddb..0265634 100644 (file)
@@ -11,8 +11,7 @@
                 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
             ],
             "aaSorting": [[ 1, "asc" ]],
-            "iDisplayLength": 10,
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
+            "iDisplayLength": 10
         }));
     });
 //]]>
index 2a8ce12..45d64c8 100644 (file)
@@ -28,7 +28,6 @@ Data deleted
             "aoColumnDefs": [
                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
             ],
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
             "aaSorting": [[ 2, "asc" ]],
             "iDisplayLength": 10
         }));
index 7ce8414..dc4243d 100644 (file)
@@ -16,8 +16,6 @@ $(document).ready(function() {
         "aoColumnDefs": [
             { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
         ],
-        "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-        "iDisplayLength": 20,
         "sPaginationType": "four_button"
     }));
 });
index 6e9a1ff..a9c8e4e 100644 (file)
@@ -39,8 +39,6 @@
             "aoColumnDefs": [
                 { "aTargets": [ 2,3,4,7,8,9,10,11 ], "bSortable": false, "bSearchable": false },
             ],
-            "iDisplayLength": 20,
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
             "sPaginationType": "four_button"
         }));[% END %]
      });
index 2cc539a..521a8d8 100644 (file)
@@ -32,8 +32,6 @@
                 null,
                 null
             ],
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-            "iDisplayLength": 20,
             "sPaginationType": "four_button"
         }));
      });
index 10c6b8c..1d7182b 100644 (file)
@@ -17,8 +17,6 @@ dt_add_type_uk_date();
             "aoColumnDefs": [
                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
             ],
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-            "iDisplayLength": 20,
             "sPaginationType": "four_button"
         }));
       });
index 403de54..cb9f06f 100644 (file)
@@ -12,8 +12,6 @@
     $(document).ready(function(){
         $("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
             "sPaginationType": "four_button",
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-            "iDisplayLength": 20,
             "aoColumnDefs": [
                 { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
                 { 'sType': "anti-the", 'aTargets' : [ 'antithe'] }
index b630800..14e5134 100644 (file)
@@ -8,9 +8,7 @@
 <script type="text/javascript" id="js">
 $(document).ready(function() {
     $("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
-        "sPaginationType": "four_button",
-        "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-        "iDisplayLength": 20
+        "sPaginationType": "four_button"
     }));
 });
 </script>
index beab40d..31d40ba 100644 (file)
@@ -10,8 +10,6 @@
     $("#noticestable").dataTable($.extend(true, {}, dataTablesDefaults, {
         "aaSorting": [[ 3, "desc" ]],
         "aoColumns": [ null,null,null,{ "sType": "title-string" } ],
-        "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-        "iDisplayLength": 20,
         "sPaginationType": "four_button"
     }));
 
index 2ac91d6..f787cac 100644 (file)
@@ -68,8 +68,6 @@ $(document).ready(function(){
         'bAutoWidth': false,
         'sDom': 't<"bottom pager"ilpf>',
         'sPaginationType': 'four_button',
-        'aLengthMenu': [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-        'iDisplayLength': 20,
         'aaSorting': [[ 1, "asc" ]],
         'aoColumnDefs': [
             { 'bSortable': false, 'bSearchable':false, 'aTargets': [0, -1, -2, -3, -4] },
index ecd8a8e..c4a15c4 100644 (file)
@@ -59,8 +59,6 @@ $(document).ready(function() {
         "aoColumns": [
             null,{ "sType": "anti-the" },null,null,null,null,null
         ],
-        "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-        "iDisplayLength": 20,
         "sPaginationType": "four_button"
     }));
 [% FOREACH suggestion IN suggestions %]
index 5749ceb..f6ce767 100644 (file)
@@ -19,8 +19,6 @@
                 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
             ],
             "aaSorting": [[ 0, "asc" ]],
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-            "iDisplayLength": 20,
             "sPaginationType": "four_button"
         }));
     });
@@ -100,4 +98,4 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
   </ul>
  </div>
 </div>
-[% INCLUDE 'intranet-bottom.inc' %]
\ No newline at end of file
+[% INCLUDE 'intranet-bottom.inc' %]
index db74ee3..a8e2809 100644 (file)
@@ -136,8 +136,6 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
                 null,null,null,null,null,null,[% UNLESS ( filter_approved_pending ) %]null,[% END %]{ "sType": "title-string" }
             ],
             "aaSorting": [[ 4, "desc" ]],
-            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
-            "iDisplayLength": 20,
             "sPaginationType": "four_button"
         }));
         var reviewerField = $("#approver");