mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-19 12:52:11 +01:00
Fix: Jquery UI 1.12 integration. The spelling of caret
was fixed
- Fixes DataTables/DataTables #963
This commit is contained in:
parent
1900c20e5f
commit
2000e66401
@ -1 +1 @@
|
||||
1d6baac32f3e84a6cd25c8001c2903ade40b10e3
|
||||
7d13bc71553149aabb50de5281ac3a410edf7bd0
|
||||
|
@ -5,7 +5,7 @@
|
||||
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
|
||||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
|
||||
<title>DataTables example - jQuery UI ThemeRoller</title>
|
||||
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
|
||||
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/dataTables.jqueryui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
@ -558,7 +558,7 @@ $(document).ready(function() {
|
||||
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css</a>
|
||||
<a href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../../media/css/dataTables.jqueryui.css">../../media/css/dataTables.jqueryui.css</a>
|
||||
|
@ -86,7 +86,7 @@ $.extend( DataTable.ext.classes, {
|
||||
|
||||
DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, classes ) {
|
||||
// Calculate what the unsorted class should be
|
||||
var noSortAppliedClass = sort_prefix+'carat-2-n-s';
|
||||
var noSortAppliedClass = sort_prefix+'caret-2-n-s';
|
||||
var asc = $.inArray('asc', column.asSorting) !== -1;
|
||||
var desc = $.inArray('desc', column.asSorting) !== -1;
|
||||
|
||||
@ -94,10 +94,10 @@ DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, clas
|
||||
noSortAppliedClass = '';
|
||||
}
|
||||
else if ( asc && !desc ) {
|
||||
noSortAppliedClass = sort_prefix+'carat-1-n';
|
||||
noSortAppliedClass = sort_prefix+'caret-1-n';
|
||||
}
|
||||
else if ( !asc && desc ) {
|
||||
noSortAppliedClass = sort_prefix+'carat-1-s';
|
||||
noSortAppliedClass = sort_prefix+'caret-1-s';
|
||||
}
|
||||
|
||||
// Setup the DOM structure
|
||||
@ -130,9 +130,9 @@ DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, clas
|
||||
.removeClass(
|
||||
sort_prefix+'triangle-1-n' +" "+
|
||||
sort_prefix+'triangle-1-s' +" "+
|
||||
sort_prefix+'carat-2-n-s' +" "+
|
||||
sort_prefix+'carat-1-n' +" "+
|
||||
sort_prefix+'carat-1-s'
|
||||
sort_prefix+'caret-2-n-s' +" "+
|
||||
sort_prefix+'caret-1-n' +" "+
|
||||
sort_prefix+'caret-1-s'
|
||||
)
|
||||
.addClass( columns[ colIdx ] == 'asc' ?
|
||||
sort_prefix+'triangle-1-n' : columns[ colIdx ] == 'desc' ?
|
||||
|
4
media/js/dataTables.jqueryui.min.js
vendored
4
media/js/dataTables.jqueryui.min.js
vendored
@ -4,6 +4,6 @@
|
||||
*/
|
||||
(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,d){b||(b=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(b,d).$;return a(d,b,b.document)}:a(jQuery,window,document)})(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,h,e,c){var f="css_right ui-icon ui-icon-carat-2-n-s",g=-1!==a.inArray("asc",e.asSorting),i=-1!==a.inArray("desc",e.asSorting);!e.bSortable||!g&&!i?f="":g&&!i?f="css_right ui-icon ui-icon-carat-1-n":!g&&i&&(f="css_right ui-icon ui-icon-carat-1-s");
|
||||
a("<div/>").addClass("DataTables_sort_wrapper").append(h.contents()).append(a("<span/>").addClass(c.sSortIcon+" "+f)).appendTo(h);a(b.nTable).on("order.dt",function(a,g,i,j){b===g&&(a=e.idx,h.removeClass(c.sSortAsc+" "+c.sSortDesc).addClass("asc"==j[a]?c.sSortAsc:"desc"==j[a]?c.sSortDesc:e.sSortingClass),h.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"==
|
||||
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,h,e,c){var f="css_right ui-icon ui-icon-caret-2-n-s",g=-1!==a.inArray("asc",e.asSorting),i=-1!==a.inArray("desc",e.asSorting);!e.bSortable||!g&&!i?f="":g&&!i?f="css_right ui-icon ui-icon-caret-1-n":!g&&i&&(f="css_right ui-icon ui-icon-caret-1-s");
|
||||
a("<div/>").addClass("DataTables_sort_wrapper").append(h.contents()).append(a("<span/>").addClass(c.sSortIcon+" "+f)).appendTo(h);a(b.nTable).on("order.dt",function(a,g,i,j){b===g&&(a=e.idx,h.removeClass(c.sSortAsc+" "+c.sSortDesc).addClass("asc"==j[a]?c.sSortAsc:"desc"==j[a]?c.sSortDesc:e.sSortingClass),h.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-caret-2-n-s css_right ui-icon ui-icon-caret-1-n css_right ui-icon ui-icon-caret-1-s").addClass("asc"==
|
||||
j[a]?"css_right ui-icon ui-icon-triangle-1-n":"desc"==j[a]?"css_right ui-icon ui-icon-triangle-1-s":f))})};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});
|
||||
|
Loading…
x
Reference in New Issue
Block a user