A free open source IT asset/license management system
This is the smallest set of changes we can use to work around a change in functionality in Bootstrap Tables. This should remedy some of the issues we've been having with large GET strings being sent to the back-end by the Assets system.
Brady Wetheringtona5423649f441
diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.phpindex e6143b413c..c638c0a5ea 100644--- a/resources/views/partials/bootstrap-table.blade.php+++ b/resources/views/partials/bootstrap-table.blade.php@@ -17,6 +17,16 @@stickyHeaderOffsetY += +$('.navbar-fixed-top').css('margin-bottom').replace('px','');}+ var blockedFields = "searchable,sortable,switchable,title,visible,formatter,class".split(",");++ var keyBlocked = function(key) {+ for(var j in blockedFields) {+ if(key === blockedFields[j]) {+ return true;+ }+ }+ return false;+ }$('.snipe-table').bootstrapTable('destroy').bootstrapTable({classes: 'table table-responsive table-no-bordered',@@ -42,6 +52,15 @@pageList: ['10','20', '30','50','100','150','200', '500'],pageSize: {{ (($snipeSettings->per_page!='') && ($snipeSettings->per_page > 0)) ? $snipeSettings->per_page : 20 }},paginationVAlign: 'both',+ queryParams: function (params) {+ var newParams = {};+ for(var i in params) {+ if(!keyBlocked(i)) { // only send the field if it's not in blockedFields+ newParams[i] = params[i];+ }+ }+ return newParams;+ },formatLoadingMessage: function () {return '<h2><i class="fa fa-spinner fa-spin" aria-hidden="true"></i> Loading... please wait.... </h4>';},