Add flexview hook and better New: prefix remover

This commit is contained in:
hummypkg 2016-03-21 19:51:45 +00:00
parent f05dab6acc
commit cafa786200
3 changed files with 45 additions and 1 deletions

View File

@ -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)

View File

@ -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}
},
}

View File

@ -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*,,"
}
}
]
},