Skip to content

Commit

Permalink
b8076da3b5692bfb8862d259737245a90e8d97a1 Fix: Fomantic UI pagination …
Browse files Browse the repository at this point in the history
…HTML structure was incorrect

https://datatables.net/forums/discussion/78747/

Sync to source repo @b8076da3b5692bfb8862d259737245a90e8d97a1
  • Loading branch information
dtbuild committed Apr 15, 2024
1 parent 1ae0b2a commit 8dd90d7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "2.0.3",
"last-sync": "257c6678cece593faed8ad8739b85a9b05163ed8"
"last-sync": "b8076da3b5692bfb8862d259737245a90e8d97a1"
}
7 changes: 3 additions & 4 deletions js/dataTables.semanticui.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,15 @@ DataTable.ext.renderer.pagingButton.semanticUI = function (settings, buttonType,
btnClasses.push('disabled')
}

var li = $('<li>').addClass(btnClasses.join(' '));
var a = $('<'+(disabled ? 'div' : 'a')+'>', {
'href': disabled ? null : '#',
'class': 'page-link'
})
.html(content)
.appendTo(li);
.addClass(btnClasses.join(' '))
.html(content);

return {
display: li,
display: a,
clicker: a
};
};
Expand Down
2 changes: 1 addition & 1 deletion js/dataTables.semanticui.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dataTables.semanticui.min.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! DataTables Bootstrap 3 integration
* ©2011-2015 SpryMedia Ltd - datatables.net/license
*/
import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;$.extend(!0,DataTable.defaults,{renderer:"semanticUI"}),$.extend(!0,DataTable.ext.classes,{container:"dt-container dt-semanticUI ui stackable grid",search:{input:"dt-search ui input"},processing:{container:"dt-processing ui segment"},table:"dataTable table unstackable"}),DataTable.ext.renderer.pagingButton.semanticUI=function(e,a,t,n,i){var d=["dt-paging-button","item"],n=(n&&d.push("active"),i&&d.push("disabled"),$("<li>").addClass(d.join(" ")));return{display:n,clicker:$("<"+(i?"div":"a")+">",{href:i?null:"#",class:"page-link"}).html(t).appendTo(n)}},DataTable.ext.renderer.pagingContainer.semanticUI=function(e,a){return $("<div/>").addClass("ui unstackable pagination menu").append(a)},$(document).on("init.dt",function(e,a){"dt"===e.namespace&&(e=new $.fn.dataTable.Api(a),$.fn.dropdown&&$("div.dt-length select",e.table().container()).dropdown(),$("div.dt-search.ui.input",e.table().container()).removeClass("input").addClass("form"),$("div.dt-search input",e.table().container()).wrap('<span class="ui input" />'))}),DataTable.ext.renderer.layout.semanticUI=function(e,a,t){var n=$("<div/>",{class:(t.full,"row")}).appendTo(a);$.each(t,function(e,a){var t="";"start"===e?t+="left floated eight wide column":"end"===e?t+="right floated right aligned eight wide column":"full"===e&&(t+="center aligned sixteen wide column"),$("<div/>",{id:a.id||null,class:t+" "+(a.className||"")}).append(a.contents).appendTo(n)})};export default DataTable;
import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;$.extend(!0,DataTable.defaults,{renderer:"semanticUI"}),$.extend(!0,DataTable.ext.classes,{container:"dt-container dt-semanticUI ui stackable grid",search:{input:"dt-search ui input"},processing:{container:"dt-processing ui segment"},table:"dataTable table unstackable"}),DataTable.ext.renderer.pagingButton.semanticUI=function(e,a,t,n,i){var d=["dt-paging-button","item"],n=(n&&d.push("active"),i&&d.push("disabled"),$("<"+(i?"div":"a")+">",{href:i?null:"#",class:"page-link"}).addClass(d.join(" ")).html(t));return{display:n,clicker:n}},DataTable.ext.renderer.pagingContainer.semanticUI=function(e,a){return $("<div/>").addClass("ui unstackable pagination menu").append(a)},$(document).on("init.dt",function(e,a){"dt"===e.namespace&&(e=new $.fn.dataTable.Api(a),$.fn.dropdown&&$("div.dt-length select",e.table().container()).dropdown(),$("div.dt-search.ui.input",e.table().container()).removeClass("input").addClass("form"),$("div.dt-search input",e.table().container()).wrap('<span class="ui input" />'))}),DataTable.ext.renderer.layout.semanticUI=function(e,a,t){var n=$("<div/>",{class:(t.full,"row")}).appendTo(a);$.each(t,function(e,a){var t="";"start"===e?t+="left floated eight wide column":"end"===e?t+="right floated right aligned eight wide column":"full"===e&&(t+="center aligned sixteen wide column"),$("<div/>",{id:a.id||null,class:t+" "+(a.className||"")}).append(a.contents).appendTo(n)})};export default DataTable;
7 changes: 3 additions & 4 deletions js/dataTables.semanticui.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,15 @@ DataTable.ext.renderer.pagingButton.semanticUI = function (settings, buttonType,
btnClasses.push('disabled')
}

var li = $('<li>').addClass(btnClasses.join(' '));
var a = $('<'+(disabled ? 'div' : 'a')+'>', {
'href': disabled ? null : '#',
'class': 'page-link'
})
.html(content)
.appendTo(li);
.addClass(btnClasses.join(' '))
.html(content);

return {
display: li,
display: a,
clicker: a
};
};
Expand Down

0 comments on commit 8dd90d7

Please sign in to comment.