summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/auto_complete_helper.js6
-rwxr-xr-xusr/local/www/datetimepicker.js17
-rwxr-xr-xusr/local/www/dom-drag.js13
-rwxr-xr-xusr/local/www/draglist.js18
-rwxr-xr-xusr/local/www/dtree.js52
-rwxr-xr-xusr/local/www/row_toggle.js5
-rwxr-xr-xusr/local/www/ticker.js54
7 files changed, 76 insertions, 89 deletions
diff --git a/usr/local/www/auto_complete_helper.js b/usr/local/www/auto_complete_helper.js
index 298bb4a..943eaea 100755
--- a/usr/local/www/auto_complete_helper.js
+++ b/usr/local/www/auto_complete_helper.js
@@ -45,7 +45,7 @@ function actb_parse(n){
for (i=0;i<p;i++){
tobuild += n.substr(i,1);
}
- tobuild += ""
+ tobuild += "";
for (i=p;i<t.length+p;i++){
tobuild += n.substr(i,1);
}
@@ -247,7 +247,7 @@ function actb_remake() {
width = c.width;
}
if(navigator.appName == "Microsoft Internet Explorer") {
- frame.width=width
+ frame.width=width;
frame.height=height;
}
}
@@ -333,7 +333,7 @@ function actb_tocomplete(sndr,evt,arr){
}
}
actb_pre = word;//actb_pos;
- }else{ actb_pre = -1};
+ }else{ actb_pre = -1; }
if (!sndr) sndr = evt.srcElement;
actb_curr = sndr;
diff --git a/usr/local/www/datetimepicker.js b/usr/local/www/datetimepicker.js
index c4d585a..a8a3615 100755
--- a/usr/local/www/datetimepicker.js
+++ b/usr/local/www/datetimepicker.js
@@ -65,7 +65,7 @@ function NewCal(pCtrl,pFormat,pShowTime,pTimeMode)
var Sp1;//Index of Date Separator 1
var Sp2;//Index of Date Separator 2
var tSp1;//Index of Time Separator 1
- var tSp1;//Index of Time Separator 2
+ var tSp2;//Index of Time Separator 2
var strMonth;
var strDate;
var strYear;
@@ -75,7 +75,7 @@ function NewCal(pCtrl,pFormat,pShowTime,pTimeMode)
var strMinute;
var strSecond;
//parse month
- Sp1=exDateTime.indexOf(DateSeparator,0)
+ Sp1=exDateTime.indexOf(DateSeparator,0);
Sp2=exDateTime.indexOf(DateSeparator,(parseInt(Sp1)+1));
if ((Cal.Format.toUpperCase()=="DDMMYYYY") || (Cal.Format.toUpperCase()=="DDMMMYYYY"))
@@ -108,7 +108,7 @@ function NewCal(pCtrl,pFormat,pShowTime,pTimeMode)
//parse time
if (Cal.ShowTime==true)
{
- tSp1=exDateTime.indexOf(":",0)
+ tSp1=exDateTime.indexOf(":",0);
tSp2=exDateTime.indexOf(":",(parseInt(tSp1)+1));
strHour=exDateTime.substring(tSp1,(tSp1)-2);
Cal.SetHour(strHour);
@@ -331,12 +331,11 @@ function SetHour(intHour)
{
var MaxHour;
var MinHour;
- if (TimeMode==24)
- { MaxHour=23;MinHour=0}
- else if (TimeMode==12)
- { MaxHour=12;MinHour=1}
- else
- alert("TimeMode can only be 12 or 24");
+ switch (TimeMode) {
+ case 24: { MaxHour=23;MinHour=0; break; }
+ case 12: { MaxHour=12;MinHour=1; break; }
+ default: { alert("TimeMode can only be 12 or 24"); break;}
+ }
var HourExp=new RegExp("^\\d\\d$");
if (HourExp.test(intHour) && (parseInt(intHour,10)<=MaxHour) && (parseInt(intHour,10)>=MinHour))
{
diff --git a/usr/local/www/dom-drag.js b/usr/local/www/dom-drag.js
index bbbf735..81273f8 100755
--- a/usr/local/www/dom-drag.js
+++ b/usr/local/www/dom-drag.js
@@ -10,7 +10,6 @@
* activating links when finished dragging.
* mmosier@astrolabe.com
**************************************************/
-<?php
/*
The DragList drag and drop ordered lists implementation is available under the terms of the new BSD license.
@@ -48,7 +47,6 @@
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-?>
var Drag = {
@@ -144,8 +142,8 @@ var Drag = {
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
- if (o.xMapper) nx = o.xMapper(y)
- else if (o.yMapper) ny = o.yMapper(x)
+ if (o.xMapper) nx = o.xMapper(y);
+ else if (o.yMapper) ny = o.yMapper(x);
Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
@@ -172,9 +170,10 @@ var Drag = {
{
document.onmousemove = null;
document.onmouseup = null;
- Drag.obj.root.onDragEnd( parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]),
- parseInt(Drag.obj.root.style[Drag.obj.vmode
- ? "top" : "bottom"]), Drag.obj.root);
+ Drag.obj.root.onDragEnd(
+ parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]),
+ parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]),
+ Drag.obj.root);
Drag.obj = null;
},
diff --git a/usr/local/www/draglist.js b/usr/local/www/draglist.js
index 721e036..bb62b7a 100755
--- a/usr/local/www/draglist.js
+++ b/usr/local/www/draglist.js
@@ -15,7 +15,6 @@
// http://www.formvista.com/contact.html
//
// LICENSE: This file is governed by the new BSD license. For more information
-<?php
/*
The DragList drag and drop ordered lists implementation is available under the terms of the new BSD license.
@@ -53,7 +52,6 @@
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-?>
//
// REVISION HISTORY:
//
@@ -188,13 +186,13 @@ fv_dragList.prototype.setup = function( orientation, itemTagName )
{
thisElem.style["top"] = "0px";
thisElem.style["left"] = "0px";
- }
+ };
} // end of for loop.
this.recalcOffsets( itemTagName );
- } // end of setup.
+ }; // end of setup.
// ----------------------------------------------
@@ -216,7 +214,7 @@ fv_dragList.prototype.do_submit = function( formName, dragListRootId )
expr = "document." + formName + ".submit()";
eval( expr );
- }
+ };
// ----------------------------------------------
// "Private" methods.
@@ -231,7 +229,7 @@ fv_dragList.prototype.recalcOffsets = function( itemTagName )
this.offsetsX[i] = listItems[i].offsetLeft;
this.offsetsY[i] = listItems[i].offsetTop;
}
- }
+ };
fv_dragList.prototype.getCurrentOffset = function(elem, itemTagName)
{
@@ -244,7 +242,7 @@ fv_dragList.prototype.getCurrentOffset = function(elem, itemTagName)
return i;
}
}
- }
+ };
fv_dragList.prototype.getDivWidth = function(elem)
{
@@ -259,7 +257,7 @@ fv_dragList.prototype.getDivWidth = function(elem)
}
return( value );
- }
+ };
fv_dragList.prototype.getDivHeight = function(elem)
{
@@ -274,7 +272,7 @@ fv_dragList.prototype.getDivHeight = function(elem)
}
return( value );
- }
+ };
/**
* return list of draggable items
@@ -290,7 +288,7 @@ fv_dragList.prototype.getListItems = function( itemTagName )
var listItems = this.listRoot.getElementsByTagName( itemTagName );
return( listItems );
- }
+ };
// end of draglist class definition.
diff --git a/usr/local/www/dtree.js b/usr/local/www/dtree.js
index b30dcf7..e82f0bf 100755
--- a/usr/local/www/dtree.js
+++ b/usr/local/www/dtree.js
@@ -6,12 +6,12 @@ function navigate(url) {
function getElById(idVal) {
if (document.getElementById != null)
- return document.getElementById(idVal)
+ return document.getElementById(idVal);
if (document.all != null)
- return document.all[idVal]
+ return document.all[idVal];
- alert("Problem getting element by id")
- return null
+ alert("Problem getting element by id");
+ return null;
}
@@ -55,7 +55,7 @@ function Node(id, pid, name, url, title, target, icon, iconOpen, open , checkabl
this._p;
-};
+}
// Tree object
@@ -81,7 +81,7 @@ function dTree(objName) {
inOrder : false
- }
+ };
this.icon = {
@@ -129,7 +129,7 @@ function dTree(objName) {
this.completed = false;
-};
+}
@@ -486,7 +486,7 @@ dTree.prototype.generate_checkedlist = function(id) {
}
return retStr;
-}
+};
// Toggle Open or close
@@ -514,7 +514,7 @@ dTree.prototype.oAll = function(status) {
if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) {
- this.nodeStatus(status, n, this.aNodes[n]._ls)
+ this.nodeStatus(status, n, this.aNodes[n]._ls);
this.aNodes[n]._io = status;
@@ -586,7 +586,7 @@ dTree.prototype.closeLevel = function(node) {
}
-}
+};
@@ -608,7 +608,7 @@ dTree.prototype.closeAllChildren = function(node) {
}
-}
+};
@@ -661,19 +661,12 @@ dTree.prototype.clearCookie = function() {
// [Cookie] Sets value in a cookie
dTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {
-
document.cookie =
-
- escape(cookieName) + '=' + escape(cookieValue)
-
- + (expires ? '; expires=' + expires.toGMTString() : '')
-
- + (path ? '; path=' + path : '')
-
- + (domain ? '; domain=' + domain : '')
-
- + (secure ? '; secure' : '');
-
+ escape(cookieName) + '=' + escape(cookieValue) +
+ (expires ? '; expires=' + expires.toGMTString() : '') +
+ (path ? '; path=' + path : '') +
+ (domain ? '; domain=' + domain : '') +
+ (secure ? '; secure' : '');
};
@@ -734,12 +727,11 @@ dTree.prototype.isOpen = function(id) {
var aOpen = this.getCookie('co' + this.obj).split('.');
- for (var n=0; n<aOpen.length; n++)
-
+ for (var n=0; n<aOpen.length; n++) {
if (aOpen[n] == id) return true;
+ }
return false;
-
};
@@ -756,9 +748,9 @@ if (!Array.prototype.push) {
return this.length;
- }
+ };
-};
+}
if (!Array.prototype.pop) {
@@ -770,6 +762,6 @@ if (!Array.prototype.pop) {
return lastElement;
- }
+ };
-};
+}
diff --git a/usr/local/www/row_toggle.js b/usr/local/www/row_toggle.js
index 62fe0b8..6a1f5f8 100755
--- a/usr/local/www/row_toggle.js
+++ b/usr/local/www/row_toggle.js
@@ -18,10 +18,11 @@ function fr_bgcolor(id) {
}
function fr_insline(id, on) {
var row = document.getElementById('fr' + id);
+ var prevrow;
if (id != 0) {
- var prevrow = document.getElementById('fr' + (id-1));
+ prevrow = document.getElementById('fr' + (id-1));
} else {
- var prevrow = document.getElementById('frheader');
+ prevrow = document.getElementById('frheader');
}
var cells = row.getElementsByTagName("td");
diff --git a/usr/local/www/ticker.js b/usr/local/www/ticker.js
index bc4ddc6..77d3c63 100755
--- a/usr/local/www/ticker.js
+++ b/usr/local/www/ticker.js
@@ -1,52 +1,50 @@
<!--
-var width="310px"
+var width="310px";
-var speed=2
-var pauseit=1
+var speed=2;
+var pauseit=1;
-var divonclick=speed=(document.all)? speed : Math.max(1, speed-1)
-var copyspeed=speed
-var pausespeed=(pauseit==0)? copyspeed: 0
-var iedom=document.all||document.getElementById
+var divonclick=speed=(document.all)? speed : Math.max(1, speed-1);
+var copyspeed=speed;
+var pausespeed=(pauseit==0)? copyspeed: 0;
+var iedom=document.all||document.getElementById;
if (iedom)
- document.write('<span id="marquee-container">'+content+'</span>')
+ document.write('<span id="marquee-container">'+content+'</span>');
-var actualwidth=''
-var scroller
+var actualwidth='';
+var scroller;
if (window.addEventListener)
- window.addEventListener("load", populatescroller, false)
+ window.addEventListener("load", populatescroller, false);
else if (window.attachEvent)
- window.attachEvent("onload", populatescroller)
+ window.attachEvent("onload", populatescroller);
else if (document.all || document.getElementById)
- window.onload=populatescroller
+ window.onload=populatescroller;
function populatescroller(){
- scroller=document.getElementById? document.getElementById("scroller") : document.all.scroller
- scroller.style.left=parseInt(width)+8+"px"
-
- scroller.innerHTML=content
- actualwidth=document.all? document.getElementById("marquee-text").offsetWidth : document.getElementById("marquee-text").offsetWidth
- lefttime=setInterval("scrollmarquee()",20)
+ scroller=document.getElementById? document.getElementById("scroller") : document.all.scroller;
+ scroller.style.left=parseInt(width)+8+"px";
+ scroller.innerHTML=content;
+ document.getElementById("marquee-text");
+ actualwidth=document.all? document.getElementById("marquee-text").offsetWidth : document.getElementById("marquee-text").offsetWidth;
+ lefttime=setInterval("scrollmarquee()",20);
}
function scrollmarquee(){
if (parseInt(scroller.style.left)>(actualwidth*(-1)+8))
- scroller.style.left=parseInt(scroller.style.left)-copyspeed+"px"
+ scroller.style.left=parseInt(scroller.style.left)-copyspeed+"px";
else
- scroller.style.left=parseInt(width)+8+"px"
+ scroller.style.left=parseInt(width)+8+"px";
}
if (iedom){
- with (document){
- document.write('<table id="marquee"><td>')
- write('<div id="container" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=speed">')
- write('<div id="scroller"></div>')
- write('</div>')
- document.write('</td></table>')
- }
+ document.write('<table id="marquee"><td>');
+ document.write('<div id="container" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=speed">');
+ document.write('<div id="scroller"></div>');
+ document.write('</div>');
+ document.write('</td></table>');
}
//--> \ No newline at end of file
OpenPOWER on IntegriCloud