jQuery UI 1.8 -> 1.8.2

This commit is contained in:
Samuel Clay 2010-07-08 20:06:22 -04:00
parent a1e12a48ab
commit 9e65a4931b
11 changed files with 483 additions and 396 deletions

View file

@ -4,24 +4,21 @@ import sys
from south.db import db from south.db import db
from south.v2 import DataMigration from south.v2 import DataMigration
from django.db import models from django.db import models
from apps.rss_feeds.models import Story, StoryAuthor from apps.rss_feeds.models import Story, Feed
class Migration(DataMigration): class Migration(DataMigration):
def forwards(self, orm): def forwards(self, orm):
i = 0 feeds = Feed.objects.all().order_by('-stories_per_month')
while True: for feed in feeds:
print i, print feed
sys.stdout.flush() sys.stdout.flush()
stories = Story.objects.all().select_related('story_author')[i:i+500] stories = Story.objects.select_related('story_author').filter(story_feed=feed)
if not stories: for story in stories.iterator():
break if not story.story_author_name and story.story_author.author_name:
else:
i += 500
for story in stories:
if story.story_author.author_name:
story.story_author_name = story.story_author.author_name story.story_author_name = story.story_author.author_name
story.save() story.save()
print story.story_date,
def backwards(self, orm): def backwards(self, orm):

View file

@ -1,5 +1,5 @@
/*! /*!
* jQuery UI 1.8 * jQuery UI 1.8.2
* *
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) * Dual licensed under the MIT (MIT-LICENSE.txt)
@ -7,11 +7,20 @@
* *
* http://docs.jquery.com/UI * http://docs.jquery.com/UI
*/ */
;jQuery.ui || (function($) {
(function($) {
// prevent duplicate loading
// this is only a problem because we proxy existing functions
// and we don't want to double proxy them
$.ui = $.ui || {};
if ($.ui.version) {
return;
}
//Helper functions and ui object //Helper functions and ui object
$.ui = { $.extend($.ui, {
version: "1.8", version: "1.8.2",
// $.ui.plugin is deprecated. Use the proxy pattern instead. // $.ui.plugin is deprecated. Use the proxy pattern instead.
plugin: { plugin: {
@ -70,9 +79,13 @@ $.ui = {
}, },
keyCode: { keyCode: {
ALT: 18,
BACKSPACE: 8, BACKSPACE: 8,
CAPS_LOCK: 20, CAPS_LOCK: 20,
COMMA: 188, COMMA: 188,
COMMAND: 91,
COMMAND_LEFT: 91, // COMMAND
COMMAND_RIGHT: 93,
CONTROL: 17, CONTROL: 17,
DELETE: 46, DELETE: 46,
DOWN: 40, DOWN: 40,
@ -82,6 +95,7 @@ $.ui = {
HOME: 36, HOME: 36,
INSERT: 45, INSERT: 45,
LEFT: 37, LEFT: 37,
MENU: 93, // COMMAND_RIGHT
NUMPAD_ADD: 107, NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110, NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111, NUMPAD_DIVIDE: 111,
@ -95,9 +109,10 @@ $.ui = {
SHIFT: 16, SHIFT: 16,
SPACE: 32, SPACE: 32,
TAB: 9, TAB: 9,
UP: 38 UP: 38,
WINDOWS: 91 // COMMAND
} }
}; });
//jQuery plugins //jQuery plugins
$.fn.extend({ $.fn.extend({
@ -117,15 +132,13 @@ $.fn.extend({
enableSelection: function() { enableSelection: function() {
return this return this
.attr('unselectable', 'off') .attr('unselectable', 'off')
.css('MozUserSelect', '') .css('MozUserSelect', '');
.unbind('selectstart.ui');
}, },
disableSelection: function() { disableSelection: function() {
return this return this
.attr('unselectable', 'on') .attr('unselectable', 'on')
.css('MozUserSelect', 'none') .css('MozUserSelect', 'none');
.bind('selectstart.ui', function() { return false; });
}, },
scrollParent: function() { scrollParent: function() {

View file

@ -1,5 +1,5 @@
/* /*
* jQuery UI Draggable 1.8 * jQuery UI Draggable 1.8.2
* *
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) * Dual licensed under the MIT (MIT-LICENSE.txt)
@ -459,7 +459,7 @@ $.widget("ui.draggable", $.ui.mouse, {
}); });
$.extend($.ui.draggable, { $.extend($.ui.draggable, {
version: "1.8" version: "1.8.2"
}); });
$.ui.plugin.add("draggable", "connectToSortable", { $.ui.plugin.add("draggable", "connectToSortable", {

View file

@ -1,5 +1,5 @@
/* /*
* jQuery UI Droppable 1.8 * jQuery UI Droppable 1.8.2
* *
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) * Dual licensed under the MIT (MIT-LICENSE.txt)
@ -147,7 +147,7 @@ $.widget("ui.droppable", {
}); });
$.extend($.ui.droppable, { $.extend($.ui.droppable, {
version: "1.8" version: "1.8.2"
}); });
$.ui.intersect = function(draggable, droppable, toleranceMode) { $.ui.intersect = function(draggable, droppable, toleranceMode) {

View file

@ -1,5 +1,5 @@
/*! /*!
* jQuery UI Mouse 1.8 * jQuery UI Mouse 1.8.2
* *
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) * Dual licensed under the MIT (MIT-LICENSE.txt)

View file

@ -1,5 +1,5 @@
/* /*
* jQuery UI Position 1.8 * jQuery UI Position 1.8.2
* *
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) * Dual licensed under the MIT (MIT-LICENSE.txt)
@ -113,6 +113,10 @@ $.fn.position = function( options ) {
position.top -= elemHeight / 2; position.top -= elemHeight / 2;
} }
// prevent fractions (see #5280)
position.left = parseInt( position.left );
position.top = parseInt( position.top );
$.each( [ "left", "top" ], function( i, dir ) { $.each( [ "left", "top" ], function( i, dir ) {
if ( $.ui.position[ collision[i] ] ) { if ( $.ui.position[ collision[i] ] ) {
$.ui.position[ collision[i] ][ dir ]( position, { $.ui.position[ collision[i] ][ dir ]( position, {

View file

@ -1,5 +1,5 @@
/* /*
* jQuery UI Resizable 1.8 * jQuery UI Resizable 1.8.2
* *
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) * Dual licensed under the MIT (MIT-LICENSE.txt)
@ -519,7 +519,7 @@ $.widget("ui.resizable", $.ui.mouse, {
}); });
$.extend($.ui.resizable, { $.extend($.ui.resizable, {
version: "1.8" version: "1.8.2"
}); });
/* /*

View file

@ -1,5 +1,6 @@
/* /*
* jQuery UI Selectable 1.8 * jQuery UI Selectable 1.8.2
* *
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) * Dual licensed under the MIT (MIT-LICENSE.txt)
@ -56,9 +57,7 @@ $.widget("ui.selectable", $.ui.mouse, {
this._mouseInit(); this._mouseInit();
this.helper = $(document.createElement('div')) this.helper = $("<div class='ui-selectable-helper'></div>");
.css({border:'1px dotted black'})
.addClass("ui-selectable-helper");
}, },
destroy: function() { destroy: function() {
@ -121,14 +120,23 @@ $.widget("ui.selectable", $.ui.mouse, {
$(event.target).parents().andSelf().each(function() { $(event.target).parents().andSelf().each(function() {
var selectee = $.data(this, "selectable-item"); var selectee = $.data(this, "selectable-item");
if (selectee) { if (selectee) {
selectee.$element.removeClass("ui-unselecting").addClass('ui-selecting'); var doSelect = !event.metaKey || !selectee.$element.hasClass('ui-selected');
selectee.unselecting = false; selectee.$element
selectee.selecting = true; .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
selectee.selected = true; .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
// selectable SELECTING callback selectee.unselecting = !doSelect;
self._trigger("selecting", event, { selectee.selecting = doSelect;
selecting: selectee.element selectee.selected = doSelect;
}); // selectable (UN)SELECTING callback
if (doSelect) {
self._trigger("selecting", event, {
selecting: selectee.element
});
} else {
self._trigger("unselecting", event, {
unselecting: selectee.element
});
}
return false; return false;
} }
}); });
@ -255,7 +263,7 @@ $.widget("ui.selectable", $.ui.mouse, {
}); });
$.extend($.ui.selectable, { $.extend($.ui.selectable, {
version: "1.8" version: "1.8.2"
}); });
})(jQuery); })(jQuery);

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
/* /*
* jQuery UI Sortable 1.8 * jQuery UI Sortable 1.8.2
* *
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) * Dual licensed under the MIT (MIT-LICENSE.txt)
@ -73,6 +73,18 @@ $.widget("ui.sortable", $.ui.mouse, {
return this; return this;
}, },
_setOption: function(key, value){
if ( key === "disabled" ) {
this.options[ key ] = value;
this.widget()
[ value ? "addClass" : "removeClass"]( "ui-sortable-disabled" );
} else {
// Don't call widget base _setOption for disable as it adds ui-state-disabled class
$.Widget.prototype._setOption.apply(this, arguments);
}
},
_mouseCapture: function(event, overrideHandle) { _mouseCapture: function(event, overrideHandle) {
if (this.reverting) { if (this.reverting) {
@ -1049,7 +1061,7 @@ $.widget("ui.sortable", $.ui.mouse, {
}); });
$.extend($.ui.sortable, { $.extend($.ui.sortable, {
version: "1.8" version: "1.8.2"
}); });
})(jQuery); })(jQuery);

View file

@ -1,5 +1,5 @@
/*! /*!
* jQuery UI Widget 1.8 * jQuery UI Widget 1.8.2
* *
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) * Dual licensed under the MIT (MIT-LICENSE.txt)
@ -155,7 +155,7 @@ $.Widget.prototype = {
.removeAttr( "aria-disabled" ) .removeAttr( "aria-disabled" )
.removeClass( .removeClass(
this.widgetBaseClass + "-disabled " + this.widgetBaseClass + "-disabled " +
this.namespace + "-state-disabled" ); "ui-state-disabled" );
}, },
widget: function() { widget: function() {
@ -192,7 +192,7 @@ $.Widget.prototype = {
this.widget() this.widget()
[ value ? "addClass" : "removeClass"]( [ value ? "addClass" : "removeClass"](
this.widgetBaseClass + "-disabled" + " " + this.widgetBaseClass + "-disabled" + " " +
this.namespace + "-state-disabled" ) "ui-state-disabled" )
.attr( "aria-disabled", value ); .attr( "aria-disabled", value );
} }