mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-10 22:24:10 +01:00
d481e0d441
- Cannot pass in a `dt` instance - will always use the one from the jQuery instance given - Don't check for reinitialisation or for jQuery when working in the browser - will throw an error if in browser and no jQuery, which is correct, DataTables needs jQuery
10 lines
2.5 KiB
JavaScript
10 lines
2.5 KiB
JavaScript
/*!
|
|
DataTables jQuery UI integration
|
|
©2011-2014 SpryMedia Ltd - datatables.net/license
|
|
*/
|
|
(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables"],a):"object"===typeof exports?module.exports=function(b){b||(b=require("jquery"));b.fn.dataTable||require("datatables")(b);a(b)}:jQuery&&a(jQuery)})(function(a){var b=a.fn.dataTable;a.extend(!0,b.defaults,{dom:'<"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-tl ui-corner-tr"lfr>t<"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-bl ui-corner-br"ip>',renderer:"jqueryui"});a.extend(b.ext.classes,
|
|
{sWrapper:"dataTables_wrapper dt-jqueryui",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:"ui-state-default sorting_asc",sSortDesc:"ui-state-default sorting_desc",sSortable:"ui-state-default sorting",sSortableAsc:"ui-state-default sorting_asc_disabled",sSortableDesc:"ui-state-default sorting_desc_disabled",
|
|
sSortableNone:"ui-state-default sorting_disabled",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sHeaderTH:"ui-state-default",sFooterTH:"ui-state-default"});b.ext.renderer.header.jqueryui=function(b,g,d,c){var e="css_right ui-icon ui-icon-carat-2-n-s",f=-1!==a.inArray("asc",d.asSorting),h=-1!==a.inArray("desc",d.asSorting);!d.bSortable||!f&&!h?e="":f&&!h?e="css_right ui-icon ui-icon-carat-1-n":!f&&h&&(e="css_right ui-icon ui-icon-carat-1-s");
|
|
a("<div/>").addClass("DataTables_sort_wrapper").append(g.contents()).append(a("<span/>").addClass(c.sSortIcon+" "+e)).appendTo(g);a(b.nTable).on("order.dt",function(a,f,h,i){b===f&&(a=d.idx,g.removeClass(c.sSortAsc+" "+c.sSortDesc).addClass("asc"==i[a]?c.sSortAsc:"desc"==i[a]?c.sSortDesc:d.sSortingClass),g.find("span."+c.sSortIcon).removeClass("css_right ui-icon ui-icon-triangle-1-n css_right ui-icon ui-icon-triangle-1-s css_right ui-icon ui-icon-carat-2-n-s css_right ui-icon ui-icon-carat-1-n css_right ui-icon ui-icon-carat-1-s").addClass("asc"==
|
|
i[a]?"css_right ui-icon ui-icon-triangle-1-n":"desc"==i[a]?"css_right ui-icon ui-icon-triangle-1-s":e))})};b.TableTools&&a.extend(!0,b.TableTools.classes,{container:"DTTT_container ui-buttonset ui-buttonset-multi",buttons:{normal:"DTTT_button ui-button ui-state-default"},collection:{container:"DTTT_collection ui-buttonset ui-buttonset-multi"}});return b});
|