From 0bc4349da6297b51edbe774e2a6933f38e7bff32 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 14 Jun 2018 11:27:38 +0100 Subject: [PATCH] reduce label and serach input to a single line With the ui form wrapper the label and input requiere two lines. After the initialization is finished, the view changes to one line. This repositions the table and bounces the page. --- .datatables-commit-sync | 2 +- media/js/dataTables.semanticui.js | 5 +++-- media/js/dataTables.semanticui.min.js | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 657d4aaa..b672dc01 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -94f994add4600d9b8e4689ab445df4228f9fb6c8 +e25b7c2059bfcbf1fe969945f9638fcf1b8b6bf7 diff --git a/media/js/dataTables.semanticui.js b/media/js/dataTables.semanticui.js index f8e8d444..8cf5fff2 100644 --- a/media/js/dataTables.semanticui.js +++ b/media/js/dataTables.semanticui.js @@ -66,7 +66,7 @@ $.extend( true, DataTable.defaults, { /* Default class modification */ $.extend( DataTable.ext.classes, { sWrapper: "dataTables_wrapper dt-semanticUI", - sFilter: "dataTables_filter ui form", + sFilter: "dataTables_filter ui input", sProcessing: "dataTables_processing ui segment", sPageButton: "paginate_button item" } ); @@ -203,9 +203,10 @@ $(document).on( 'init.dt', function (e, ctx) { } // Filtering input + $( 'div.dataTables_filter.ui.input', api.table().container() ).removeClass('input').addClass('form'); $( 'div.dataTables_filter input', api.table().container() ).wrap( '' ); } ); return DataTable; -})); \ No newline at end of file +})); diff --git a/media/js/dataTables.semanticui.min.js b/media/js/dataTables.semanticui.min.js index 153de672..cf6c9828 100644 --- a/media/js/dataTables.semanticui.min.js +++ b/media/js/dataTables.semanticui.min.js @@ -2,8 +2,8 @@ DataTables Bootstrap 3 integration ©2011-2015 SpryMedia Ltd - datatables.net/license */ -(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d,m){var e=b.fn.dataTable;b.extend(!0,e.defaults,{dom:"<'ui stackable grid'<'row'<'eight wide column'l><'right aligned eight wide column'f>><'row dt-table'<'sixteen wide column'tr>><'row'<'seven wide column'i><'right aligned nine wide column'p>>>", -renderer:"semanticUI"});b.extend(e.ext.classes,{sWrapper:"dataTables_wrapper dt-semanticUI",sFilter:"dataTables_filter ui form",sProcessing:"dataTables_processing ui segment",sPageButton:"paginate_button item"});e.ext.renderer.pageButton.semanticUI=function(h,a,r,s,j,n){var o=new e.Api(h),t=h.oClasses,k=h.oLanguage.oPaginate,u=h.oLanguage.oAria.paginate||{},f,g,p=0,q=function(a,d){var e,i,l,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")}; -e=0;for(i=d.length;e",{"class":t.sPageButton+" "+g,id:0===r&&"string"===typeof c? -h.sTableId+"_"+c:null,href:"#","aria-controls":h.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:h.iTabIndex}).html(f).appendTo(a),h.oApi._fnBindAction(l,{action:c},m),p++)}},i;try{i=b(a).find(d.activeElement).data("dt-idx")}catch(v){}q(b(a).empty().html('