91 lines
2.8 KiB
JavaScript
Executable File
91 lines
2.8 KiB
JavaScript
Executable File
/*qnap scripts*/
|
|
$('.removeRow').live('click', function () {
|
|
getParentClass = $(this).parents('tr').attr('class');
|
|
$(this).parents('tr').remove();
|
|
$('.backupcheck input[name="' + getParentClass + '"]').prop('checked', false);
|
|
})
|
|
|
|
$.addBackupFile = function () {
|
|
var getCont = $($this).parents('tr').find($('td a')).text();
|
|
var getImg = $($this).parents('tr').find($('td img')).attr('src');
|
|
setInputName = 'backupfilefolder' + $($this).parents('tr').index();
|
|
|
|
if ($($this).is(':checked')) {
|
|
$($this).attr('name', setInputName);
|
|
$('#folderBackupadding').append('<tr class="' + setInputName + '"><td width="68%" class="cont_heading" title="'+getCont+'"><img src="' + getImg + '" />' + getCont + '</td><td width="5%"> <span class="removeRow"> <img src="../include/images/idq_ico_remove.png"></span></td></tr>');
|
|
} else {
|
|
$('#folderBackupadding').find('.' + setInputName).remove();
|
|
$('.backupcheck input[name="' + setInputName + '"]').attr('name', '');
|
|
}
|
|
|
|
if ($('.backupcheck input[type="checkbox"]:checked').length == 0) {
|
|
$('.checkcontrol').prop('checked', false);
|
|
}
|
|
};
|
|
|
|
|
|
$('.backupcheck input[type="checkbox"]').live('click', function () {
|
|
$this = this;
|
|
$.addBackupFile();
|
|
});
|
|
$('.popupmainchek').live('click', function () {
|
|
if($(this).is(':checked'))
|
|
{
|
|
$('.popupcontentcheck input[type="checkbox"]').prop('checked', true);
|
|
}
|
|
else
|
|
{
|
|
$('.popupcontentcheck input[type="checkbox"]').prop('checked', false);
|
|
}
|
|
});
|
|
|
|
$('.checkcontrol').live('click', function () {
|
|
$('.backupcheck input[type="checkbox"]').prop('checked', true);
|
|
if ($('.checkcontrol').is(':checked')) {
|
|
$('.backupcheck input[type="checkbox"]').each(function () {
|
|
$this = this;
|
|
$.addBackupFile();
|
|
});
|
|
} else {
|
|
$('.backupcheck input[type="checkbox"]').prop('checked', false);
|
|
$('#folderBackupadding tr').remove();
|
|
$('.backupcheck input').attr('name', '');
|
|
}
|
|
});
|
|
$('.head_user').live('mouseover', function () {
|
|
$('.sliding').slideDown(0);
|
|
})
|
|
$('.sliding').live('mouseleave', function () {
|
|
$('.sliding').slideUp(0);
|
|
});
|
|
|
|
|
|
$(document).ready(function () {
|
|
footalign();
|
|
chkWidth();
|
|
|
|
$(window).resize(function () {
|
|
chkWidth();
|
|
footalign();
|
|
});
|
|
|
|
function chkWidth() {
|
|
var a = $('html').width();
|
|
var dynWidth = 0;
|
|
if (a > 1000) {
|
|
dynWidth = a - 180;
|
|
dynWidth -= 17;
|
|
}
|
|
var copyrightwidth = dynWidth - 400;
|
|
$('.head_cont, .menu, .content, .file_header, .acc_alert').width(dynWidth + 'px');
|
|
|
|
$('footer').width(dynWidth + 'px');
|
|
|
|
}
|
|
|
|
function footalign() {
|
|
var myheight = $(window).height();
|
|
var footheight = myheight - 223 - 70;
|
|
$('.content').css('min-height', footheight);
|
|
}
|
|
}); |