Remove trailing whitespace

This commit is contained in:
j883376
2013-05-06 13:07:41 -04:00
parent 7a93966158
commit ffcff4aea1
548 changed files with 16397 additions and 16398 deletions
+52 -52
View File
@@ -12,7 +12,7 @@
// | notice, this list of conditions and the following disclaimer. |
// | o Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution.|
// | documentation and/or other materials provided with the distribution.|
// | o The names of the authors may not be used to endorse or promote |
// | products derived from this software without specific prior written |
// | permission. |
@@ -51,7 +51,7 @@
this.imgWidth = 20;
this.imgHeight = 20;
this.n = new Array();
this.branches = new Array();
this.branchStatus = new Array();
this.layerRelations = new Array();
@@ -79,10 +79,10 @@
newNode.lineImageWidth = this.imgWidth;
newNode.lineImageHeight = this.imgHeight;
this.n[newIndex] = newNode;
return this.n[newIndex];
}
TreeMenu.prototype.SetImageSize = function(w, h) {
this.imgWidth = w;
this.imgHeight = h;
@@ -96,15 +96,15 @@
var plustop = new Image; plustop.src = this.iconpath + '/plustop.gif';
var plusbottom = new Image; plusbottom.src = this.iconpath + '/plusbottom.gif';
var plus = new Image; plus.src = this.iconpath + '/plus.gif';
var minustop = new Image; minustop.src = this.iconpath + '/minustop.gif';
var minusbottom = new Image; minusbottom.src = this.iconpath + '/minusbottom.gif';
var minus = new Image; minus.src = this.iconpath + '/minus.gif';
var branchtop = new Image; branchtop.src = this.iconpath + '/branchtop.gif';
var branchbottom = new Image; branchbottom.src = this.iconpath + '/branchbottom.gif';
var branch = new Image; branch.src = this.iconpath + '/branch.gif';
var linebottom = new Image; linebottom.src = this.iconpath + '/linebottom.gif';
var line = new Image; line.src = this.iconpath + '/line.gif';
}
@@ -122,7 +122,7 @@
var modifier = '';
var layerID = '';
var parentLayerID = '';
/**
* Parse any optional arguments
*/
@@ -132,19 +132,19 @@
var expanded = arguments[3] ? arguments[3] : false;
var visibility = arguments[4] ? arguments[4] : 'inline';
var parentLayerID = arguments[5] ? arguments[5] : null;
var currentlevel = level.length;
for (var i=0; i<nodes.length; i++) {
level[currentlevel] = i+1;
layerID = this.myname + '_' + 'node_' + this.implode('_', level);
/**
* Store the child/parent relationship
*/
this.childParents[layerID] = parentLayerID;
/**
* Gif modifier
*/
@@ -155,25 +155,25 @@
} else {
modifier = "";
}
/**
* Single root branch is always expanded
*/
if (!this.doesMenu() || (parentLayerID == null && nodes.length == 1)) {
expanded = true;
} else if (nodes[i].expanded) {
expanded = true;
} else {
expanded = false;
}
/**
* Make sure visibility is correct based on parent status
*/
visibility = this.checkParentVisibility(layerID) ? visibility : 'none';
/**
* Setup branch status and build an indexed array
* of branch layer ids
@@ -182,7 +182,7 @@
this.branchStatus[layerID] = expanded;
this.branches[this.branches.length] = layerID;
}
/**
* Setup toggle relationship
*/
@@ -190,15 +190,15 @@
this.layerRelations[parentLayerID] = new Array();
}
this.layerRelations[parentLayerID][this.layerRelations[parentLayerID].length] = layerID;
/**
* Branch images
*/
var gifname = nodes[i].n.length && this.doesMenu() && nodes[i].isDynamic ? (expanded ? 'minus' : 'plus') : 'branch';
// cc 2002-11-12 variable image dimensions to line below
var iconimg = nodes[i].icon ? this.stringFormat('<img src="{0}/{1}" width="{2}" height="{3}" align="top">', this.iconpath, nodes[i].icon, nodes[i].iconImageWidth, nodes[i].iconImageHeight) : '';
/**
* Build the html to write to the document
* IMPORTANT:
@@ -210,14 +210,14 @@
var imgTag = this.stringFormat('<img src="{0}/{1}{2}.gif" width="{5}" height="{6}" align="top" border="0" name="img_{3}" {4}>', this.iconpath, gifname, modifier, layerID, onMDown, nodes[i].lineImageWidth, nodes[i].lineImageHeight);
var linkStart = nodes[i].link ? this.stringFormat('<a href="{0}" target="{1}">', nodes[i].link, this.linkTarget) : '';
var linkEnd = nodes[i].link ? '</a>' : '';
// cc 2002-11-12 All these are additions
var selectedStart = nodes[i].selected ? "<span class='"+nodes[i].selected+"'>" : '';
var selectedEnd = nodes[i].selected ? '</span>' : '';
var nobrStart = this.brOK ? '' : '<nobr>';
var nobrEnd = this.brOK ? '' : '</nobr>';
// cc 2002-11-12 modified
output = this.stringFormat('{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}<br></div>',
layerTag,
@@ -229,7 +229,7 @@
nodes[i].title,
linkEnd, selectedEnd,
nobrEnd);
/**
* Write out the HTML. Uses document.write for speed over layers and
* innerHTML. This however means no dynamic adding/removing nodes on
@@ -249,15 +249,15 @@
*/
if (parentLayerID == null && nodes.length == 1) {
var newPrepend = '';
} else if (i < (nodes.length - 1)) {
// cc 2002-11-12 Both lines, added image size parameters.
var newPrepend = prepend + this.stringFormat('<img src="{0}/line.gif" width="{1}" height="{2}" align="top">', this.iconpath, nodes[i].lineImageWidth, nodes[i].lineImageHeight);
} else {
var newPrepend = prepend + this.stringFormat('<img src="{0}/linebottom.gif" width="{1}" height="{2}" align="top">', this.iconpath, nodes[i].lineImageWidth, nodes[i].lineImageHeight);
}
this.drawMenu(nodes[i].n,
level,
newPrepend,
@@ -276,26 +276,26 @@
{
var currentDisplay = this.getLayer(layerID).style.display;
var newDisplay = (this.branchStatus[layerID] && currentDisplay == 'inline') ? 'none' : 'inline'
for (var i=0; i<this.layerRelations[layerID].length; i++) {
if (this.branchStatus[this.layerRelations[layerID][i]]) {
this.toggleBranch(this.layerRelations[layerID][i], false);
}
this.getLayer(this.layerRelations[layerID][i]).style.display = newDisplay;
}
if (updateStatus) {
this.branchStatus[layerID] = !this.branchStatus[layerID];
/**
* Persistence
*/
if (this.doesPersistence() && !arguments[2] && this.usePersistence) {
this.setExpandedStatusForCookie(layerID, this.branchStatus[layerID]);
}
// Swap image
this.swapImage(layerID);
}
@@ -307,10 +307,10 @@
TreeMenu.prototype.swapImage = function (layerID)
{
imgSrc = document.images['img_' + layerID].src;
re = /^(.*)(plus|minus)(bottom|top|single)?.gif$/
if (matches = imgSrc.match(re)) {
document.images['img_' + layerID].src = this.stringFormat('{0}{1}{2}{3}',
matches[1],
matches[2] == 'plus' ? 'minus' : 'plus',
@@ -342,10 +342,10 @@
{
if (is_ie4) {
return document.all(layerID);
} else if (document.getElementById(layerID)) {
return document.getElementById(layerID);
} else if (document.all(layerID)) {
return document.all(layerID);
}
@@ -401,7 +401,7 @@
cookieString[cookieString.length] = i;
}
}
document.cookie = 'TreeMenuBranchStatus=' + cookieString.join(':');
}
@@ -450,7 +450,7 @@
}
/**
* Checks whether a branch should be open
* Checks whether a branch should be open
* or not based on its parents' status
*/
TreeMenu.prototype.checkParentVisibility = function (layerID)
@@ -458,13 +458,13 @@
if (this.in_array(this.childParents[layerID], this.branches)
&& this.branchStatus[this.childParents[layerID]]
&& this.checkParentVisibility(this.childParents[layerID]) ) {
return true;
} else if (this.childParents[layerID] == null) {
return true;
}
return false;
}
@@ -474,13 +474,13 @@
TreeMenu.prototype.stringFormat = function (strInput)
{
var idx = 0;
for (var i=1; i<arguments.length; i++) {
while ((idx = strInput.indexOf('{' + (i - 1) + '}', idx)) != -1) { // cc 2002-11-12 fix 10<i<=100
strInput = strInput.substring(0, idx) + arguments[i] + strInput.substr(idx + (i<=10?3:4));
}
}
return strInput;
}
@@ -490,7 +490,7 @@
TreeMenu.prototype.implode = function (seperator, input)
{
var output = '';
for (var i=0; i<input.length; i++) {
if (i == 0) {
output += input[i];
@@ -498,7 +498,7 @@
output += seperator + input[i];
}
}
return output;
}
@@ -512,7 +512,7 @@
return true;
}
}
return false;
}
@@ -545,7 +545,7 @@
newNode.lineImageWidth = this.lineImageWidth;
newNode.lineImageHeight = this.lineImageHeight;
this.n[newIndex] = newNode;
return this.n[newIndex];
}
@@ -553,7 +553,7 @@
* That's the end of the tree classes. What follows is
* the browser detection code.
*/
//<!--
// Ultimate client-side JavaScript client sniff. Version 3.03
@@ -561,7 +561,7 @@
// Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
// Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up
// also added support for IE5.5 Opera4&5 HotJava3 AOLTV
// Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4,
// Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4,
// correct Opera 5 detection
// add support for winME and win2k
// synch with browser-type-oo.js
@@ -600,7 +600,7 @@
//
// Note: you don't want your Nav4 or IE4 code to "turn off" or
// stop working when new versions of browsers are released, so
// in conditional code forks, use is_ie5up ("IE 5.0 or greater")
// in conditional code forks, use is_ie5up ("IE 5.0 or greater")
// is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5
// to check version in code which you want to work on future
// versions.