Skip to content
Permalink
Browse files

whitespace

  • Loading branch information...
rdworth committed Sep 20, 2008
1 parent 1285c6e commit 0bae0870d920842f10322763c66bc59541b9158c
Showing with 371 additions and 394 deletions.
  1. +2 −2 ui/ui.accordion.js
  2. +27 −28 ui/ui.autocomplete.js
  3. +48 −48 ui/ui.colorpicker.js
  4. +55 −55 ui/ui.datepicker.js
  5. +43 −50 ui/ui.draggable.js
  6. +6 −6 ui/ui.droppable.js
  7. +27 −27 ui/ui.progressbar.js
  8. +5 −7 ui/ui.resizable.js
  9. +13 −13 ui/ui.selectable.js
  10. +22 −29 ui/ui.slider.js
  11. +67 −70 ui/ui.sortable.js
  12. +0 −3 ui/ui.spinner.js
  13. +56 −56 ui/ui.tabs.js
@@ -60,7 +60,7 @@ $.widget("ui.accordion", {
maxHeight = Math.max(maxHeight, $(this).outerHeight());
}).height(maxHeight);
}

options.headers
.not(options.active || "")
.next()
@@ -214,7 +214,7 @@ function clickHandler(event) {

options.active = clickedActive ? $([]) : clicked;
toggle.call(this, toShow, toHide, data, clickedActive, down );

return false;
};

@@ -15,7 +15,7 @@
$.widget("ui.autocomplete", {

_init: function() {

$.extend(this.options, {
delay: this.options.url ? $.Autocompleter.defaults.delay : 10,
max: !this.options.scroll ? 10 : 150,
@@ -46,7 +46,7 @@ $.widget("ui.autocomplete", {
});

$.Autocompleter = function(input, options) {

var KEY = {
UP: 38,
DOWN: 40,
@@ -59,11 +59,11 @@ $.Autocompleter = function(input, options) {
PAGEDOWN: 34,
BACKSPACE: 8
};

// Create $ object for input element
var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
if(options.result) $input.bind('result.autocomplete', options.result);

var timeout;
var previousValue = "";
var cache = $.Autocompleter.Cache(options);
@@ -89,7 +89,7 @@ $.Autocompleter = function(input, options) {
// track last key pressed
lastKeyPressCode = event.keyCode;
switch(event.keyCode) {

case KEY.UP:
event.preventDefault();
if ( select.visible() ) {
@@ -98,7 +98,7 @@ $.Autocompleter = function(input, options) {
onChange(0, true);
}
break;

case KEY.DOWN:
event.preventDefault();
if ( select.visible() ) {
@@ -107,7 +107,7 @@ $.Autocompleter = function(input, options) {
onChange(0, true);
}
break;

case KEY.PAGEUP:
event.preventDefault();
if ( select.visible() ) {
@@ -116,7 +116,7 @@ $.Autocompleter = function(input, options) {
onChange(0, true);
}
break;

case KEY.PAGEDOWN:
event.preventDefault();
if ( select.visible() ) {
@@ -137,11 +137,11 @@ $.Autocompleter = function(input, options) {
return false;
}
break;

case KEY.ESC:
select.hide();
break;

default:
clearTimeout(timeout);
timeout = setTimeout(onChange, options.delay);
@@ -193,7 +193,6 @@ $.Autocompleter = function(input, options) {
$(input.form).unbind(".autocomplete");
});


function selectCurrent() {
var selected = select.selected();
if( !selected )
@@ -274,12 +273,12 @@ $.Autocompleter = function(input, options) {
$.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length);
}
};

function hideResults() {
clearTimeout(timeout);
timeout = setTimeout(hideResultsNow, 200);
};

function hideResultsNow() {
var wasVisible = select.visible();
select.hide();
@@ -304,7 +303,7 @@ $.Autocompleter = function(input, options) {
// position cursor at end of input field
$.Autocompleter.Selection(input, input.value.length, input.value.length);
};

function receiveData(q, data) {
if ( data && data.length && hasFocus ) {
stopLoading();
@@ -315,7 +314,7 @@ $.Autocompleter = function(input, options) {
hideResultsNow();
}
};

function request(term, success, failure) {
if (!options.matchCase)
term = term.toLowerCase();
@@ -352,11 +351,11 @@ $.Autocompleter = function(input, options) {
}
});
}

else if (options.source && typeof options.source == 'function') {
var resultData = options.source(term);
var parsed = (options.parse) ? options.parse(resultData) : resultData;

cache.add(term, parsed);
success(term, parsed);
} else {
@@ -382,11 +381,11 @@ $.Autocompleter = function(input, options) {
}
return parsed;
};

function stopLoading() {
$input.removeClass(options.loadingClass);
};

};

$.Autocompleter.defaults = {
@@ -421,7 +420,7 @@ $.extend($.ui.autocomplete, {
});

$.Autocompleter.Cache = function(options) {

var data = {};
var length = 0;

@@ -448,7 +447,7 @@ $.Autocompleter.Cache = function(options) {
// track the matches
var stMatchSets = {},
nullData = 0;

// no url was specified, we need to adjust the cache length to make sure it fits the local data store
if( !options.url ) options.cacheLength = 1;

@@ -464,12 +463,12 @@ $.Autocompleter.Cache = function(options) {
var value = options.formatMatch(rawValue, i+1, options.data.length);
if ( value === false )
continue;

var firstChar = value.charAt(0).toLowerCase();
// if no lookup array for this character exists, look it up now
if( !stMatchSets[firstChar] )
stMatchSets[firstChar] = [];

// if the match is a string
var row = {
value: value,
@@ -479,13 +478,13 @@ $.Autocompleter.Cache = function(options) {

// push the current match into the set list
stMatchSets[firstChar].push(row);

// keep track of minChars zero items
if ( nullData++ < options.max ) {
stMatchSets[""].push(row);
}
};

// add the data items to the cache
$.each(stMatchSets, function(i, value) {
// increase the cache size
@@ -578,7 +577,7 @@ $.Autocompleter.Select = function (options, input, select, config) {
.addClass(options.resultsClass)
.css("position", "absolute")
.appendTo(document.body);

list = $("<ul/>").appendTo(element).mouseover( function(event) {
if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
@@ -598,7 +597,7 @@ $.Autocompleter.Select = function (options, input, select, config) {

if( options.width > 0 )
element.css("width", options.width);

needsInit = false;
}

@@ -611,7 +610,7 @@ $.Autocompleter.Select = function (options, input, select, config) {
return [];
return element;
}

function moveSelect(step) {
listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
movePosition(step);

0 comments on commit 0bae087

Please sign in to comment.
You can’t perform that action at this time.