diff --git a/CONTROL/control b/CONTROL/control index 42d1725..2058b92 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: sweeper Priority: optional Section: misc -Version: 2.0.15-2 +Version: 2.0.16 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif(>=1.2.5-10) diff --git a/webif/plugin/sweeper/flexview.hook b/webif/plugin/sweeper/flexview.hook new file mode 100644 index 0000000..b37cd57 --- /dev/null +++ b/webif/plugin/sweeper/flexview.hook @@ -0,0 +1,27 @@ +# Icon name / icon +lappend plugins(icons) "sweeper" +lappend plugins(icons) [_addicon "/plugin/sweeper/img/icon22.png" "Sweeper Rules" "fvIcon"] + +lappend plugins(icons) "nosweep" +lappend plugins(icons) [_addicon "/plugin/sweeper/img/noicon22.png" "No-sweep" "fvIcon"] + +# File list column - see jqGrid documentation for column options +lappend plugins(dircolumn) { +{ name:'sweeper', + hidden:false, width:22, + stype: 'select', + searchoptions: {value: {1:"Sweeper rules",0:"No Sweeper Rules",'':"-   All"}, searchOperators: false, clearSearch: false}, + label: icons.sweeper + ' Sweeper Rules', + formatter: fmtIcon, formatoptions: {img: icons.sweeper} + }, +} + +lappend plugins(dircolumn) { +{ name:'nosweep', + hidden:false, width:22, + stype: 'select', + searchoptions: {value: {1:"No-Sweep",0:"Allow Sweep",'':"-   All"}, searchOperators: false, clearSearch: false}, + label: icons.nosweep + ' No-Sweep', + formatter: fmtIcon, formatoptions: {img: icons.nosweep} + }, +} diff --git a/webif/plugin/sweeper/macro.js b/webif/plugin/sweeper/macro.js index 94dd065..997b923 100644 --- a/webif/plugin/sweeper/macro.js +++ b/webif/plugin/sweeper/macro.js @@ -41,6 +41,23 @@ var macros = { "cmd": "settitle", "arg": "%orig%regsub,New:\\s*,," } + }, + { + "raw": "filename New_* action {renamefile {%orig%regsub,New_\\s*,,}}", + "name": "Remove New_ prefix.", + "type": "global", + "enabled": "1", + "criteria": [ + { + "negate": 0, + "cmd": "filename", + "arg": "New_*" + } + ], + "action": { + "cmd": "renamefile", + "arg": "%orig%regsub,New_\\s*,," + } } ] },