2011-12-01 07:39:11 +01: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-08 06:30:47 +01:00
|
|
|
|
|
2011-12-01 07:39:11 +01:00
|
|
|
|
//All buttons are jQueryUI buttons
|
|
|
|
|
$('button, input[type="button"], input[type="submit"], input[type="reset"]').livequery(function () {
|
|
|
|
|
$(this).button();
|
|
|
|
|
});
|
|
|
|
|
|
2011-12-08 06:30:47 +01:00
|
|
|
|
$('.jquery-accordion').livequery(function () {
|
|
|
|
|
$(this).accordion({
|
|
|
|
|
autoHeight: false,
|
|
|
|
|
collapsible: true
|
|
|
|
|
});
|
2012-10-07 21:50:16 +02:00
|
|
|
|
|
|
|
|
|
if ($(this).hasClass('jquery-accordion-collapse-all'))
|
|
|
|
|
$(this).accordion("activate", false);
|
2011-12-08 06:30:47 +01:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('.jquery-tabs').livequery(function () {
|
2012-03-01 01:51:31 +01:00
|
|
|
|
$(this).show();
|
|
|
|
|
|
2011-12-08 06:30:47 +01:00
|
|
|
|
$(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 08:06:09 +02:00
|
|
|
|
|
2012-09-19 09:07:19 +02:00
|
|
|
|
$('.jQuery-datepicker').livequery(function () {
|
2012-09-19 08:06:09 +02:00
|
|
|
|
$(this).datepicker({
|
|
|
|
|
dateFormat: "yy-mm-dd"
|
|
|
|
|
});
|
|
|
|
|
});
|
2012-10-11 04:02:17 +02:00
|
|
|
|
|
|
|
|
|
$('[data-status]').livequery(function () {
|
|
|
|
|
var status = $(this).attr('data-status');
|
|
|
|
|
|
|
|
|
|
$(this).removeClass(function (index, css) {
|
|
|
|
|
return (css.match(/\bicon-\S+/g) || []).join(' ');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (status == 'Downloading') {
|
|
|
|
|
$(this).addClass('icon-download-alt');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status == 'Ready') {
|
|
|
|
|
$(this).addClass('icon-play');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status == 'AirsToday') {
|
|
|
|
|
$(this).addClass('icon-time');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status == 'NotAired') {
|
|
|
|
|
$(this).addClass('icon-calendar');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status == 'Missing') {
|
|
|
|
|
$(this).addClass('icon-sign-blank');
|
|
|
|
|
}
|
|
|
|
|
});
|
2012-10-12 04:18:23 +02:00
|
|
|
|
|
|
|
|
|
$('.infoBox, .successBox, .warningBox, .errorBox, .validationBox').livequery(function () {
|
|
|
|
|
$(this).prepend('<i class="icon-certificate"></i>');
|
|
|
|
|
});
|
2011-12-01 07:39:11 +01:00
|
|
|
|
});
|