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