mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Accordion, Autocomplete, Tabs: Separate callbacks and options in the defaults.
This commit is contained in:
parent
6326da3fdb
commit
c4c36e557e
@ -10,6 +10,10 @@ commonWidgetTests( "accordion", {
|
|||||||
icons: {
|
icons: {
|
||||||
"activeHeader": "ui-icon-triangle-1-s",
|
"activeHeader": "ui-icon-triangle-1-s",
|
||||||
"header": "ui-icon-triangle-1-e"
|
"header": "ui-icon-triangle-1-e"
|
||||||
}
|
},
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
activate: null,
|
||||||
|
beforeActivate: null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -16,6 +16,12 @@ commonWidgetTests( "accordion", {
|
|||||||
"headerSelected": "ui-icon-triangle-1-s"
|
"headerSelected": "ui-icon-triangle-1-s"
|
||||||
},
|
},
|
||||||
navigation: false,
|
navigation: false,
|
||||||
navigationFilter: function() {}
|
navigationFilter: function() {},
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
activate: null,
|
||||||
|
beforeActivate: null,
|
||||||
|
change: null,
|
||||||
|
changestart: null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
/*
|
commonWidgetTests( "autocomplete", {
|
||||||
* autocomplete_defaults.js
|
defaults: {
|
||||||
*/
|
|
||||||
|
|
||||||
var autocomplete_defaults = {
|
|
||||||
appendTo: "body",
|
appendTo: "body",
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
delay: 300,
|
delay: 300,
|
||||||
@ -13,7 +10,15 @@ var autocomplete_defaults = {
|
|||||||
at: "left bottom",
|
at: "left bottom",
|
||||||
collision: "none"
|
collision: "none"
|
||||||
},
|
},
|
||||||
source: null
|
source: null,
|
||||||
};
|
|
||||||
|
|
||||||
commonWidgetTests('autocomplete', { defaults: autocomplete_defaults });
|
// callbacks
|
||||||
|
change: null,
|
||||||
|
close: null,
|
||||||
|
focus: null,
|
||||||
|
open: null,
|
||||||
|
response: null,
|
||||||
|
search: null,
|
||||||
|
select: null
|
||||||
|
}
|
||||||
|
});
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
commonWidgetTests( "tabs", {
|
commonWidgetTests( "tabs", {
|
||||||
defaults: {
|
defaults: {
|
||||||
activate: null,
|
|
||||||
active: null,
|
active: null,
|
||||||
beforeLoad: null,
|
|
||||||
beforeActivate: null,
|
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
event: "click",
|
event: "click",
|
||||||
fx: null,
|
fx: null,
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
activate: null,
|
||||||
|
beforeActivate: null,
|
||||||
|
beforeLoad: null,
|
||||||
load: null
|
load: null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,26 +1,28 @@
|
|||||||
commonWidgetTests( "tabs", {
|
commonWidgetTests( "tabs", {
|
||||||
defaults: {
|
defaults: {
|
||||||
activate: null,
|
|
||||||
active: null,
|
active: null,
|
||||||
add: null,
|
|
||||||
ajaxOptions: null,
|
ajaxOptions: null,
|
||||||
beforeLoad: null,
|
|
||||||
beforeActivate: null,
|
|
||||||
cache: false,
|
cache: false,
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
cookie: null,
|
cookie: null,
|
||||||
disable: null,
|
|
||||||
disabled: false,
|
disabled: false,
|
||||||
enable: null,
|
|
||||||
event: "click",
|
event: "click",
|
||||||
fx: null,
|
fx: null,
|
||||||
idPrefix: "ui-tabs-",
|
idPrefix: "ui-tabs-",
|
||||||
load: null,
|
|
||||||
panelTemplate: "<div></div>",
|
panelTemplate: "<div></div>",
|
||||||
|
spinner: "<em>Loading…</em>",
|
||||||
|
tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>",
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
activate: null,
|
||||||
|
add: null,
|
||||||
|
beforeActivate: null,
|
||||||
|
beforeLoad: null,
|
||||||
|
disable: null,
|
||||||
|
enable: null,
|
||||||
|
load: null,
|
||||||
remove: null,
|
remove: null,
|
||||||
select: null,
|
select: null,
|
||||||
show: null,
|
show: null
|
||||||
spinner: "<em>Loading…</em>",
|
|
||||||
tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
11
ui/jquery.ui.accordion.js
vendored
11
ui/jquery.ui.accordion.js
vendored
@ -25,7 +25,11 @@ $.widget( "ui.accordion", {
|
|||||||
icons: {
|
icons: {
|
||||||
activeHeader: "ui-icon-triangle-1-s",
|
activeHeader: "ui-icon-triangle-1-s",
|
||||||
header: "ui-icon-triangle-1-e"
|
header: "ui-icon-triangle-1-e"
|
||||||
}
|
},
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
activate: null,
|
||||||
|
beforeActivate: null
|
||||||
},
|
},
|
||||||
|
|
||||||
_create: function() {
|
_create: function() {
|
||||||
@ -649,6 +653,11 @@ if ( $.uiBackCompat !== false ) {
|
|||||||
|
|
||||||
// change events
|
// change events
|
||||||
(function( $, prototype ) {
|
(function( $, prototype ) {
|
||||||
|
$.extend( prototype.options, {
|
||||||
|
change: null,
|
||||||
|
changestart: null
|
||||||
|
});
|
||||||
|
|
||||||
var _trigger = prototype._trigger;
|
var _trigger = prototype._trigger;
|
||||||
prototype._trigger = function( type, event, data ) {
|
prototype._trigger = function( type, event, data ) {
|
||||||
var ret = _trigger.apply( this, arguments );
|
var ret = _trigger.apply( this, arguments );
|
||||||
|
11
ui/jquery.ui.autocomplete.js
vendored
11
ui/jquery.ui.autocomplete.js
vendored
@ -30,7 +30,16 @@ $.widget( "ui.autocomplete", {
|
|||||||
at: "left bottom",
|
at: "left bottom",
|
||||||
collision: "none"
|
collision: "none"
|
||||||
},
|
},
|
||||||
source: null
|
source: null,
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
change: null,
|
||||||
|
close: null,
|
||||||
|
focus: null,
|
||||||
|
open: null,
|
||||||
|
response: null,
|
||||||
|
search: null,
|
||||||
|
select: null
|
||||||
},
|
},
|
||||||
|
|
||||||
pending: 0,
|
pending: 0,
|
||||||
|
8
ui/jquery.ui.tabs.js
vendored
8
ui/jquery.ui.tabs.js
vendored
@ -26,13 +26,15 @@ function getNextListId() {
|
|||||||
|
|
||||||
$.widget( "ui.tabs", {
|
$.widget( "ui.tabs", {
|
||||||
options: {
|
options: {
|
||||||
activate: null,
|
|
||||||
active: null,
|
active: null,
|
||||||
beforeActivate: null,
|
|
||||||
beforeLoad: null,
|
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
event: "click",
|
event: "click",
|
||||||
fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
|
fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
activate: null,
|
||||||
|
beforeActivate: null,
|
||||||
|
beforeLoad: null,
|
||||||
load: null
|
load: null
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user