sonarr-repo-only/NzbDrone.Web/Scripts/NzbDrone/AutoBind.js

56 lines
1.4 KiB
JavaScript
Raw Normal View History

2011-12-01 06:39:11 +00:00
$(document).ready(function () {
//All forms are ajax forms
$("form").livequery(function () {
var options = {
type: 'post',
resetForm: false
};
$(this).ajaxForm(options);
});
$('Form button').livequery(function () {
$(this).removeAttr('disabled');
});
2011-12-01 06:39:11 +00:00
//All buttons are jQueryUI buttons
$('button, input[type="button"], input[type="submit"], input[type="reset"]').livequery(function () {
$(this).button();
});
$('.jquery-accordion').livequery(function () {
$(this).accordion({
autoHeight: false,
collapsible: true
});
if ($(this).hasClass('jquery-accordion-collapse-all'))
$(this).accordion("activate", false);
});
$('.jquery-tabs').livequery(function () {
$(this).show();
$(this).tabs({
fx: { opacity: 'toggle' },
select: function (event, ui) {
jQuery(this).css('height', jQuery(this).height());
jQuery(this).css('overflow', 'hidden');
},
show: function (event, ui) {
jQuery(this).css('height', 'auto');
jQuery(this).css('overflow', 'visible');
}
});
});
2012-09-19 07:07:19 +00:00
$('.jQuery-datepicker').livequery(function () {
$(this).datepicker({
dateFormat: "yy-mm-dd"
});
});
2011-12-01 06:39:11 +00:00
});