add paste to folder

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1113 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2012-08-09 23:06:30 +00:00
parent e4f61f4047
commit 39ed7752bc
5 changed files with 35 additions and 18 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 0.9.13-3
Version: 0.9.13-4
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.0.2),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73),jim-cgi(>=0.5),service-control(>=1.2),busybox(>=1.19.3-1),lsof,epg(>=1.0.9),hmt(>=1.1.6),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2)

View File

@ -49,6 +49,7 @@ puts {
<li class=delete><a href=#delete>Delete</a></li>
<li class=cut><a href=#cut>Cut to clipboard</a></li>
<li class=pwcopy><a href=#copy>Copy to clipboard</a></li>
<li class=pwpaste><a href=#paste>Paste to folder</a></li>
<li class=separator><a href=#rename>Rename</a></li>
<li class=separator><a href=#resetnew>Reset new flag</a></li>
<li class="separator compress"><a href=#shrink>Auto-Shrink</a></li>

View File

@ -6,6 +6,21 @@ function disableall()
$('button,a,input').disable();
}
function pastedialogue()
{
$('#pwdialogue').dialog({
title: "Pasting from clipboard",
modal: true, autoOpen: true,
height: 'auto', width: 'auto',
show: 'scale', hide: 'fade',
draggable: false, resizable: false,
closeOnEscape: false,
open: function() {
$('.ui-dialog-titlebar-close').hide();
}
});
}
function reloadclipboard()
{
$('#clipboard')
@ -16,9 +31,15 @@ function reloadclipboard()
// Start Clipboard post-load actions
if ($('#clipclear').length)
{
$('#paste').enable();
$('#doptmenu').enableContextMenuItems('#paste');
}
else
{
$('#paste').disable();
$('#doptmenu').disableContextMenuItems('#paste');
}
$('#clipclear').button().click(function() {
$.get('/cgi-bin/browse/clipboard.jim?act=clear', function() {
@ -36,17 +57,7 @@ $('a.clipdel').click(function() {
$('#paste').button()
.click(function() {
disableall();
$('#pwdialogue').dialog({
title: "Pasting from clipboard",
modal: true, autoOpen: true,
height: 'auto', width: 'auto',
show: 'scale', hide: 'fade',
draggable: false, resizable: false,
closeOnEscape: false,
open: function() {
$('.ui-dialog-titlebar-close').hide();
}
});
pastedialogue();
$('#pwfeedback').load(
'/cgi-bin/browse/clipboard.jim?act=paste&dir='
+ encodeURIComponent(dir), function() {
@ -446,6 +457,16 @@ var dmenuclick = function(action, el, pos)
switch (action)
{
case 'paste':
pastedialogue();
$('#pwfeedback').load(
'/cgi-bin/browse/clipboard.jim?act=paste&dir=' +
file, function() {
$('#pwdialogue').dialog('close');
reloadclipboard();
});
break;
case 'delete':
if (confirm('Are you sure you wish to delete "' +

View File

@ -46,11 +46,6 @@ proc bindir {file binroot} {
return $ndir
}
proc escape {str} {
regsub -all {([\\["$])} $str {\\\1} str
return $str
}
proc dedup {dir} {
#puts "DEDUP: \[$dir]"
puts [exec /mod/webif/html/dedup/dedup -yes $dir]

View File

@ -204,7 +204,7 @@ proc {ts renamegroup} {from to} {
foreach ext $tsgroup {
set f "$root.$ext"
if {![file exists $f]} continue
file rename $f "${dir}/${to}${ext}"
file rename $f "${dir}/${to}.${ext}"
}
exec /mod/bin/hmt "+setfilename=$to" "${dir}/${to}.hmt"