2011-11-28 15:24:38 +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);
|
2011-06-22 23:36:30 +00:00
|
|
|
|
2011-12-05 21:44:30 +00:00
|
|
|
function disableall()
|
|
|
|
{
|
|
|
|
$('button,a,input').disable();
|
|
|
|
}
|
|
|
|
|
2011-06-25 20:59:50 +00:00
|
|
|
function epginfo_callback(data, status, xhr)
|
|
|
|
{
|
|
|
|
var width = 85;
|
|
|
|
|
|
|
|
if (status != 'success')
|
|
|
|
return;
|
|
|
|
|
|
|
|
//console.log(status);
|
|
|
|
//console.dir(data);
|
|
|
|
|
|
|
|
$('#titleorig').val(data.title);
|
|
|
|
$('#renametitle').val(data.title);
|
|
|
|
if (data.synopsis.length > width)
|
|
|
|
data.synopsis = data.synopsis.substring(0, width) + '...';
|
|
|
|
$('#synopsis').html(data.synopsis);
|
|
|
|
$('tr.tstype').show('slow');
|
|
|
|
}
|
|
|
|
|
|
|
|
function insert_folder_size(folder, size)
|
|
|
|
{
|
|
|
|
folder = folder.replace(/ /g, '');
|
2011-06-27 21:59:07 +00:00
|
|
|
folder = folder.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g, '\\$1');
|
2011-06-25 20:59:50 +00:00
|
|
|
//console.log("Folder: (%s) = (%s)", folder, size);
|
2011-06-27 21:59:07 +00:00
|
|
|
if (folder == "")
|
|
|
|
$('#dirsize').text(' (' + size + 'iB)');
|
|
|
|
else
|
|
|
|
$('#' + folder).text(' (' + size + 'iB)');
|
2011-06-25 20:59:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function folder_size_callback(data, status, xhr)
|
|
|
|
{
|
|
|
|
//console.log("Status: %s", status);
|
2011-06-27 21:59:07 +00:00
|
|
|
//console.dir(data);
|
2011-06-25 20:59:50 +00:00
|
|
|
$.each(data, insert_folder_size);
|
|
|
|
}
|
|
|
|
|
2011-06-29 23:53:16 +00:00
|
|
|
function set_folder_new(folder, cnt)
|
|
|
|
{
|
|
|
|
folder = folder.replace(/ /g, '');
|
|
|
|
folder = folder.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g, '\\$1');
|
2011-07-01 22:56:53 +00:00
|
|
|
//console.log("Folder: (%s) = (%s)", folder, cnt);
|
2011-06-30 22:10:22 +00:00
|
|
|
$('#img' + folder).attr('src', '/img/Folder_New.png');
|
2011-06-29 23:53:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function new_folder_callback(data, status, xhr)
|
|
|
|
{
|
|
|
|
//console.log("Status: %s", status);
|
|
|
|
//console.dir(data);
|
|
|
|
$.each(data, set_folder_new);
|
|
|
|
}
|
|
|
|
|
2011-06-22 23:36:30 +00:00
|
|
|
function delete_callback(file, type, id)
|
|
|
|
{
|
|
|
|
var el = 'div.bf#' + id;
|
|
|
|
var results = el + ' .results';
|
|
|
|
var url = '/cgi-bin/browse/delete.jim?file=' +
|
|
|
|
encodeURIComponent(file) + '&type=' + type;
|
2011-12-05 21:44:30 +00:00
|
|
|
$(results)
|
|
|
|
.html('<img src=/img/loading.gif>Deleting, please wait...')
|
|
|
|
.slideDown('slow')
|
|
|
|
.load(url, function() {
|
2011-06-22 23:36:30 +00:00
|
|
|
$(el).delay(3000).slideUp(300, function() {
|
|
|
|
$(el).remove();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function lock_callback(file, type, id)
|
|
|
|
{
|
2011-06-26 23:05:38 +00:00
|
|
|
var url = '/cgi-bin/browse/lock.jim?file=' + encodeURIComponent(file);
|
|
|
|
$.get(url, function() { window.location.reload(true); });
|
2011-06-22 23:36:30 +00:00
|
|
|
}
|
|
|
|
|
2011-07-08 20:39:57 +00:00
|
|
|
function enc_callback(file, type, id)
|
|
|
|
{
|
|
|
|
var url = '/cgi-bin/browse/enc.jim?file=' + encodeURIComponent(file);
|
|
|
|
$.get(url, function() { window.location.reload(true); });
|
|
|
|
}
|
|
|
|
|
|
|
|
function new_callback(file, type, id)
|
|
|
|
{
|
|
|
|
var url = '/cgi-bin/browse/new.jim?file=' + encodeURIComponent(file);
|
|
|
|
$.get(url, function() { window.location.reload(true); });
|
|
|
|
}
|
|
|
|
|
2011-06-25 20:59:50 +00:00
|
|
|
function rename_submit()
|
|
|
|
{
|
|
|
|
var s = $('#renameform_form').serialize();
|
2011-06-26 23:05:38 +00:00
|
|
|
$.get('/cgi-bin/browse/rename.jim?' + s,
|
|
|
|
function() { window.location.reload(true); });
|
2011-06-25 20:59:50 +00:00
|
|
|
}
|
|
|
|
|
2011-12-09 10:11:41 +00:00
|
|
|
function drename_submit()
|
|
|
|
{
|
|
|
|
var s = $('#drenameform_form').serialize();
|
|
|
|
$.get('/cgi-bin/browse/rename.jim?' + s,
|
|
|
|
function() { window.location.reload(true); });
|
|
|
|
}
|
|
|
|
|
2011-10-03 22:47:44 +00:00
|
|
|
function savestream_submit()
|
|
|
|
{
|
|
|
|
var s = $('#savestream_form').serialize();
|
|
|
|
var sf = $('#save_stream').attr('file');
|
|
|
|
$('#savestream_spin').show();
|
|
|
|
$.get('/cgi-bin/browse/savestream.jim?sfile=' +
|
|
|
|
encodeURIComponent(sf) + '&' + s,
|
|
|
|
function() {
|
|
|
|
window.location.reload(true);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2011-06-22 23:36:30 +00:00
|
|
|
var $confirm; // Populated after DOM is loaded.
|
|
|
|
|
|
|
|
function confirm_action(action, callback, file, type, id)
|
|
|
|
{
|
|
|
|
var bfile = file.replace(/.*\/|\.[^.]*$/g, '');
|
|
|
|
$confirm.dialog('option', 'buttons', {
|
|
|
|
'Yes': function() { $(this).dialog('close');
|
|
|
|
callback(file, type, id); },
|
|
|
|
'No': function() {$(this).dialog('close');}
|
|
|
|
|
|
|
|
});
|
|
|
|
$('#confirm').empty().html(
|
|
|
|
'Are you sure you wish to ' + action + '<br>' +
|
|
|
|
'<i>' + bfile + '</i> ?'
|
|
|
|
);
|
|
|
|
$confirm.dialog('open');
|
|
|
|
}
|
|
|
|
|
|
|
|
function preparemenu(el, menu)
|
|
|
|
{
|
|
|
|
if (el.attr('type') == 'ts')
|
|
|
|
{
|
2011-07-08 20:39:57 +00:00
|
|
|
if (el.attr('def') == 'HD')
|
|
|
|
{
|
|
|
|
$('#optmenu').enableContextMenuItems('#enc');
|
|
|
|
if (el.attr('encd') == 1)
|
|
|
|
$(menu).changeContextMenuItem('#enc',
|
2011-11-03 23:43:17 +00:00
|
|
|
'Remove Enc');
|
2011-07-08 20:39:57 +00:00
|
|
|
else
|
|
|
|
$(menu).changeContextMenuItem('#enc',
|
2011-11-03 23:43:17 +00:00
|
|
|
'Set Enc');
|
2011-07-08 20:39:57 +00:00
|
|
|
}
|
2011-11-16 22:55:06 +00:00
|
|
|
|
|
|
|
if (el.attr('bx') > 0)
|
2011-11-03 23:43:17 +00:00
|
|
|
$('#optmenu').enableContextMenuItems('#crop');
|
2011-07-08 20:39:57 +00:00
|
|
|
else
|
2011-11-03 23:43:17 +00:00
|
|
|
$('#optmenu').disableContextMenuItems('#crop');
|
2011-07-08 20:39:57 +00:00
|
|
|
|
|
|
|
$('#optmenu').enableContextMenuItems('#new');
|
|
|
|
if (el.attr('new') == 1)
|
|
|
|
$(menu).changeContextMenuItem('#new', 'Mark watched');
|
|
|
|
else
|
|
|
|
$(menu).changeContextMenuItem('#new', 'Mark new');
|
|
|
|
|
|
|
|
|
2011-06-25 20:59:50 +00:00
|
|
|
$('#optmenu').enableContextMenuItems('#lock');
|
2011-06-22 23:36:30 +00:00
|
|
|
if (el.attr('locked') == 1)
|
|
|
|
{
|
|
|
|
$(menu).changeContextMenuItem('#lock', 'Unlock');
|
|
|
|
$('#optmenu').disableContextMenuItems('#delete');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$(menu).changeContextMenuItem('#lock', 'Lock');
|
|
|
|
$('#optmenu').enableContextMenuItems('#delete');
|
|
|
|
}
|
2011-11-04 00:55:13 +00:00
|
|
|
|
|
|
|
if (el.attr('odencd') == 1)
|
|
|
|
$('#optmenu').enableContextMenuItems('#decrypt');
|
|
|
|
else
|
|
|
|
$('#optmenu').disableContextMenuItems('#decrypt');
|
|
|
|
|
2011-06-22 23:36:30 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$('#optmenu').enableContextMenuItems('#delete');
|
|
|
|
$('#optmenu').disableContextMenuItems('#lock');
|
2011-07-08 20:39:57 +00:00
|
|
|
$('#optmenu').disableContextMenuItems('#enc');
|
|
|
|
$('#optmenu').disableContextMenuItems('#new');
|
2011-11-04 00:55:13 +00:00
|
|
|
$('#optmenu').disableContextMenuItems('#decrypt');
|
2011-11-03 23:43:17 +00:00
|
|
|
$('#optmenu').disableContextMenuItems('#crop');
|
2011-06-22 23:36:30 +00:00
|
|
|
}
|
2011-07-08 20:39:57 +00:00
|
|
|
|
2011-06-22 23:36:30 +00:00
|
|
|
}
|
|
|
|
|
2011-06-25 20:59:50 +00:00
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
var menuclick = function(action, el, pos)
|
2011-06-22 23:36:30 +00:00
|
|
|
{
|
|
|
|
var file = $(el).parent().prevAll('a.bf').last().attr('file');
|
2011-06-25 20:59:50 +00:00
|
|
|
var bfile = file.replace(/.*\/|\.[^.]*$/g, '');
|
|
|
|
bfile = bfile.replace(/[\x00-\x1f]+/g, '');
|
2011-06-22 23:36:30 +00:00
|
|
|
var type = $(el).attr('type');
|
|
|
|
var id = $(el).attr('did');
|
|
|
|
switch (action)
|
|
|
|
{
|
|
|
|
case 'delete':
|
2011-06-25 20:59:50 +00:00
|
|
|
confirm_action('delete', delete_callback, file,
|
|
|
|
type, id);
|
2011-06-22 23:36:30 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'lock':
|
|
|
|
confirm_action('change the lock on', lock_callback,
|
|
|
|
file, type, id);
|
|
|
|
break;
|
|
|
|
|
2011-07-08 20:39:57 +00:00
|
|
|
case 'enc':
|
|
|
|
confirm_action('change the ENC flag on', enc_callback,
|
|
|
|
file, type, id);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'new':
|
|
|
|
confirm_action('change the New flag on', new_callback,
|
|
|
|
file, type, id);
|
|
|
|
break;
|
|
|
|
|
2011-06-25 20:59:50 +00:00
|
|
|
case 'rename':
|
|
|
|
$('#rename').val(bfile);
|
|
|
|
$('#renameorig').val(file);
|
|
|
|
|
|
|
|
$('#titleorig').val('');
|
|
|
|
$('#renametitle').val('');
|
|
|
|
$('#synopsis').val('');
|
|
|
|
$('tr.tstype').css('display', 'none');
|
|
|
|
|
|
|
|
if (type == 'ts')
|
|
|
|
{
|
|
|
|
$.getJSON('/cgi-bin/browse/epgtitle.jim?file=' +
|
|
|
|
encodeURIComponent(file), epginfo_callback);
|
|
|
|
}
|
|
|
|
|
|
|
|
$('#renameform').dialog('open');
|
|
|
|
break;
|
|
|
|
|
2011-06-22 23:36:30 +00:00
|
|
|
case 'download':
|
2011-08-13 00:18:12 +00:00
|
|
|
window.location.href = '/cgi-bin/browse/download.jim?file=' +
|
|
|
|
encodeURIComponent(file);
|
2011-06-22 23:36:30 +00:00
|
|
|
break;
|
|
|
|
|
2011-11-03 23:43:17 +00:00
|
|
|
case 'crop':
|
|
|
|
window.location.href = '/cgi-bin/browse/crop.jim?file=' +
|
|
|
|
encodeURIComponent(file);
|
|
|
|
break;
|
|
|
|
|
2011-11-04 00:55:13 +00:00
|
|
|
case 'decrypt':
|
|
|
|
window.location.href = '/cgi-bin/browse/decrypt.jim?file=' +
|
|
|
|
encodeURIComponent(file);
|
|
|
|
break;
|
|
|
|
|
2011-06-22 23:36:30 +00:00
|
|
|
default:
|
|
|
|
alert('Unhandled action: ' + action);
|
|
|
|
break;
|
|
|
|
}
|
2011-06-25 20:59:50 +00:00
|
|
|
};
|
2011-06-22 23:36:30 +00:00
|
|
|
|
2011-12-09 10:11:41 +00:00
|
|
|
var dmenuclick = function(action, el, pos)
|
|
|
|
{
|
|
|
|
var direl = $(el).parent().parent();
|
|
|
|
var file = $(el).parent().prevAll('a.dbf').last().attr('file');
|
|
|
|
var bfile = file.replace(/.*\//g, '');
|
|
|
|
bfile = bfile.replace(/[\x00-\x1f]+/g, '');
|
|
|
|
var results = $(el).parent().next('div.results');
|
|
|
|
|
|
|
|
switch (action)
|
|
|
|
{
|
|
|
|
case 'delete':
|
|
|
|
var url = '/cgi-bin/browse/delete.jim?file=' +
|
|
|
|
encodeURIComponent(file) + '&type=dir';
|
|
|
|
|
|
|
|
if (confirm('Are you sure you wish to delete "' + file +
|
|
|
|
'" and all files within it?'))
|
|
|
|
{
|
|
|
|
$(results)
|
|
|
|
.html('<img src=/img/loading.gif>' +
|
|
|
|
'Deleting, please wait...')
|
|
|
|
.slideDown('slow')
|
|
|
|
.load(url, function() {
|
|
|
|
$(direl).delay(3000).slideUp(300, function() {
|
|
|
|
$(direl).remove();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'rename':
|
|
|
|
$('#drename').val(bfile);
|
|
|
|
$('#drenameorig').val(file);
|
|
|
|
$('#drenameform').dialog('open');
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
alert('Unhandled action: ' + action);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-06-22 23:36:30 +00:00
|
|
|
// Bind context menu to opt+ image
|
|
|
|
$('img.opt').contextMenu(
|
|
|
|
{
|
|
|
|
menu: 'optmenu',
|
|
|
|
leftButton: true,
|
|
|
|
beforeShow: preparemenu
|
|
|
|
},
|
|
|
|
menuclick
|
|
|
|
);
|
|
|
|
|
2011-12-09 10:11:41 +00:00
|
|
|
$('img.dopt').contextMenu(
|
|
|
|
{
|
|
|
|
menu: 'doptmenu',
|
|
|
|
leftButton: true,
|
|
|
|
},
|
|
|
|
dmenuclick
|
|
|
|
);
|
|
|
|
|
2011-06-22 23:36:30 +00:00
|
|
|
// Disable items which are not yet implemented.
|
2011-06-25 20:59:50 +00:00
|
|
|
$('#optmenu').disableContextMenuItems('#title');
|
2011-06-22 23:36:30 +00:00
|
|
|
|
|
|
|
// Create reusable dialogue.
|
|
|
|
var $dialog = $('#dialogue').dialog({
|
|
|
|
title: "Media Details",
|
|
|
|
modal: false, autoOpen: false,
|
|
|
|
height: 600, width: 700,
|
|
|
|
show: 'scale', hide: 'fade',
|
|
|
|
draggable: true, resizable: true,
|
|
|
|
buttons: {
|
|
|
|
"Close": function() {
|
|
|
|
$(this).dialog('close');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
close: function(e,u) { $('#dialogue').empty().html(
|
|
|
|
'<img src="/img/loading.gif" alt="loading">'); }
|
|
|
|
});
|
|
|
|
|
|
|
|
// Bind dialogue open to filenames.
|
|
|
|
$('a.bf').click(function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
var file = $(this).attr('file');
|
|
|
|
var type = $(this).attr('type');
|
|
|
|
var url = '/cgi-bin/browse/file.jim?file=' +
|
|
|
|
encodeURIComponent(file) + '&type=' + type;
|
|
|
|
$('#dialogue').load(url);
|
|
|
|
$dialog.dialog('open');
|
|
|
|
});
|
|
|
|
|
2011-06-25 20:59:50 +00:00
|
|
|
$('#renameform').dialog({
|
|
|
|
autoOpen: false,
|
|
|
|
height: 'auto', width: 'auto',
|
|
|
|
modal: true,
|
|
|
|
buttons: {
|
|
|
|
"Update": rename_submit,
|
|
|
|
"Close": function() {
|
|
|
|
$(this).dialog('close');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
close: function() { $('#rename').val(''); }
|
|
|
|
});
|
|
|
|
|
2011-12-09 10:11:41 +00:00
|
|
|
$('#drenameform').dialog({
|
|
|
|
autoOpen: false,
|
|
|
|
height: 'auto', width: 'auto',
|
|
|
|
modal: true,
|
|
|
|
buttons: {
|
|
|
|
"Update": drename_submit,
|
|
|
|
"Close": function() {
|
|
|
|
$(this).dialog('close');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
close: function() { $('#drename').val(''); }
|
|
|
|
});
|
|
|
|
|
2011-10-03 22:47:44 +00:00
|
|
|
$('#savestreamform').dialog({
|
|
|
|
autoOpen: false,
|
|
|
|
height: 'auto', width: 'auto',
|
|
|
|
modal: true,
|
|
|
|
buttons: {
|
|
|
|
"Save": savestream_submit,
|
|
|
|
"Cancel": function() {
|
|
|
|
$(this).dialog('close');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
close: function() { $('#savestream_name').val(''); }
|
|
|
|
});
|
|
|
|
|
2011-06-22 23:36:30 +00:00
|
|
|
// Create re-usable confirmation dialogue.
|
|
|
|
$confirm = $('#confirm').dialog({
|
|
|
|
modal: true, autoOpen: false,
|
|
|
|
height: 160, width: 500,
|
|
|
|
show: 'fade', hide: 'fade',
|
|
|
|
draggable: false, resizable: false
|
|
|
|
});
|
2011-06-25 20:59:50 +00:00
|
|
|
|
|
|
|
var dir = $('#dir').text();
|
2011-06-22 23:36:30 +00:00
|
|
|
|
2011-06-25 20:59:50 +00:00
|
|
|
// Load folder sizes
|
|
|
|
$.getJSON('/cgi-bin/browse/sizes.jim?dir=' + encodeURIComponent(dir),
|
|
|
|
folder_size_callback);
|
2011-06-29 23:53:16 +00:00
|
|
|
|
|
|
|
// Flag folders with unwatched items
|
|
|
|
$.getJSON('/cgi-bin/browse/newdir.jim?dir=' + encodeURIComponent(dir),
|
|
|
|
new_folder_callback);
|
2011-10-03 22:47:44 +00:00
|
|
|
|
2011-12-05 21:44:30 +00:00
|
|
|
// Uncheck everything
|
|
|
|
$('input.fs:checked').attr('checked', false);
|
|
|
|
|
|
|
|
// Buttons
|
|
|
|
|
2011-10-03 22:47:44 +00:00
|
|
|
$('#dedup').button().click(function() {
|
|
|
|
window.location = '/cgi-bin/dedup.jim?dir='
|
|
|
|
+ encodeURIComponent(dir);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#save_stream').button().click(function() {
|
|
|
|
$('#savestream_spin').hide();
|
|
|
|
$('#savestreamform').dialog('open');
|
|
|
|
$('#savestream_detail').load(
|
|
|
|
'/cgi-bin/browse/ffmpeg.jim?file=' +
|
|
|
|
encodeURIComponent($('#save_stream').attr('file')));
|
|
|
|
});
|
2011-11-27 23:29:14 +00:00
|
|
|
|
2011-11-28 15:24:38 +00:00
|
|
|
$('#selectall').click(function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
$('input.fs').attr('checked', true).trigger('change');
|
|
|
|
});
|
|
|
|
$('#deselectall').click(function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
$('input.fs:checked').attr('checked', false).trigger('change');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#join').button().disable()
|
2011-11-27 23:29:14 +00:00
|
|
|
.click(function() {
|
|
|
|
var files = new Array();
|
|
|
|
var els = $('input.fsts:checked + a').each(function() {
|
|
|
|
files.push(encodeURIComponent($(this).attr('file')));
|
|
|
|
});
|
|
|
|
//console.log("%o", files);
|
|
|
|
window.location.href = '/cgi-bin/browse/join.jim?files=' +
|
|
|
|
files.join();
|
|
|
|
});
|
|
|
|
|
2011-11-28 15:24:38 +00:00
|
|
|
$('#delete').button().disable()
|
|
|
|
.click(function() {
|
2011-12-05 21:44:30 +00:00
|
|
|
var files = new Array();
|
|
|
|
var els = $('input.fs:checked + a').each(function() {
|
|
|
|
files.push(encodeURIComponent($(this).attr('file')));
|
|
|
|
});
|
|
|
|
//console.log("%o", files);
|
|
|
|
var str = 'Are you sure you want to delete ' + files.length +
|
|
|
|
' file';
|
|
|
|
if (files.length != 1) str += 's';
|
|
|
|
str += '?';
|
|
|
|
if (confirm(str))
|
|
|
|
{
|
|
|
|
disableall();
|
|
|
|
$('#deletewait').slideDown('slow');
|
|
|
|
window.location.href =
|
|
|
|
'/cgi-bin/browse/mdelete.jim?dir=' +
|
|
|
|
encodeURIComponent(dir) + '&files=' +
|
|
|
|
files.join();
|
|
|
|
}
|
2011-11-28 15:24:38 +00:00
|
|
|
});
|
|
|
|
|
2011-11-27 23:29:14 +00:00
|
|
|
$('input.fs').change(function() {
|
2011-11-28 15:24:38 +00:00
|
|
|
var num = $('input.fs:checked').size();
|
|
|
|
if (num > 0)
|
|
|
|
$('#delete').enable();
|
|
|
|
else
|
|
|
|
$('#delete').disable();
|
|
|
|
|
2011-11-27 23:29:14 +00:00
|
|
|
var num = $('input.fsts:checked').size();
|
|
|
|
if (num > 1)
|
2011-11-28 15:24:38 +00:00
|
|
|
$('#join').enable();
|
2011-11-27 23:29:14 +00:00
|
|
|
else
|
2011-11-28 15:24:38 +00:00
|
|
|
$('#join').disable();
|
2011-11-27 23:29:14 +00:00
|
|
|
|
|
|
|
});
|
2011-11-28 15:24:38 +00:00
|
|
|
|
2011-06-25 20:59:50 +00:00
|
|
|
});
|
2011-06-22 23:36:30 +00:00
|
|
|
|