r835 - branches/experimental/ui

r835 - branches/experimental/ui


Author: rdworth
Date: Thu Oct 23 18:14:09 2008
New Revision: 835
Modified:
branches/experimental/ui/ui.selectable.js
Log:
whitespace
Modified: branches/experimental/ui/ui.selectable.js
==============================================================================
--- branches/experimental/ui/ui.selectable.js    (original)
+++ branches/experimental/ui/ui.selectable.js    Thu Oct 23 18:14:09 2008
@@ -29,10 +29,10 @@
                    
                    var item;
                    $(e.target).parents().andSelf().each(function() {
-                        if($(self.options.filter, self.element).index(this) != -1) item =
this;
+                        if ($(self.options.filter, self.element).index(this) != -1) item =
this;
                    });
                    
-                    if(!item)
+                    if (!item)
                        return;
                    
                    self._select(e, item);
@@ -47,12 +47,12 @@
                })
                .bind('keydown.selectable', function(e) {
                    
-                    if(e.keyCode == $.keyCode.DOWN || e.keyCode == $.keyCode.RIGHT) {
+                    if (e.keyCode == $.keyCode.DOWN || e.keyCode == $.keyCode.RIGHT) {
                        self.selectNext(e);
                        e.preventDefault();
                    }
                        
-                    if(e.keyCode == $.keyCode.UP || e.keyCode == $.keyCode.LEFT) {
+                    if (e.keyCode == $.keyCode.UP || e.keyCode == $.keyCode.LEFT) {
                        self.selectPrevious(e);
                        e.preventDefault();
                    }
@@ -76,7 +76,7 @@
        },
        
        _toggleSelection: function(item) {
-            if(item.data('ui-selected')) {
+            if (item.data('ui-selected')) {
                this._removeFromSelection(item);
            } else {
                this._addToSelection(item);
@@ -85,7 +85,7 @@
        
        _addToSelection: function(item) {
            
-            if(item.data('ui-selected'))
+            if (item.data('ui-selected'))
                return;
            
            this._selection.push(item);
@@ -99,7 +99,7 @@
        _removeFromSelection: function(item) {
            
            for (var i=0; i < this._selection.length; i++) {
-                if(this._selection[i][0] == item[0]) {
+                if (this._selection[i][0] == item[0]) {
                    this._selection[i]
                        .removeClass(this.options.selectedClass)
                        .data('ui-selected', false);
@@ -112,7 +112,7 @@
        
        _updateSelectionMouse: function(e) {
            
-            if(e.shiftKey && this.options.multiple) {
+            if (e.shiftKey && this.options.multiple) {
                
                //Clear the previous selection to make room for a shift selection
                this._clearSelection();
@@ -129,7 +129,7 @@
                
            } else {
                
-                if(e.ctrlKey || e.metaKey) {
+                if (e.ctrlKey || e.metaKey) {
                    this._toggleSelection(this.currentFocus);
                } else {
                    this._clearSelection();
@@ -143,14 +143,14 @@
        
        _updateSelection: function(e, dir) {
            
-            if(e.shiftKey && this.options.multiple) {
+            if (e.shiftKey && this.options.multiple) {
                
-                if(this.currentFocus.data('ui-selected')) {
+                if (this.currentFocus.data('ui-selected')) {
                    this._removeFromSelection(this.previousFocus);
                } else {
                    
                    var dir2 = $(this.options.filter,
this.element).index(this.latestSelection[0]) > $(this.options.filter,
this.element).index(this.currentFocus[0]) ? 'next' : 'prev';
-                    if(!this.previousFocus.data('ui-selected')) {
+                    if (!this.previousFocus.data('ui-selected')) {
                        var i = dir == dir2 ? this.previousFocus[dir2]() :
this.previousFocus;
                        while(i.length && !i.data('ui-selected')) {
                            this._addToSelection(i);
@@ -165,7 +165,7 @@
            } else {
                
                //If the CTRL or Apple/Win key is pressed, only set focus
-                if(e.ctrlKey || e.metaKey)
+                if (e.ctrlKey || e.metaKey)
                    return;
                
                this._clearSelection();
@@ -196,7 +196,7 @@
        _selectAdjacent: function(e, dir) {
            
            //Bail if there's no previous/next item
-            if(!this.currentFocus[dir]().length)
+            if (!this.currentFocus[dir]().length)
                return;
            
            //Set the current selection to the previous/next item