forked from hummypkg/webif
Show icon for folders containing _ items
This commit is contained in:
parent
a68df32ac0
commit
042f729006
@ -1,7 +1,7 @@
|
|||||||
Package: webif
|
Package: webif
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: web
|
Section: web
|
||||||
Version: 1.4.4-2
|
Version: 1.4.4-3
|
||||||
Architecture: mipsel
|
Architecture: mipsel
|
||||||
Maintainer: af123@hpkg.tv
|
Maintainer: af123@hpkg.tv
|
||||||
Depends: tcpfix,webif-channelicons(>=1.1.27),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.77),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.8),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.12-1),webif-charts(>=1.2-1),stripts(>=1.4.2),tmenu(>=1.21-2),ffmpeg(>=2.8),id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.98-3),sqlite3(>=3.15.1),jim-xconv
|
Depends: tcpfix,webif-channelicons(>=1.1.27),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.77),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.8),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.12-1),webif-charts(>=1.2-1),stripts(>=1.4.2),tmenu(>=1.21-2),ffmpeg(>=2.8),id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.98-3),sqlite3(>=3.15.1),jim-xconv
|
||||||
|
21
webif/html/browse/_dir.jim
Executable file
21
webif/html/browse/_dir.jim
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/mod/bin/jimsh
|
||||||
|
|
||||||
|
package require cgi
|
||||||
|
package require pack
|
||||||
|
source /mod/webif/lib/setup
|
||||||
|
require json
|
||||||
|
|
||||||
|
httpheader "application/json"
|
||||||
|
|
||||||
|
set root [cgi_get dir]
|
||||||
|
# Strip double slashes
|
||||||
|
regsub -all -- {\/+} "$root/*" "/" root
|
||||||
|
|
||||||
|
puts "{"
|
||||||
|
foreach _ [glob -nocomplain "$root/_*"] {
|
||||||
|
set node [lindex [split [file dirname $_] /] end]
|
||||||
|
puts "\"[jescape $node]\": 1,"
|
||||||
|
}
|
||||||
|
puts "\"dummy\" : 0"
|
||||||
|
puts "}"
|
||||||
|
|
@ -43,6 +43,7 @@ if {$order eq "-"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set nofcount [$config nounwatchedcount]
|
set nofcount [$config nounwatchedcount]
|
||||||
|
set nounderscore [$config nounderscore]
|
||||||
|
|
||||||
set model [system model]
|
set model [system model]
|
||||||
set dustbin [system dustbin 1]
|
set dustbin [system dustbin 1]
|
||||||
@ -63,6 +64,7 @@ proc directory {file bfile tbfile} {
|
|||||||
if {$bfile eq $::dustbin} { set img "/img/Dustbin_Folder.png" }
|
if {$bfile eq $::dustbin} { set img "/img/Dustbin_Folder.png" }
|
||||||
puts "<img border=0 class=va id=\"img$tbfile\" src=$img>"
|
puts "<img border=0 class=va id=\"img$tbfile\" src=$img>"
|
||||||
if {!$::nofcount} { puts "<span class=foldernum></span>" }
|
if {!$::nofcount} { puts "<span class=foldernum></span>" }
|
||||||
|
if {!$::nounderscore} { puts "<span class=folderu>_</span>" }
|
||||||
puts "<input class=\"fs fsdir\" type=checkbox>"
|
puts "<input class=\"fs fsdir\" type=checkbox>"
|
||||||
puts "<a class=dbf
|
puts "<a class=dbf
|
||||||
href=\"$::env(SCRIPT_NAME)?dir=[cgi_quote_url $file]\"
|
href=\"$::env(SCRIPT_NAME)?dir=[cgi_quote_url $file]\"
|
||||||
|
@ -150,6 +150,22 @@ function new_folder_callback(data, status, xhr)
|
|||||||
//console.log("Status: %s", status);
|
//console.log("Status: %s", status);
|
||||||
//console.dir(data);
|
//console.dir(data);
|
||||||
$.each(data, set_folder_new);
|
$.each(data, set_folder_new);
|
||||||
|
// Flag folders with underscore items
|
||||||
|
$.getJSON('/browse/_dir.jim', {dir: dir}, __folder_callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
function set_folder__(folder)
|
||||||
|
{
|
||||||
|
folder = folder.replace(/ /g, '');
|
||||||
|
folder = folder.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g, '\\$1');
|
||||||
|
//console.log("Folder: (%s)", folder);
|
||||||
|
$('#img' + folder + ' ~ span.folderu').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function __folder_callback(data, status, xhr)
|
||||||
|
{
|
||||||
|
//console.dir(data);
|
||||||
|
$.each(data, set_folder__);
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_callback(file, dir, id)
|
function delete_callback(file, dir, id)
|
||||||
|
@ -559,13 +559,38 @@ span.foldernum
|
|||||||
color: white;
|
color: white;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
background-color: #CC0000;
|
background-color: #cc0000;
|
||||||
background: linear-gradient(#FF0000, #CC0000) repeat scroll 0 0 #EEEEEE;
|
background: linear-gradient(#ff0000, #cc0000) repeat scroll 0 0 #eeeeee;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
border: 1px solid #660000;
|
border: 1px solid #660000;
|
||||||
padding: 0 2px 0 2px;
|
padding: 0 2px 0 2px;
|
||||||
border-radius: 1em 1em 1em 1em;
|
border-radius: 1em 1em 1em 1em;
|
||||||
-moz-border-radius: 1em;
|
-moz-border-radius: 1em;
|
||||||
|
-webkit-border-radius: 1em;
|
||||||
|
border-top-right-radius: 1em;
|
||||||
|
border-top-left-radius: 1em;
|
||||||
|
border-bottom-right-radius: 1em;
|
||||||
|
border-bottom-left-radius: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.folderu
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 40;
|
||||||
|
left: 34px;
|
||||||
|
top: 7px;
|
||||||
|
color: black;
|
||||||
|
font-weight: bold;
|
||||||
|
height: 10px;
|
||||||
|
line-height: 1px;
|
||||||
|
background-color: #00cc00;
|
||||||
|
background: linear-gradient(#00ff00, #00cc00) repeat scroll 0 0 #eeeeee;
|
||||||
|
font-size: 10px;
|
||||||
|
border: 1px solid #660000;
|
||||||
|
padding: 0 2px 0 2px;
|
||||||
|
border-radius: 1em 1em 1em 1em;
|
||||||
|
-moz-border-radius: 1em;
|
||||||
-webkit-border-radius: 1em;
|
-webkit-border-radius: 1em;
|
||||||
border-top-right-radius: 1em;
|
border-top-right-radius: 1em;
|
||||||
border-top-left-radius: 1em;
|
border-top-left-radius: 1em;
|
||||||
|
BIN
webif/html/img/new_flag.png
Normal file
BIN
webif/html/img/new_flag.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@ -31,6 +31,7 @@ class settings {
|
|||||||
nohelplinks 0
|
nohelplinks 0
|
||||||
notwitfeed 0
|
notwitfeed 0
|
||||||
nounwatchedcount 0
|
nounwatchedcount 0
|
||||||
|
nounderscore 0
|
||||||
hidevisualota 0
|
hidevisualota 0
|
||||||
xepghours 4
|
xepghours 4
|
||||||
epgscroll 0
|
epgscroll 0
|
||||||
@ -220,6 +221,10 @@ settings method nounwatchedcount {{val -1}} {
|
|||||||
return [$self _nval_setting nounwatchedcount $val]
|
return [$self _nval_setting nounwatchedcount $val]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings method nounderscore {{val -1}} {
|
||||||
|
return [$self _nval_setting nounderscore $val]
|
||||||
|
}
|
||||||
|
|
||||||
settings method hidevisualota {{val -1}} {
|
settings method hidevisualota {{val -1}} {
|
||||||
return [$self _nval_setting hidevisualota $val]
|
return [$self _nval_setting hidevisualota $val]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user