2012-01-19 21:15:52 +00:00
|
|
|
(function($)
|
|
|
|
{
|
|
|
|
$.fn.enable = function()
|
|
|
|
{
|
|
|
|
return this.each(function() {
|
|
|
|
$(this)
|
|
|
|
.removeClass('ui-state-disabled')
|
|
|
|
.removeProp('disabled');
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
$.fn.disable = function()
|
|
|
|
{
|
|
|
|
return this.each(function() {
|
|
|
|
$(this)
|
|
|
|
.addClass('ui-state-disabled')
|
|
|
|
.prop('disabled', true);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
})(jQuery);
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
$(":submit").button();
|
|
|
|
$(":checkbox").iphoneStyle();
|
|
|
|
$('form.auto').each(function(i, el) {
|
|
|
|
var id = $(this).attr('id');
|
2012-10-08 22:40:51 +00:00
|
|
|
var output = '#' + id + '_output';
|
2012-01-19 21:15:52 +00:00
|
|
|
$(this).ajaxForm({
|
|
|
|
target: output,
|
|
|
|
success: function() {
|
2012-10-08 22:40:51 +00:00
|
|
|
$(output)
|
|
|
|
.css('font-style', 'italic')
|
|
|
|
.show('slow')
|
|
|
|
.delay(2000)
|
|
|
|
.fadeOut('slow');
|
2012-01-19 21:15:52 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2012-01-21 01:27:06 +00:00
|
|
|
$('#pkgdev').change(function() {
|
|
|
|
var arg = '0';
|
|
|
|
if ($(this).attr('checked'))
|
|
|
|
arg = '1';
|
|
|
|
|
|
|
|
$(this).disable();
|
|
|
|
|
|
|
|
$('#pkgdev_output')
|
|
|
|
.empty()
|
|
|
|
.show('slow')
|
|
|
|
.load('/cgi-bin/settings.jim?pkgdev=' + arg,
|
|
|
|
function() {
|
|
|
|
$('#pkgdev').enable();
|
|
|
|
$('#pkgdev_output')
|
|
|
|
.css('font-style', 'italic')
|
|
|
|
.delay(2000).fadeOut('slow');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2012-01-19 21:15:52 +00:00
|
|
|
$('#https_toggle').change(function() {
|
|
|
|
var arg = 'off';
|
|
|
|
if ($(this).attr('checked'))
|
|
|
|
arg = 'on';
|
|
|
|
|
|
|
|
$(this).disable();
|
|
|
|
|
|
|
|
$('#https_output')
|
|
|
|
.empty()
|
|
|
|
.html('<img src=/img/loading.gif>Please Wait...')
|
|
|
|
.show('slow')
|
|
|
|
.load('/cgi-bin/settings.jim?act=https&val=' + arg,
|
|
|
|
function() {
|
|
|
|
$('#https_toggle').enable();
|
|
|
|
$('#https_output')
|
|
|
|
.css('font-style', 'italic')
|
|
|
|
.delay(2000).fadeOut('slow');
|
|
|
|
});
|
|
|
|
});
|
2012-05-21 20:23:41 +00:00
|
|
|
|
|
|
|
$('#toolbar_toggle').change(function() {
|
|
|
|
var arg = '1';
|
|
|
|
if ($(this).attr('checked'))
|
|
|
|
arg = '0';
|
|
|
|
|
|
|
|
$(this).disable();
|
|
|
|
|
|
|
|
$('#toolbar_output')
|
|
|
|
.empty()
|
|
|
|
.show('slow')
|
|
|
|
.load('/cgi-bin/settings.jim?notoolbar=' + arg,
|
|
|
|
function() {
|
|
|
|
$('#toolbar_toggle').enable();
|
|
|
|
$('#toolbar_output')
|
|
|
|
.css('font-style', 'italic')
|
|
|
|
.delay(2000).fadeOut('slow');
|
|
|
|
});
|
|
|
|
});
|
2012-01-19 21:15:52 +00:00
|
|
|
});
|
|
|
|
|