r813 - in branches/1.7: . tests/visual
Author: rdworth
Date: Thu Oct 23 04:15:27 2008
New Revision: 813
Modified:
branches/1.7/tests/visual/keyboard_selection.html
branches/1.7/ui.selectable.js
Log:
adjusted default class names and option names for selectedClass and
focusedClass
Modified: branches/1.7/tests/visual/keyboard_selection.html
==============================================================================
--- branches/1.7/tests/visual/keyboard_selection.html (original)
+++ branches/1.7/tests/visual/keyboard_selection.html Thu Oct 23 04:15:27
2008
@@ -6,16 +6,16 @@
<title>keyboard_selection</title>
<script type="text/javascript"
src="../../../../trunk/jquery-1.2.6.js"></script>
<script type="text/javascript" src="../../ui.core.js"></script>
- <script type="text/javascript"
src="../../ui.keyboardSelectable.js"></script>
+ <script type="text/javascript" src="../../ui.selectable.js"></script>
<style type="text/css" media="screen">
- .selected {
+ .ui-selected {
background: green;
font-weight: bold;
}
- .focussed {
+ .ui-focused {
border: 2px solid red;
}
Modified: branches/1.7/ui.selectable.js
==============================================================================
--- branches/1.7/ui.selectable.js (original)
+++ branches/1.7/ui.selectable.js Thu Oct 23 04:15:27 2008
@@ -40,10 +40,10 @@
e.preventDefault();
})
.bind('focus.selectable', function() {
- self.currentFocus.addClass(self.options.focusClass);
+ self.currentFocus.addClass(self.options.focusedClass);
})
.bind('blur.selectable', function() {
- self.currentFocus.removeClass(self.options.focusClass);
+ self.currentFocus.removeClass(self.options.focusedClass);
})
.bind('keydown.selectable', function(e) {
@@ -67,7 +67,7 @@
for (var i = this._selection.length - 1; i >= 0; i--){
this._selection[i]
- .removeClass(this.options.selectClass)
+ .removeClass(this.options.selectedClass)
.data('ui-selected', false);
};
@@ -91,7 +91,7 @@
this._selection.push(item);
this.latestSelection = item;
item
- .addClass(this.options.selectClass)
+ .addClass(this.options.selectedClass)
.data('ui-selected', true);
},
@@ -101,7 +101,7 @@
for (var i=0; i < this._selection.length; i++) {
if(this._selection[i][0] == item[0]) {
this._selection[i]
- .removeClass(this.options.selectClass)
+ .removeClass(this.options.selectedClass)
.data('ui-selected', false);
this._selection.splice(i,1);
break;
@@ -182,8 +182,8 @@
this.previousFocus = this.currentFocus;
this.currentFocus = $(item);
- this.previousFocus.removeClass(this.options.focusClass);
- this.currentFocus.addClass(this.options.focusClass);
+ this.previousFocus.removeClass(this.options.focusedClass);
+ this.currentFocus.addClass(this.options.focusedClass);
//Set and update the selection
this._updateSelectionMouse(e);
@@ -203,8 +203,8 @@
this.previousFocus = this.currentFocus;
this.currentFocus = this.currentFocus[dir]();
- this.previousFocus.removeClass(this.options.focusClass);
- this.currentFocus.addClass(this.options.focusClass);
+ this.previousFocus.removeClass(this.options.focusedClass);
+ this.currentFocus.addClass(this.options.focusedClass);
//Set and update the selection
this._updateSelection(e, dir);
@@ -236,8 +236,8 @@
defaults: {
multiple: true,
filter: '> *',
- selectClass: 'selected',
- focusClass: 'focussed'
+ selectedClass: 'ui-selected',
+ focusedClass: 'ui-focused'
}
});