webif/webif/include/toolbar.jim
2019-11-17 16:07:56 +00:00

59 lines
1.2 KiB
Tcl
Executable File

#!/mod/bin/jimsh
require settings.class
if {[[settings] notoolbar] eq "0"} {
require plugin system.class
proc tb {icon txt link {height 50} {width 0}} {
if {$width > 0} {
set width " width=$width"
} else {
set width ""
}
puts -nonewline "<a href=\"$link\">
<span class=toolbarcell>
<img src=\"$icon\" height=${height}${width} border=0>
<br>
$txt
</span>
</a>
"
}
puts {
<!-- start of toolbar -->
<div class=toolbarouter>
<div id=toolbar class=toolbar style="display: none">
}
if {[file exists "/mod/bin/ir"]} {
tb "/img/remote.png" "Remote" "/plugin/ir/remote.jim"
}
tb "/images/323_1_10_Menu_Video.png" "Browse" "/go/mm_browse"
tb "/img/Menu_CHList.png" "Schedule" "/go/mm_schedule"
tb "/images/328_1_26_Menu_TV_Guide.png" "EPG" "/go/mm_epg"
tb "/img/spanner.png" "Services" "/go/mm_service"
tb "/img/packages.png" "Packages" "/go/mm_pkg"
tb "/images/326_1_00_Menu_Settings.png" "Settings" "/go/mm_settings"
tb "/img/diagnostics.png" "Diag" "/go/mm_diag"
if {[[settings] toolbarqueue]} {
tb "/img/queuep128.png" "Queue" "/go/mm_queue"
}
eval_plugins toolbar
puts {
<span class=cleft id=tbstatus></span>
</div>
</div>
<script type=text/javascript src=/js/toolbar.js> </script>
<!-- end of toolbar -->
}
}