Permalink
Browse files

Changed sorted columns style to support jquery-ui css framework inste…

…ad of custom icons
  • Loading branch information...
1 parent b3b0de5 commit f61453c1077af49804b8c0d3f000dfd12138b6b7 @gigi81 committed Dec 27, 2011
Showing with 7 additions and 15 deletions.
  1. +1 −1 examples/example13-getItem-sorting.html
  2. +4 −12 slick.grid.css
  3. +2 −2 slick.grid.js
View
2 examples/example13-getItem-sorting.html
@@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SlickGrid example 13: Indexed Sorting using Functional Data Provider</title>
<link rel="stylesheet" href="../slick.grid.css" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="examples.css" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen" charset="utf-8" />
<style>
html,body { margin:0; padding:0; background-color:White; overflow:auto; }
body { font:11px Helvetica,Arial,sans-serif; }
View
16 slick.grid.css
@@ -45,18 +45,10 @@ classes should alter those!
}
.slick-sort-indicator {
- display: inline-block;
- width: 8px;
- height: 5px;
- margin-left: 4px;
-}
-
-.slick-sort-indicator-desc {
- background: url(images/sort-desc.gif);
-}
-
-.slick-sort-indicator-asc {
- background: url(images/sort-asc.gif);
+ position: absolute;
+ right: 10px;
+ top: 4px;
+ height: 100%;
}
.slick-resizable-handle {
View
4 slick.grid.js
@@ -891,13 +891,13 @@ if (typeof Slick === "undefined") {
var columnIndex = getColumnIndex(sortColumnId);
$headers.children().removeClass("slick-header-column-sorted");
- $headers.find(".slick-sort-indicator").removeClass("slick-sort-indicator-asc slick-sort-indicator-desc");
+ $headers.find(".slick-sort-indicator").removeClass("ui-icon ui-icon-triangle-1-n ui-icon-triangle-1-s");
if (columnIndex != null) {
$headers.children().eq(columnIndex)
.addClass("slick-header-column-sorted")
.find(".slick-sort-indicator")
- .addClass(sortAsc ? "slick-sort-indicator-asc" : "slick-sort-indicator-desc");
+ .addClass(sortAsc ? "ui-icon ui-icon-triangle-1-s" : "ui-icon ui-icon-triangle-1-n");
}
}

0 comments on commit f61453c

Please sign in to comment.