mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
All: Moved version numbers into prototypes. Fixed #7436 - Widget: Store version numbers on instances.
This commit is contained in:
parent
2f3284811c
commit
6a5b21fda2
2
ui/jquery.ui.accordion.js
vendored
2
ui/jquery.ui.accordion.js
vendored
@ -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" ),
|
||||
|
2
ui/jquery.ui.autocomplete.js
vendored
2
ui/jquery.ui.autocomplete.js
vendored
@ -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, "\\$&");
|
||||
},
|
||||
|
3
ui/jquery.ui.button.js
vendored
3
ui/jquery.ui.button.js
vendored
@ -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 ) );
|
||||
|
3
ui/jquery.ui.dialog.js
vendored
3
ui/jquery.ui.dialog.js
vendored
@ -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,
|
||||
|
||||
|
5
ui/jquery.ui.draggable.js
vendored
5
ui/jquery.ui.draggable.js
vendored
@ -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) {
|
||||
|
||||
|
5
ui/jquery.ui.droppable.js
vendored
5
ui/jquery.ui.droppable.js
vendored
@ -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;
|
||||
|
3
ui/jquery.ui.menu.js
vendored
3
ui/jquery.ui.menu.js
vendored
@ -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 ));
|
||||
|
1
ui/jquery.ui.menubar.js
vendored
1
ui/jquery.ui.menubar.js
vendored
@ -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
|
||||
|
1
ui/jquery.ui.mouse.js
vendored
1
ui/jquery.ui.mouse.js
vendored
@ -18,6 +18,7 @@ $(document).mousedown(function(e) {
|
||||
});
|
||||
|
||||
$.widget("ui.mouse", {
|
||||
version: "@VERSION",
|
||||
options: {
|
||||
cancel: ':input,option',
|
||||
distance: 1,
|
||||
|
1
ui/jquery.ui.popup.js
vendored
1
ui/jquery.ui.popup.js
vendored
@ -17,6 +17,7 @@
|
||||
var idIncrement = 0;
|
||||
|
||||
$.widget( "ui.popup", {
|
||||
version: "@VERSION",
|
||||
options: {
|
||||
position: {
|
||||
my: "left top",
|
||||
|
5
ui/jquery.ui.progressbar.js
vendored
5
ui/jquery.ui.progressbar.js
vendored
@ -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 );
|
||||
|
5
ui/jquery.ui.resizable.js
vendored
5
ui/jquery.ui.resizable.js
vendored
@ -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
|
||||
*/
|
||||
|
5
ui/jquery.ui.selectable.js
vendored
5
ui/jquery.ui.selectable.js
vendored
@ -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);
|
||||
|
6
ui/jquery.ui.slider.js
vendored
6
ui/jquery.ui.slider.js
vendored
@ -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));
|
||||
|
5
ui/jquery.ui.sortable.js
vendored
5
ui/jquery.ui.sortable.js
vendored
@ -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);
|
||||
|
3
ui/jquery.ui.spinner.js
vendored
3
ui/jquery.ui.spinner.js
vendored
@ -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 ) );
|
||||
|
5
ui/jquery.ui.tabs.js
vendored
5
ui/jquery.ui.tabs.js
vendored
@ -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 ) {
|
||||
|
||||
|
3
ui/jquery.ui.tooltip.js
vendored
3
ui/jquery.ui.tooltip.js
vendored
@ -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 ) );
|
||||
|
2
ui/jquery.ui.widget.js
vendored
2
ui/jquery.ui.widget.js
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user