From d0ec2b1555352edac56b607a76096129033a1926 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Tue, 3 Jun 2014 22:17:06 +0000 Subject: [PATCH] checkpoint --- CONTROL/control | 4 ++-- webif/plugin/sweeper/browse.css | 6 ++++++ webif/plugin/sweeper/browse.hook | 5 +++++ webif/plugin/sweeper/browse.js | 5 +++++ webif/plugin/sweeper/diriconset.hook | 5 +++++ webif/plugin/sweeper/edit.jim | 15 +++++++++++---- webif/plugin/sweeper/save.jim | 2 +- 7 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 webif/plugin/sweeper/browse.css create mode 100644 webif/plugin/sweeper/browse.hook create mode 100644 webif/plugin/sweeper/browse.js create mode 100644 webif/plugin/sweeper/diriconset.hook diff --git a/CONTROL/control b/CONTROL/control index 7f90fab..3ac1726 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -4,6 +4,6 @@ Section: misc Version: 1.0.10 Architecture: mipsel Maintainer: af123@hummypkg.org.uk -Depends: webif(>=1.0.13-2) -Description: Automatically manage single recording files. [Add 'wage' condition] +Depends: webif(>=1.0.14) +Description: Automatically manage single recording files. [Web Interface. Multi-folder support.] Tags: http://hummy.tv/forum/threads/3843/ diff --git a/webif/plugin/sweeper/browse.css b/webif/plugin/sweeper/browse.css new file mode 100644 index 0000000..f74874c --- /dev/null +++ b/webif/plugin/sweeper/browse.css @@ -0,0 +1,6 @@ + +.contextMenu li.sweeper a +{ + background-image: url(/plugin/sweeper/img/icon16.png); +} + diff --git a/webif/plugin/sweeper/browse.hook b/webif/plugin/sweeper/browse.hook new file mode 100644 index 0000000..055e92b --- /dev/null +++ b/webif/plugin/sweeper/browse.hook @@ -0,0 +1,5 @@ + +jscss /plugin/sweeper/browse.js /plugin/sweeper/browse.css + +lappend plugins(dmenu) {sweeper {desc "Sweeper Rules"}} + diff --git a/webif/plugin/sweeper/browse.js b/webif/plugin/sweeper/browse.js new file mode 100644 index 0000000..80f1288 --- /dev/null +++ b/webif/plugin/sweeper/browse.js @@ -0,0 +1,5 @@ + +plugins.dmenu.sweeper = function(dir) { + window.location = '/plugin/sweeper/edit.jim?dir=' + dir; +}; + diff --git a/webif/plugin/sweeper/diriconset.hook b/webif/plugin/sweeper/diriconset.hook new file mode 100644 index 0000000..a839f93 --- /dev/null +++ b/webif/plugin/sweeper/diriconset.hook @@ -0,0 +1,5 @@ + +if {$dir eq [system mediaroot] || [file exists "$dir/.sweeper"]} { + lappend icons [_addicon "/plugin/sweeper/img/icon22.png" "Sweeper Rules"] +} + diff --git a/webif/plugin/sweeper/edit.jim b/webif/plugin/sweeper/edit.jim index d5572c5..5d0ad50 100755 --- a/webif/plugin/sweeper/edit.jim +++ b/webif/plugin/sweeper/edit.jim @@ -15,8 +15,17 @@ header puts "

Sweeper rules for - $dir - + $dir +" +# Breadcrumb path +set stub "" +foreach part [split $dir /] { + if {$stub eq "/"} { set name $part } else { set name "/$part" } + append stub $name + puts "$name +} +puts { +

@@ -29,9 +38,7 @@ puts "
-" -puts {