Skip to content
Permalink
Browse files

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 6a5b21fda2730a0650e0144658d47b9b01bffc64
@@ -15,6 +15,7 @@

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

$.extend( $.ui.accordion, {
version: "@VERSION",
animations: {
slide: function( options, additions ) {
var showOverflow = options.toShow.css( "overflow" ),
@@ -19,6 +19,7 @@
var requestIndex = 0;

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

$.extend( $.ui.autocomplete, {
version: "@VERSION",
escapeRegex: function( value ) {
return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
},
@@ -41,6 +41,7 @@ var lastActive, startXPos, startYPos, clickDragged,
};

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

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

}( jQuery ) );
@@ -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: {},
@@ -655,8 +656,6 @@ $.widget("ui.dialog", {
});

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

uuid: 0,
maxZ: 0,

@@ -15,6 +15,7 @@
(function( $, undefined ) {

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

});

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

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

@@ -16,6 +16,7 @@
(function( $, undefined ) {

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

});

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

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

if (!droppable.offset) return false;
@@ -16,6 +16,7 @@
var idIncrement = 0;

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

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

}( jQuery ));
@@ -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
@@ -18,6 +18,7 @@ $(document).mousedown(function(e) {
});

$.widget("ui.mouse", {
version: "@VERSION",
options: {
cancel: ':input,option',
distance: 1,
@@ -17,6 +17,7 @@
var idIncrement = 0;

$.widget( "ui.popup", {
version: "@VERSION",
options: {
position: {
my: "left top",
@@ -14,6 +14,7 @@
(function( $, undefined ) {

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

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

})( jQuery );
@@ -15,6 +15,7 @@
(function( $, undefined ) {

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

});

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

/*
* Resizable Extensions
*/
@@ -15,6 +15,7 @@
(function( $, undefined ) {

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

});

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

})(jQuery);
@@ -19,7 +19,7 @@
var numPages = 5;

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

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

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

});

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

}(jQuery));
@@ -15,6 +15,7 @@
(function( $, undefined ) {

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

});

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

})(jQuery);
@@ -14,6 +14,7 @@
(function( $ ) {

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

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

}( jQuery ) );
@@ -19,6 +19,7 @@ function getNextTabId() {
}

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

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

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

@@ -17,6 +17,7 @@
var increments = 0;

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

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

}( jQuery ) );
@@ -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

0 comments on commit 6a5b21f

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