From 042f729006bdd7d94909ecbb4e8c6ef71d1b403e Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Sat, 19 Jan 2019 12:21:13 +0000 Subject: [PATCH] Show icon for folders containing _ items --- CONTROL/control | 2 +- webif/html/browse/_dir.jim | 21 +++++++++++++++++++++ webif/html/browse/index.jim | 2 ++ webif/html/browse/script.js | 16 ++++++++++++++++ webif/html/css/style.css | 31 ++++++++++++++++++++++++++++--- webif/html/img/new_flag.png | Bin 0 -> 3317 bytes webif/lib/settings.class | 5 +++++ 7 files changed, 73 insertions(+), 4 deletions(-) create mode 100755 webif/html/browse/_dir.jim create mode 100644 webif/html/img/new_flag.png diff --git a/CONTROL/control b/CONTROL/control index 079a3b8a..8a5190d7 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.4.4-2 +Version: 1.4.4-3 Architecture: mipsel 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 diff --git a/webif/html/browse/_dir.jim b/webif/html/browse/_dir.jim new file mode 100755 index 00000000..be3af946 --- /dev/null +++ b/webif/html/browse/_dir.jim @@ -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 "}" + diff --git a/webif/html/browse/index.jim b/webif/html/browse/index.jim index f299650d..762a1c7c 100755 --- a/webif/html/browse/index.jim +++ b/webif/html/browse/index.jim @@ -43,6 +43,7 @@ if {$order eq "-"} { } set nofcount [$config nounwatchedcount] +set nounderscore [$config nounderscore] set model [system model] set dustbin [system dustbin 1] @@ -63,6 +64,7 @@ proc directory {file bfile tbfile} { if {$bfile eq $::dustbin} { set img "/img/Dustbin_Folder.png" } puts "" if {!$::nofcount} { puts "" } + if {!$::nounderscore} { puts "_" } puts "" puts "|\/@])/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) diff --git a/webif/html/css/style.css b/webif/html/css/style.css index 2119ba5b..7542df1d 100644 --- a/webif/html/css/style.css +++ b/webif/html/css/style.css @@ -559,13 +559,38 @@ span.foldernum color: white; height: 15px; line-height: 16px; - background-color: #CC0000; - background: linear-gradient(#FF0000, #CC0000) repeat scroll 0 0 #EEEEEE; + background-color: #cc0000; + background: linear-gradient(#ff0000, #cc0000) 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; + -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; border-top-right-radius: 1em; border-top-left-radius: 1em; diff --git a/webif/html/img/new_flag.png b/webif/html/img/new_flag.png new file mode 100644 index 0000000000000000000000000000000000000000..8c7dd27c126d9d9aeacd1a8075757107c6962265 GIT binary patch literal 3317 zcmVuJ@VVD_UC<6{NG_fI~0ue<-1QkJoA_k0xBC#Thg@9ne9*`iQ#9$Or zQF$}6R&?d%y_c8YA7_1QpS|}zXYYO1x&V;8{kgn!SPFnNo`4_X6{c}T{8k*B#$jdxfFg<9uYy1K45IaYvHg`_dOZM)Sy63ve6hvv z1)yUy0P^?0*fb9UASvow`@mQCp^4`uNg&9uGcn1|&Nk+9SjOUl{-OWr@Hh0;_l(8q z{wNRKos+;6rV8ldy0Owz(}jF`W(JeRp&R{qi2rfmU!TJ;gp(Kmm5I1s5m_f-n#TRsj}B0%?E`vOzxB2#P=n*a3EfYETOrKoe*ICqM@{4K9Go;5xVgZi5G4 z1dM~{UdP6d+Yd3o?MrAqM0Kc|iV92owdyL5UC#5<>aVCa44|hpM4E zs0sQWIt5*Tu0n&*J!lk~f_{hI!w5`*sjxDv4V%CW*ah~3!{C*0BD@;TgA3v9a1~q+ zAA{TB3-ERLHar49hi4Ih5D^-ph8Q6X#0?2VqLBoIkE}zAkxHZUgRb+f=nat zP#6>iMMoK->`~sRLq)(kHo*Vn{;LcG6+edD1=7D>9j^O?D{Qg|tCDK{ym)H7&wDr6*;uGTJg8GHjVbnL{!cWyUB7MT6o-VNo_w8Yq`2<5Ub)hw4L3rj}5@qxMs0 zWMyP6Wy582WNT#4$d1qunl{acmP#w5ouJ*Jy_Zv#bCKi7ZIf$}8d zZdVy&)LYdbX%I9R8VMQ|8r>Q*nyQ)sn)#Z|n)kKvS`4iu ztvy=3T65Yu+7a4Yv^%sXb>ww?bn(=Yu(!=O6^iuTp>)p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R5W9~RHmo%A24}iZb3>N1+YzM zS>DAgS?emTuN7%$s0lD0v@uZ1;G0{;{K69M%zVbg`N?QBHUirgHF`XIiPPzOSY2I( z=XtPg8$t-AQp0Et?ZNZ>7u=p%#*t$a)E7;{aRLAU%lFFYkN0vU(gw@2(A*S6G};5l z5y&lkM0$1wV@J0Dj#KXMC00000NkvXXu0mjfZ7))h literal 0 HcmV?d00001 diff --git a/webif/lib/settings.class b/webif/lib/settings.class index cbbadab0..05361dd5 100644 --- a/webif/lib/settings.class +++ b/webif/lib/settings.class @@ -31,6 +31,7 @@ class settings { nohelplinks 0 notwitfeed 0 nounwatchedcount 0 + nounderscore 0 hidevisualota 0 xepghours 4 epgscroll 0 @@ -220,6 +221,10 @@ settings method nounwatchedcount {{val -1}} { return [$self _nval_setting nounwatchedcount $val] } +settings method nounderscore {{val -1}} { + return [$self _nval_setting nounderscore $val] +} + settings method hidevisualota {{val -1}} { return [$self _nval_setting hidevisualota $val] }