Skip to content

Commit

Permalink
Making sortable datatableheaders unselectable
Browse files Browse the repository at this point in the history
By adding unselectable='on' to SORTABLE_HEADER_TEMPLATE
and changing the css of .yui3-skin-sam .yui3-datatable-sort-liner
  • Loading branch information
ItsAsbreuk committed Oct 3, 2012
1 parent be26135 commit f4812eb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/datatable/assets/skins/night/datatable-sort-skin.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
position: relative; position: relative;
padding-right: 15px; padding-right: 15px;
position: relative; position: relative;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
} }


.yui3-skin-night .yui3-datatable-sort-indicator { .yui3-skin-night .yui3-datatable-sort-indicator {
Expand Down
6 changes: 6 additions & 0 deletions src/datatable/assets/skins/sam/datatable-sort-skin.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
position: relative; position: relative;
padding-right: 15px; padding-right: 15px;
position: relative; position: relative;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
} }


.yui3-skin-sam .yui3-datatable-sort-indicator { .yui3-skin-sam .yui3-datatable-sort-indicator {
Expand Down
2 changes: 1 addition & 1 deletion src/datatable/js/sort.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Y.mix(Sortable.prototype, {
@value '<div class="{className}" tabindex="0"><span class="{indicatorClass}"></span></div>' @value '<div class="{className}" tabindex="0"><span class="{indicatorClass}"></span></div>'
@since 3.5.0 @since 3.5.0
**/ **/
SORTABLE_HEADER_TEMPLATE: '<div class="{className}" tabindex="0"><span class="{indicatorClass}"></span></div>', SORTABLE_HEADER_TEMPLATE: '<div class="{className}" tabindex="0" unselectable="on"><span class="{indicatorClass}"></span></div>',


/** /**
Reverse the current sort direction of one or more fields currently being Reverse the current sort direction of one or more fields currently being
Expand Down

0 comments on commit f4812eb

Please sign in to comment.