diff --git a/var/mongoose/html/css/tsort.css b/var/mongoose/html/css/tsort.css new file mode 100644 index 00000000..3a842a96 --- /dev/null +++ b/var/mongoose/html/css/tsort.css @@ -0,0 +1,21 @@ + +table.tablesorter .header { + background-image: url(/img/tsort/bg.png); + background-repeat: no-repeat; + border-left: 1px solid #FFF; + border-right: 1px solid #000; + border-top: 1px solid #FFF; + padding-left: 30px; + padding-top: 8px; + height: auto; +} + +table.tablesorter .headerSortUp { + background-image: url(/img/tsort/asc.png); + background-repeat: no-repeat; +} + +table.tablesorter .headerSortDown { + background-image: url(/img/tsort/desc.png); + background-repeat: no-repeat; +} diff --git a/var/mongoose/html/img/tsort/asc.png b/var/mongoose/html/img/tsort/asc.png new file mode 100644 index 00000000..66e39cad Binary files /dev/null and b/var/mongoose/html/img/tsort/asc.png differ diff --git a/var/mongoose/html/img/tsort/bg.png b/var/mongoose/html/img/tsort/bg.png new file mode 100644 index 00000000..ca837161 Binary files /dev/null and b/var/mongoose/html/img/tsort/bg.png differ diff --git a/var/mongoose/html/img/tsort/desc.png b/var/mongoose/html/img/tsort/desc.png new file mode 100644 index 00000000..431f63ab Binary files /dev/null and b/var/mongoose/html/img/tsort/desc.png differ diff --git a/var/mongoose/html/js/jquery.tablesorter.js b/var/mongoose/html/js/jquery.tablesorter.js new file mode 100644 index 00000000..b8605df1 --- /dev/null +++ b/var/mongoose/html/js/jquery.tablesorter.js @@ -0,0 +1,4 @@ + +(function($){$.extend({tablesorter:new +function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((ab)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((ba)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i + + diff --git a/var/mongoose/include/diskspace.jim b/var/mongoose/include/diskspace.jim index f89cc983..040a1a3c 100755 --- a/var/mongoose/include/diskspace.jim +++ b/var/mongoose/include/diskspace.jim @@ -1,23 +1,24 @@ #!/mod/bin/jimsh -if {[os.gethostname] eq "hosting"} { - set size "1TB" - set used "100GB" - set perc "10" -} else { - set used 0 - set size 0 - set perc 0 - foreach df [split [exec df -h 2>>/dev/null] "\n\r"] { - if {[string match *sd?2* $df] || \ - [string match *media/drive1* $df]} { - regsub -all -- {[[:space:]]+} $df " " df - set fields [split $df] - set size [lindex $fields 1] - set used [lindex $fields 2] - set perc [string trimright [lindex $fields 4] "%"] - break - } +proc extract {line} { + regsub -all -- {[[:space:]]+} $line " " line + set fields [split $line] + set ::size [lindex $fields 1] + set ::used [lindex $fields 2] + set ::perc [string trimright [lindex $fields 4] "%"] +} + +set used 0 +set size 0 +set perc 0 + +foreach df [split [exec df -h 2>>/dev/null] "\n\r"] { + if {[string match *sd?2* $df]} { + extract $df + break; + } + if {[string match *media/drive* $df]} { + extract $df } } diff --git a/var/mongoose/include/sched.jim b/var/mongoose/include/sched.jim index 31c7ebfb..2c476404 100755 --- a/var/mongoose/include/sched.jim +++ b/var/mongoose/include/sched.jim @@ -6,10 +6,47 @@ require altrow rsv.class progressbar set events [rsv list] puts { - + + +
+ - + @@ -17,6 +54,8 @@ puts { + + } foreach event $events { @@ -67,7 +106,7 @@ foreach event $events { [$event channel_name] " } else { - puts "" + puts "" } puts "" @@ -130,7 +169,7 @@ foreach event $events { } puts "" } -puts "
Channel Channel Programme Start Time DurationEvent/Series ID Events
 

 

 $name
" +puts "" puts "Click on the CRID to view episodes." puts { diff --git a/var/mongoose/lib/plugin b/var/mongoose/lib/plugin index 363ca710..03e0858a 100644 --- a/var/mongoose/lib/plugin +++ b/var/mongoose/lib/plugin @@ -1,6 +1,6 @@ proc eval_plugins {hook} { - foreach plugin [glob /mod/var/mongoose/plugin/*] { + foreach plugin [glob -nocomplain /mod/var/mongoose/plugin/*] { if {[file isfile "$plugin/$hook.hook"]} { uplevel source "$plugin/$hook.hook" }