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.v2 import DataMigration
from django.db import models
from apps.rss_feeds.models import Story, StoryAuthor
from apps.rss_feeds.models import Story, Feed
class Migration(DataMigration):
def forwards(self, orm):
i = 0
while True:
print i,
feeds = Feed.objects.all().order_by('-stories_per_month')
for feed in feeds:
print feed
sys.stdout.flush()
stories = Story.objects.all().select_related('story_author')[i:i+500]
if not stories:
break
else:
i += 500
for story in stories:
if story.story_author.author_name:
stories = Story.objects.select_related('story_author').filter(story_feed=feed)
for story in stories.iterator():
if not story.story_author_name and story.story_author.author_name:
story.story_author_name = story.story_author.author_name
story.save()
print story.story_date,
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)
* Dual licensed under the MIT (MIT-LICENSE.txt)
@ -7,11 +7,20 @@
*
* 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
$.ui = {
version: "1.8",
$.extend($.ui, {
version: "1.8.2",
// $.ui.plugin is deprecated. Use the proxy pattern instead.
plugin: {
@ -70,9 +79,13 @@ $.ui = {
},
keyCode: {
ALT: 18,
BACKSPACE: 8,
CAPS_LOCK: 20,
COMMA: 188,
COMMAND: 91,
COMMAND_LEFT: 91, // COMMAND
COMMAND_RIGHT: 93,
CONTROL: 17,
DELETE: 46,
DOWN: 40,
@ -82,6 +95,7 @@ $.ui = {
HOME: 36,
INSERT: 45,
LEFT: 37,
MENU: 93, // COMMAND_RIGHT
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
@ -95,9 +109,10 @@ $.ui = {
SHIFT: 16,
SPACE: 32,
TAB: 9,
UP: 38
UP: 38,
WINDOWS: 91 // COMMAND
}
};
});
//jQuery plugins
$.fn.extend({
@ -117,15 +132,13 @@ $.fn.extend({
enableSelection: function() {
return this
.attr('unselectable', 'off')
.css('MozUserSelect', '')
.unbind('selectstart.ui');
.css('MozUserSelect', '');
},
disableSelection: function() {
return this
.attr('unselectable', 'on')
.css('MozUserSelect', 'none')
.bind('selectstart.ui', function() { return false; });
.css('MozUserSelect', 'none');
},
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)
* Dual licensed under the MIT (MIT-LICENSE.txt)
@ -459,7 +459,7 @@ $.widget("ui.draggable", $.ui.mouse, {
});
$.extend($.ui.draggable, {
version: "1.8"
version: "1.8.2"
});
$.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)
* Dual licensed under the MIT (MIT-LICENSE.txt)
@ -147,7 +147,7 @@ $.widget("ui.droppable", {
});
$.extend($.ui.droppable, {
version: "1.8"
version: "1.8.2"
});
$.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)
* 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)
* Dual licensed under the MIT (MIT-LICENSE.txt)
@ -113,6 +113,10 @@ $.fn.position = function( options ) {
position.top -= elemHeight / 2;
}
// prevent fractions (see #5280)
position.left = parseInt( position.left );
position.top = parseInt( position.top );
$.each( [ "left", "top" ], function( i, dir ) {
if ( $.ui.position[ collision[i] ] ) {
$.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)
* Dual licensed under the MIT (MIT-LICENSE.txt)
@ -519,7 +519,7 @@ $.widget("ui.resizable", $.ui.mouse, {
});
$.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)
* Dual licensed under the MIT (MIT-LICENSE.txt)
@ -56,9 +57,7 @@ $.widget("ui.selectable", $.ui.mouse, {
this._mouseInit();
this.helper = $(document.createElement('div'))
.css({border:'1px dotted black'})
.addClass("ui-selectable-helper");
this.helper = $("<div class='ui-selectable-helper'></div>");
},
destroy: function() {
@ -121,14 +120,23 @@ $.widget("ui.selectable", $.ui.mouse, {
$(event.target).parents().andSelf().each(function() {
var selectee = $.data(this, "selectable-item");
if (selectee) {
selectee.$element.removeClass("ui-unselecting").addClass('ui-selecting');
selectee.unselecting = false;
selectee.selecting = true;
selectee.selected = true;
// selectable SELECTING callback
self._trigger("selecting", event, {
selecting: selectee.element
});
var doSelect = !event.metaKey || !selectee.$element.hasClass('ui-selected');
selectee.$element
.removeClass(doSelect ? "ui-unselecting" : "ui-selected")
.addClass(doSelect ? "ui-selecting" : "ui-unselecting");
selectee.unselecting = !doSelect;
selectee.selecting = doSelect;
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;
}
});
@ -255,7 +263,7 @@ $.widget("ui.selectable", $.ui.mouse, {
});
$.extend($.ui.selectable, {
version: "1.8"
version: "1.8.2"
});
})(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)
* Dual licensed under the MIT (MIT-LICENSE.txt)
@ -73,6 +73,18 @@ $.widget("ui.sortable", $.ui.mouse, {
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) {
if (this.reverting) {
@ -1049,7 +1061,7 @@ $.widget("ui.sortable", $.ui.mouse, {
});
$.extend($.ui.sortable, {
version: "1.8"
version: "1.8.2"
});
})(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)
* Dual licensed under the MIT (MIT-LICENSE.txt)
@ -155,7 +155,7 @@ $.Widget.prototype = {
.removeAttr( "aria-disabled" )
.removeClass(
this.widgetBaseClass + "-disabled " +
this.namespace + "-state-disabled" );
"ui-state-disabled" );
},
widget: function() {
@ -192,7 +192,7 @@ $.Widget.prototype = {
this.widget()
[ value ? "addClass" : "removeClass"](
this.widgetBaseClass + "-disabled" + " " +
this.namespace + "-state-disabled" )
"ui-state-disabled" )
.attr( "aria-disabled", value );
}