r3104 committed - dev selectables: renamed classes to ui-state-active and ui-state-focus...
Revision: 3104
Author: paul.bakaus
Date: Fri Aug 21 07:52:34 2009
Log: dev selectables: renamed classes to ui-state-active and
ui-state-focus, makes more sense this way
http://code.google.com/p/jquery-ui/source/detail?r=3104
Modified:
/branches/dev/selectable/demos/selectable/default.html
/branches/dev/selectable/demos/selectable/display-grid.html
/branches/dev/selectable/demos/selectable/draggable.html
/branches/dev/selectable/demos/selectable/serialize.html
/branches/dev/selectable/ui/ui.selectable.js
=======================================
--- /branches/dev/selectable/demos/selectable/default.html Fri Aug 21
05:56:01 2009
+++ /branches/dev/selectable/demos/selectable/default.html Fri Aug 21
07:52:34 2009
@@ -25,7 +25,7 @@
padding: 3px;
}
- #selectable .ui-focused {
+ #selectable .ui-state-focus {
/*
background: green;
font-weight: bold;
@@ -35,7 +35,7 @@
padding-bottom: 2px;
}
- #selectable .ui-selected {
+ #selectable .ui-state-active {
background: blue;
color: white;
border: 1px dotted black;
=======================================
--- /branches/dev/selectable/demos/selectable/display-grid.html Fri Aug 21
05:56:01 2009
+++ /branches/dev/selectable/demos/selectable/display-grid.html Fri Aug 21
07:52:34 2009
@@ -16,11 +16,11 @@
background: rgba(100, 100, 100, 0.2);
}
- #selectable .ui-focused {
+ #selectable .ui-state-focus {
background: #FECA40;
}
- #selectable .ui-selected {
+ #selectable .ui-state-active {
background: #F39814; color: white;
}
=======================================
--- /branches/dev/selectable/demos/selectable/draggable.html Fri Aug 21
05:56:01 2009
+++ /branches/dev/selectable/demos/selectable/draggable.html Fri Aug 21
07:52:34 2009
@@ -34,7 +34,12 @@
margin: 10px;
}
- #selectable img.ui-selected {
+ #selectable img.ui-state-focus {
+ margin: 10px;
+ border: 0;
+ }
+
+ #selectable img.ui-state-active {
border: 5px solid #fff;
margin: 5px;
}
=======================================
--- /branches/dev/selectable/demos/selectable/serialize.html Fri Aug 21
06:20:46 2009
+++ /branches/dev/selectable/demos/selectable/serialize.html Fri Aug 21
07:52:34 2009
@@ -14,8 +14,8 @@
border: 1px solid rgb(50, 50, 50);
background: rgba(100, 100, 100, 0.2);
}
- #selectable .ui-focused { background: #FECA40; }
- #selectable .ui-selected { background: #F39814; color: white; }
+ #selectable .ui-state-focus { background: #FECA40; }
+ #selectable .ui-state-active { background: #F39814; color: white; }
#selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height:
18px; width: 40%; }
</style>
=======================================
--- /branches/dev/selectable/ui/ui.selectable.js Fri Aug 21 06:29:54 2009
+++ /branches/dev/selectable/ui/ui.selectable.js Fri Aug 21 07:52:34 2009
@@ -18,7 +18,7 @@
var self = this;
this.items = $(this.options.filter, this.element);
- this.element.addClass("ui-selectable");
+ this.element.addClass("ui-selectable ui-widget");
//Set the currentFocus to the first item
this.currentFocus = this.items.eq(0);
@@ -37,6 +37,7 @@
var item = self._targetIsItem(event.target);
if (!item) {
+ //TODO: Maybe make this an option?
self._clearSelection();
self._endSelection(event, null);
return;
@@ -73,10 +74,10 @@
}
})
.bind('focus.selectable', function() {
- self.currentFocus.addClass('ui-focused');
+ self.currentFocus.addClass('ui-state-focus');
})
.bind('blur.selectable', function() {
- self.currentFocus.removeClass('ui-focused');
+ self.currentFocus.removeClass('ui-state-focus');
})
.bind('keydown.selectable', function(event) {
@@ -487,8 +488,8 @@
this.previousFocus = this.currentFocus;
this.currentFocus = $(item);
- this.previousFocus.removeClass('ui-focused');
- this.currentFocus.addClass('ui-focused');
+ this.previousFocus.removeClass('ui-state-focus');
+ this.currentFocus.addClass('ui-state-focus');
//Set and update the selection
var newlySelected = this._updateSelectionMouse(event);
@@ -509,8 +510,8 @@
this.previousFocus = this.currentFocus;
this.currentFocus = item;
- this.previousFocus.removeClass('ui-focused');
- this.currentFocus.addClass('ui-focused');
+ this.previousFocus.removeClass('ui-state-focus');
+ this.currentFocus.addClass('ui-state-focus');
//Set and update the selection
this._previousSelection = this._selection.slice();
@@ -592,7 +593,7 @@
},
//Should we really delete that?
- selectedClass: 'ui-selected'
+ selectedClass: 'ui-state-active'
}
});