Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
All: Moved version numbers into prototypes. Fixed #7436 - Widget: Sto…
…re version numbers on instances.
  • Loading branch information
scottgonzalez committed May 28, 2011
1 parent 2f32848 commit 6a5b21f
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 46 deletions.
2 changes: 1 addition & 1 deletion ui/jquery.ui.accordion.js
Expand Up @@ -15,6 +15,7 @@

// TODO: use ui-accordion-header-active class and fix styling
$.widget( "ui.accordion", {
version: "@VERSION",
options: {
active: 0,
animated: "slide",
Expand Down Expand Up @@ -432,7 +433,6 @@ $.widget( "ui.accordion", {
});

$.extend( $.ui.accordion, {
version: "@VERSION",
animations: {
slide: function( options, additions ) {
var showOverflow = options.toShow.css( "overflow" ),
Expand Down
2 changes: 1 addition & 1 deletion ui/jquery.ui.autocomplete.js
Expand Up @@ -19,6 +19,7 @@
var requestIndex = 0;

$.widget( "ui.autocomplete", {
version: "@VERSION",
defaultElement: "<input>",
options: {
appendTo: "body",
Expand Down Expand Up @@ -475,7 +476,6 @@ $.widget( "ui.autocomplete", {
});

$.extend( $.ui.autocomplete, {
version: "@VERSION",
escapeRegex: function( value ) {
return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
},
Expand Down
3 changes: 1 addition & 2 deletions ui/jquery.ui.button.js
Expand Up @@ -41,6 +41,7 @@ var lastActive, startXPos, startYPos, clickDragged,
};

$.widget( "ui.button", {
version: "@VERSION",
defaultElement: "<button>",
options: {
disabled: null,
Expand Down Expand Up @@ -412,6 +413,4 @@ $.widget( "ui.buttonset", {
}
});

$.ui.buttonset.version = "@VERSION";

}( jQuery ) );
3 changes: 1 addition & 2 deletions ui/jquery.ui.dialog.js
Expand Up @@ -36,6 +36,7 @@ var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ",
};

$.widget("ui.dialog", {
version: "@VERSION",
options: {
autoOpen: true,
buttons: {},
Expand Down Expand Up @@ -655,8 +656,6 @@ $.widget("ui.dialog", {
});

$.extend($.ui.dialog, {
version: "@VERSION",

uuid: 0,
maxZ: 0,

Expand Down
5 changes: 1 addition & 4 deletions ui/jquery.ui.draggable.js
Expand Up @@ -15,6 +15,7 @@
(function( $, undefined ) {

$.widget("ui.draggable", $.ui.mouse, {
version: "@VERSION",
widgetEventPrefix: "drag",
options: {
addClasses: true,
Expand Down Expand Up @@ -502,10 +503,6 @@ $.widget("ui.draggable", $.ui.mouse, {

});

$.extend($.ui.draggable, {
version: "@VERSION"
});

$.ui.plugin.add("draggable", "connectToSortable", {
start: function(event, ui) {

Expand Down
5 changes: 1 addition & 4 deletions ui/jquery.ui.droppable.js
Expand Up @@ -16,6 +16,7 @@
(function( $, undefined ) {

$.widget("ui.droppable", {
version: "@VERSION",
widgetEventPrefix: "drop",
options: {
accept: '*',
Expand Down Expand Up @@ -146,10 +147,6 @@ $.widget("ui.droppable", {

});

$.extend($.ui.droppable, {
version: "@VERSION"
});

$.ui.intersect = function(draggable, droppable, toleranceMode) {

if (!droppable.offset) return false;
Expand Down
3 changes: 1 addition & 2 deletions ui/jquery.ui.menu.js
Expand Up @@ -16,6 +16,7 @@
var idIncrement = 0;

$.widget("ui.menu", {
version: "@VERSION",
defaultElement: "<ul>",
delay: 150,
options: {
Expand Down Expand Up @@ -420,6 +421,4 @@ $.widget("ui.menu", {
}
});

$.ui.menu.version = "@VERSION";

}( jQuery ));
1 change: 1 addition & 0 deletions ui/jquery.ui.menubar.js
Expand Up @@ -18,6 +18,7 @@
// TODO when mixing clicking menus and keyboard navigation, focus handling is broken
// there has to be just one item that has tabindex
$.widget( "ui.menubar", {
version: "@VERSION",
options: {
buttons: false,
menuIcon: false
Expand Down
1 change: 1 addition & 0 deletions ui/jquery.ui.mouse.js
Expand Up @@ -18,6 +18,7 @@ $(document).mousedown(function(e) {
});

$.widget("ui.mouse", {
version: "@VERSION",
options: {
cancel: ':input,option',
distance: 1,
Expand Down
1 change: 1 addition & 0 deletions ui/jquery.ui.popup.js
Expand Up @@ -17,6 +17,7 @@
var idIncrement = 0;

$.widget( "ui.popup", {
version: "@VERSION",
options: {
position: {
my: "left top",
Expand Down
5 changes: 1 addition & 4 deletions ui/jquery.ui.progressbar.js
Expand Up @@ -14,6 +14,7 @@
(function( $, undefined ) {

$.widget( "ui.progressbar", {
version: "@VERSION",
options: {
value: 0,
max: 100
Expand Down Expand Up @@ -100,8 +101,4 @@ $.widget( "ui.progressbar", {
}
});

$.extend( $.ui.progressbar, {
version: "@VERSION"
});

})( jQuery );
5 changes: 1 addition & 4 deletions ui/jquery.ui.resizable.js
Expand Up @@ -15,6 +15,7 @@
(function( $, undefined ) {

$.widget("ui.resizable", $.ui.mouse, {
version: "@VERSION",
widgetEventPrefix: "resize",
options: {
alsoResize: false,
Expand Down Expand Up @@ -548,10 +549,6 @@ $.widget("ui.resizable", $.ui.mouse, {

});

$.extend($.ui.resizable, {
version: "@VERSION"
});

/*
* Resizable Extensions
*/
Expand Down
5 changes: 1 addition & 4 deletions ui/jquery.ui.selectable.js
Expand Up @@ -15,6 +15,7 @@
(function( $, undefined ) {

$.widget("ui.selectable", $.ui.mouse, {
version: "@VERSION",
options: {
appendTo: 'body',
autoRefresh: true,
Expand Down Expand Up @@ -259,8 +260,4 @@ $.widget("ui.selectable", $.ui.mouse, {

});

$.extend($.ui.selectable, {
version: "@VERSION"
});

})(jQuery);
6 changes: 1 addition & 5 deletions ui/jquery.ui.slider.js
Expand Up @@ -19,7 +19,7 @@
var numPages = 5;

$.widget( "ui.slider", $.ui.mouse, {

version: "@VERSION",
widgetEventPrefix: "slide",

options: {
Expand Down Expand Up @@ -659,8 +659,4 @@ $.widget( "ui.slider", $.ui.mouse, {

});

$.extend( $.ui.slider, {
version: "@VERSION"
});

}(jQuery));
5 changes: 1 addition & 4 deletions ui/jquery.ui.sortable.js
Expand Up @@ -15,6 +15,7 @@
(function( $, undefined ) {

$.widget("ui.sortable", $.ui.mouse, {
version: "@VERSION",
widgetEventPrefix: "sort",
options: {
appendTo: "parent",
Expand Down Expand Up @@ -1069,8 +1070,4 @@ $.widget("ui.sortable", $.ui.mouse, {

});

$.extend($.ui.sortable, {
version: "@VERSION"
});

})(jQuery);
3 changes: 1 addition & 2 deletions ui/jquery.ui.spinner.js
Expand Up @@ -14,6 +14,7 @@
(function( $ ) {

$.widget( "ui.spinner", {
version: "@VERSION",
defaultElement: "<input>",
widgetEventPrefix: "spin",
options: {
Expand Down Expand Up @@ -368,6 +369,4 @@ $.widget( "ui.spinner", {
}
});

$.ui.spinner.version = "@VERSION";

}( jQuery ) );
5 changes: 1 addition & 4 deletions ui/jquery.ui.tabs.js
Expand Up @@ -19,6 +19,7 @@ function getNextTabId() {
}

$.widget( "ui.tabs", {
version: "@VERSION",
options: {
active: null,
collapsible: false,
Expand Down Expand Up @@ -577,10 +578,6 @@ $.widget( "ui.tabs", {
}
});

$.extend( $.ui.tabs, {
version: "@VERSION"
});

// DEPRECATED
if ( $.uiBackCompat !== false ) {

Expand Down
3 changes: 1 addition & 2 deletions ui/jquery.ui.tooltip.js
Expand Up @@ -17,6 +17,7 @@
var increments = 0;

$.widget( "ui.tooltip", {
version: "@VERSION",
options: {
tooltipClass: null,
items: "[title]",
Expand Down Expand Up @@ -155,6 +156,4 @@ $.widget( "ui.tooltip", {
}
});

$.ui.tooltip.version = "@VERSION";

}( jQuery ) );
2 changes: 1 addition & 1 deletion ui/jquery.ui.widget.js
Expand Up @@ -49,7 +49,7 @@ $.widget = function( name, base, prototype ) {
if ( arguments.length ) {
this._createWidget( options, element );
}
}, $[ namespace ][ name ] );
}, $[ namespace ][ name ], { version: prototype.version } );

var basePrototype = new base();
// we need to make the options hash a property directly on the new instance
Expand Down

0 comments on commit 6a5b21f

Please sign in to comment.