1.0.1
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1534 2a923420-c742-0410-a762-8d5b09965624
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 1.0.0-2
|
||||
Version: 1.0.1
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif-channelicons(>=1.0.5),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.13),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.05),ffmpeg,id3v2
|
||||
|
@ -105,6 +105,10 @@ foreach line [split [exec /mod/bin/smartctl -A $device] "\n"] {
|
||||
$settings _nval_setting "SMART_realloc" $rval
|
||||
if {$rval > 0} { set class orangeshade }
|
||||
}
|
||||
10 {
|
||||
$settings _nval_setting "SMART_spinretry" $rval
|
||||
if {$rval > 0} { set class orangeshade }
|
||||
}
|
||||
197 {
|
||||
$settings _nval_setting "SMART_pending" $rval
|
||||
if {$rval > 0} { set class redshade }
|
||||
|
@ -14,8 +14,8 @@
|
||||
//
|
||||
// For details, visit http://creativecommons.org/licenses/by/3.0/us/
|
||||
|
||||
// Modified by Andy Fiddaman to support left click and
|
||||
// support modification of menu items.
|
||||
// Modified by af123 to support left click, modification of menu items and
|
||||
// utilise jQuery.ui.position for smart element positioning.
|
||||
|
||||
if (jQuery) (function() {
|
||||
$.extend($.fn, {
|
||||
@ -53,31 +53,17 @@ if (jQuery) (function() {
|
||||
|
||||
if (o.beforeShow) o.beforeShow(el, menu);
|
||||
|
||||
// Detect mouse position
|
||||
var d = {}, x, y;
|
||||
if (self.innerHeight) {
|
||||
d.pageYOffset = self.pageYOffset;
|
||||
d.pageXOffset = self.pageXOffset;
|
||||
d.innerHeight = self.innerHeight;
|
||||
d.innerWidth = self.innerWidth;
|
||||
} else if (document.documentElement &&
|
||||
document.documentElement.clientHeight) {
|
||||
d.pageYOffset = document.documentElement.scrollTop;
|
||||
d.pageXOffset = document.documentElement.scrollLeft;
|
||||
d.innerHeight = document.documentElement.clientHeight;
|
||||
d.innerWidth = document.documentElement.clientWidth;
|
||||
} else if (document.body) {
|
||||
d.pageYOffset = document.body.scrollTop;
|
||||
d.pageXOffset = document.body.scrollLeft;
|
||||
d.innerHeight = document.body.clientHeight;
|
||||
d.innerWidth = document.body.clientWidth;
|
||||
}
|
||||
(e.pageX) ? x = e.pageX : x = e.clientX + d.scrollLeft;
|
||||
(e.pageY) ? y = e.pageY : x = e.clientY + d.scrollTop;
|
||||
|
||||
// Show the menu
|
||||
$(document).unbind('click');
|
||||
$(menu).css({ top: y, left: x }).fadeIn(o.inSpeed);
|
||||
// $(menu).css({ top: y, left: x }).fadeIn(o.inSpeed);
|
||||
$(menu).css('display', 'block').position({
|
||||
my: "left top",
|
||||
at: "right bottom",
|
||||
of: this,
|
||||
offset: "0 5",
|
||||
collision: "fit"
|
||||
}).css('display', 'none').fadeIn(o.inSpeed);
|
||||
|
||||
// Hover events
|
||||
$(menu).find('A').mouseover(function() {
|
||||
$(menu).find('LI.hover').removeClass('hover');
|
||||
|
21
var/mongoose/html/lib/jquery.contextMenu/extra.css
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
.context-menu-item.icon-pwedit { background-image: url(/img/context/page_white_edit.png); }
|
||||
.context-menu-item.icon-pwcopy { background-image: url(/img/context/page_white_copy.png); }
|
||||
.context-menu-item.icon-pwpaste { background-image: url(/img/context/page_white_paste.png); }
|
||||
.context-menu-item.icon-pwdelete { background-image: url(/img/context/page_white_delete.png); }
|
||||
.context-menu-item.icon-edit { background-image: url(/img/context/edit.png); }
|
||||
.context-menu-item.icon-copy { background-image: url(/img/context/copy.png); }
|
||||
.context-menu-item.icon-paste { background-image: url(/img/context/paste.png); }
|
||||
.context-menu-item.icon-delete { background-image: url(/img/context/delete.png); }
|
||||
.context-menu-item.icon-cut { background-image: url(/img/context/cut.png); }
|
||||
.context-menu-item.icon-quit { background-image: url(/img/context/door.png); }
|
||||
.context-menu-item.icon-compress { background-image: url(/img/context/compress.png); }
|
||||
.context-menu-item.icon-compressr { background-image: url(/img/context/compressr.png); }
|
||||
.context-menu-item.icon-dedup { background-image: url(/img/context/dedup.png); }
|
||||
.context-menu-item.icon-decrypt { background-image: url(/img/context/decrypt.png); }
|
||||
.context-menu-item.icon-decryptr { background-image: url(/img/context/decryptr.png); }
|
||||
.context-menu-item.icon-mpg { background-image: url(/img/context/mpg.png); }
|
||||
.context-menu-item.icon-mp3 { background-image: url(/img/context/mp3.png); }
|
||||
.context-menu-item.icon-clock { background-image: url(/img/context/clock.png); }
|
||||
.context-menu-item.icon-thm { background-image: url(/img/context/thumb.png); }
|
||||
|
BIN
var/mongoose/html/lib/jquery.contextMenu/images/cut.png
Normal file
After Width: | Height: | Size: 648 B |
BIN
var/mongoose/html/lib/jquery.contextMenu/images/door.png
Normal file
After Width: | Height: | Size: 412 B |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 309 B |
After Width: | Height: | Size: 536 B |
After Width: | Height: | Size: 618 B |
After Width: | Height: | Size: 620 B |
142
var/mongoose/html/lib/jquery.contextMenu/jquery.contextMenu.css
Normal file
@ -0,0 +1,142 @@
|
||||
/*!
|
||||
* jQuery contextMenu - Plugin for simple contextMenu handling
|
||||
*
|
||||
* Version: git-master
|
||||
*
|
||||
* Authors: Rodney Rehm, Addy Osmani (patches for FF)
|
||||
* Web: http://medialize.github.com/jQuery-contextMenu/
|
||||
*
|
||||
* Licensed under
|
||||
* MIT License http://www.opensource.org/licenses/mit-license
|
||||
* GPL v3 http://opensource.org/licenses/GPL-3.0
|
||||
*
|
||||
*/
|
||||
|
||||
.context-menu-list {
|
||||
margin:0;
|
||||
padding:0;
|
||||
|
||||
min-width: 120px;
|
||||
max-width: 250px;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
list-style-type: none;
|
||||
|
||||
border: 1px solid #DDD;
|
||||
background: #EEE;
|
||||
|
||||
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.context-menu-item {
|
||||
padding: 2px 2px 2px 24px;
|
||||
background-color: #EEE;
|
||||
position: relative;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: -moz-none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.context-menu-separator {
|
||||
padding-bottom:0;
|
||||
border-bottom: 1px solid #DDD;
|
||||
}
|
||||
|
||||
.context-menu-item > label > input,
|
||||
.context-menu-item > label > textarea {
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.context-menu-item.hover {
|
||||
cursor: pointer;
|
||||
background-color: #39F;
|
||||
}
|
||||
|
||||
.context-menu-item.disabled {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.context-menu-input.hover,
|
||||
.context-menu-item.disabled.hover {
|
||||
cursor: default;
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
.context-menu-submenu:after {
|
||||
content: ">";
|
||||
color: #666;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 3px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* icons
|
||||
#protip:
|
||||
In case you want to use sprites for icons (which I would suggest you do) have a look at
|
||||
http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement
|
||||
.context-menu-item.icon:before {}
|
||||
*/
|
||||
.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }
|
||||
.context-menu-item.icon-edit { background-image: url(images/page_white_edit.png); }
|
||||
.context-menu-item.icon-cut { background-image: url(images/cut.png); }
|
||||
.context-menu-item.icon-copy { background-image: url(images/page_white_copy.png); }
|
||||
.context-menu-item.icon-paste { background-image: url(images/page_white_paste.png); }
|
||||
.context-menu-item.icon-delete { background-image: url(images/page_white_delete.png); }
|
||||
.context-menu-item.icon-add { background-image: url(images/page_white_add.png); }
|
||||
.context-menu-item.icon-quit { background-image: url(images/door.png); }
|
||||
|
||||
/* vertically align inside labels */
|
||||
.context-menu-input > label > * { vertical-align: top; }
|
||||
|
||||
/* position checkboxes and radios as icons */
|
||||
.context-menu-input > label > input[type="checkbox"],
|
||||
.context-menu-input > label > input[type="radio"] {
|
||||
margin-left: -17px;
|
||||
}
|
||||
.context-menu-input > label > span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.context-menu-input > label,
|
||||
.context-menu-input > label > input[type="text"],
|
||||
.context-menu-input > label > textarea,
|
||||
.context-menu-input > label > select {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.context-menu-input > label > textarea {
|
||||
height: 100px;
|
||||
}
|
||||
.context-menu-item > .context-menu-list {
|
||||
display: none;
|
||||
/* re-positioned by js */
|
||||
right: -5px;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.context-menu-item.hover > .context-menu-list {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.context-menu-accesskey {
|
||||
text-decoration: underline;
|
||||
}
|
1686
var/mongoose/html/lib/jquery.contextMenu/jquery.contextMenu.js
Normal file
@ -7,7 +7,7 @@ if {[system model] eq "HDR"} {
|
||||
|
||||
require settings.class
|
||||
|
||||
set smartattrs {realloc pending offline}
|
||||
set smartattrs {realloc pending offline spinretry}
|
||||
|
||||
set smartattribs(SMART_status) "Unknown"
|
||||
foreach sa $smartattrs {
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/webif/lib/setup
|
||||
require settings.class plugin
|
||||
require system.class settings.class plugin
|
||||
|
||||
proc menuitem {title icon link {width 217} {height 0} {extra ""}} {{num 0}} {
|
||||
if {$title eq "-reset"} {
|
||||
|
@ -29,23 +29,19 @@ foreach line [split [exec /mod/bin/smartctl -A -f brief $disk] "\n"] {
|
||||
|
||||
#puts "Attrs: ($attrs)"
|
||||
puts "SMART: ($smart)"
|
||||
puts "Reallocated: $attrs(5)"
|
||||
puts "Pending: $attrs(197)"
|
||||
puts "Offline: $attrs(198)"
|
||||
|
||||
if {[dict exists $attrs 5]} {
|
||||
$settings _nval_setting "SMART_realloc" $attrs(5)
|
||||
}
|
||||
if {[dict exists $attrs 197]} {
|
||||
$settings _nval_setting "SMART_pending" $attrs(197)
|
||||
if {$attrs(197) < [$settings _nval_setting "SMART_ack_pending"]} {
|
||||
$settings _nval_setting "SMART_ack_pending" $attrs(197)
|
||||
}
|
||||
}
|
||||
if {[dict exists $attrs 198]} {
|
||||
$settings _nval_setting "SMART_offline" $attrs(198)
|
||||
if {$attrs(198) < [$settings _nval_setting "SMART_ack_offline"]} {
|
||||
$settings _nval_setting "SMART_ack_offline" $attrs(198)
|
||||
foreach a {
|
||||
{5 "realloc"}
|
||||
{10 "spinretry"}
|
||||
{197 "pending"}
|
||||
{198 "offline"}
|
||||
} {
|
||||
lassign $a id attr
|
||||
if {![dict exists $attrs $id]} continue
|
||||
puts "$attr: $attrs($id)"
|
||||
$settings _nval_setting "SMART_$attr" $attrs($id)
|
||||
if {$attrs($id) < [$settings _nval_setting "SMART_ack_$attr"]} {
|
||||
$settings _nval_setting "SMART_ack_$attr" $attrs($id)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,9 +17,9 @@ if {![exists -proc require]} {
|
||||
puts -nonewline "Pragma: no-cache\r\n"
|
||||
puts -nonewline "Cache-Control: no-cache\r\n"
|
||||
} else {
|
||||
puts "Content-Type: $type; charset=\"UTF-8\"\r\n"
|
||||
puts -nonewline "Content-Type: $type; charset=\"UTF-8\"\r\n"
|
||||
}
|
||||
puts -nonewline $extra
|
||||
if {$extra ne ""} { puts -nonewline "$extra" }
|
||||
puts -nonewline "\r\n"
|
||||
set done 1
|
||||
}
|
||||
|