diff --git a/CONTROL/control b/CONTROL/control index aa2be10..56305e2 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -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) diff --git a/var/mongoose/cgi-bin/browse/assets.jim b/var/mongoose/cgi-bin/browse/assets.jim index 405c64b..6fff7ce 100755 --- a/var/mongoose/cgi-bin/browse/assets.jim +++ b/var/mongoose/cgi-bin/browse/assets.jim @@ -49,6 +49,7 @@ puts {
  • Delete
  • Cut to clipboard
  • Copy to clipboard
  • +
  • Paste to folder
  • Rename
  • Reset new flag
  • Auto-Shrink
  • diff --git a/var/mongoose/cgi-bin/browse/browse.js b/var/mongoose/cgi-bin/browse/browse.js index 2269f24..fecf4e2 100755 --- a/var/mongoose/cgi-bin/browse/browse.js +++ b/var/mongoose/cgi-bin/browse/browse.js @@ -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 "' + diff --git a/var/mongoose/lib/bin/auto b/var/mongoose/lib/bin/auto index 18ecaf8..4720698 100755 --- a/var/mongoose/lib/bin/auto +++ b/var/mongoose/lib/bin/auto @@ -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] diff --git a/var/mongoose/lib/ts.class b/var/mongoose/lib/ts.class index 077c170..344a697 100644 --- a/var/mongoose/lib/ts.class +++ b/var/mongoose/lib/ts.class @@ -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"