Software: Apache. PHP/5.5.15 uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 SYSTEM Safe-mode: OFF (not secure) C:\Users\Administrator\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\Z3WY4CH4\ drwxrwxrwx |
Viewing file: Select action/file-type: gDebugShowElms=false; // ============================================================================= // Bookmark Jump Tag Table - Use the tags to search for bookmarks in the code // ============================================================================= // Jump Tags - Description // ----------------------------------------------------------------------------- // 1176233654 - PROC - "addTableRow()" // 1176238636 - PROC - "copyProps()" // 1176238671 - PROC - "updateTreeSelection()" // 1176305779 - PROC - "clearTable()" // //----------------------------------------------------------------------------// // UI.JS include file //----------------------------------------------------------------------------// // I removed the link to load DOMAPI, and moved it to the frameTree.html file since // that is the only frame that uses it. There is no point in taking the load // performance hit here if we don't need it, but I'll leave the link just in case. // [BrandonB] 4/10/2007 // document.writeln("<script type='text\/javascript' src='../lib/domapi/src/domapi.js?theme=IBM'><\/script>"); // Not including wsman lib here as it'll be better if be load at top frame where all the data and // be retreived and stored. Individual pages will just get it and display it - Manish 04/12/2007 //document.writeln("<script type='text\/javascript' src='../lib/wsman/wsman.js'><\/script>"); // Little function to take an array of IDs and expose them // in the global DOM. IDs should have a leading underscore, // and they will be exposed without it, for example an ID of // _txtStatus will be exposed globally as txtStatus // Changing code to not use eval as it invokes the compiler and costs performance // - Manish 4/12/2007 function exposeElms(array) { for (var i=0;i<array.length;i++) { if (array[i]) { var actualElm=array[i].substr(1); window[actualElm] = document.getElementById(array[i]); if (gDebugShowElms) { window[actualElm].style.backgroundColor = '#ffdf00'; // Color the elms with yellow to show where they are window[actualElm].style.border = '1px dashed purple'; // Color the elms with yellow to show where they are window[actualElm].title = actualElm; // Show the elms ID on hover } } } } //______________________________________________________________________________ //============================================================================== // addTableRow //------------------------------------------------------------------------------ // Given a reference to a table, and an array of cells to write, this function // will create a new TR element and fill it with the same number of // TD elements as the array length. arg is an object whose properties I may // need to expand upon as time goes by... // // // Input // ----- // rTable - reference to a table // // arCells - array of strings to go into the cells // // oRowProps - object with properties to be applied to TR // Ex: {align:'center'} // // arCellProps - array of objects with properties to be applied to each TD // Ex1: to add a row that spans 4 columns, you only need one cell entry // with a colspan // [{colspan:4, style:{ textAlign:'left', fontWeight:'bold'}}] // Ex2: to add centering and bold to each cell of a 3 column table // [ {style:{ textAlign:'left', fontWeight:'bold'}}, // {style:{ textAlign:'left', fontWeight:'bold'}}, // {style:{ textAlign:'left', fontWeight:'bold'}} ] // Output // ------ // - // Author:BMB //______________________________________________________________________________ //============================================================================== // Jump Tag 1176233654 [ PROC - "addTableRow()" ] function addTableRow(rTable, arCells, arCellProps, oRowProps) { // First get ref to parent for appending rows - this could be the TABLE // or TBODY var p=rTable; // parent container is TABLE var tb=rTable.getElementsByTagName("TBODY"); if (tb.length) { p=tb[0]; // parent container is TBODY, not TABLE } var xx=document.createElement("TR"); if (oRowProps!=undefined) { copyProps(xx,oRowProps); } for (var i=0;i<arCells.length;i++) { var yy=document.createElement("TD"); yy.noWrap=true; var val=(arCells[i]==""?" ":arCells[i]); if (arCellProps!=undefined) { if (arCellProps[i]!=undefined) { copyProps(yy, arCellProps[i]); } } yy.innerHTML=val; xx.appendChild(yy); } p.appendChild(xx); } function addTableRowWithRowHead(rTable, arCells, arCellProps, oRowProps) { // First get ref to parent for appending rows - this could be the TABLE // or TBODY var p=rTable; // parent container is TABLE var tb=rTable.getElementsByTagName("TBODY"); if (tb.length) { p=tb[0]; // parent container is TBODY, not TABLE } var xx=document.createElement("TR"); if (oRowProps!=undefined) { copyProps(xx,oRowProps); } for (var i=0;i<arCells.length;i++) { if(i==0){ var yy=document.createElement("TH"); }else{ var yy=document.createElement("TD"); } yy.noWrap=true; var val=(arCells[i]==""?" ":arCells[i]); if (arCellProps!=undefined) { if (arCellProps[i]!=undefined) { copyProps(yy, arCellProps[i]); } } yy.innerHTML=val; xx.appendChild(yy); } p.appendChild(xx); } //______________________________________________________________________________ //============================================================================== // clearTable //------------------------------------------------------------------------------ // Clears a table of all rows. Used for redrawing the table after a sort // or filter operation // // Input // ----- // rTable - reference to table // // offset0Based - first row to start deleting. All rows below this one will // be clobbered. Used to preserve table header rows. Defaults // to 1 because typically this function will only be called for // dynamically updated tables, which will probably have a header row. // Pass 0 to kill all table rows. // // Output // ------ // - // // Author:BMB //______________________________________________________________________________ //============================================================================== // Jump Tag 1176305779 [ PROC - "clearTable()" ] function clearTable(rTable, offset0Based) { var firstrow=(offset0Based==undefined?1:offset0Based); // First get ref to parent for appending rows - this could be the TABLE // or TBODY var p=rTable; // parent container is TABLE var tb=rTable.getElementsByTagName("TBODY"); if (tb.length) { p=tb[0]; // parent container is TBODY, not TABLE } // Get all the TRs (rows) var aRows=p.getElementsByTagName("TR"); var numrows=aRows.length-firstrow; for (var i=0;i<numrows;i++) { // When children are removed, they move down in the array so we keep // removing from the same index p.removeChild(aRows[firstrow]); } } //______________________________________________________________________________ //============================================================================== // copyProps //------------------------------------------------------------------------------ // // Copies all props of an object to another object. Only recurses into // other objects. Mainly used for copying DOM based styles to other objects // // Input // ----- // target - target obj/property // // src - source object // // Output // ------ // - // // Author:BMB //______________________________________________________________________________ //============================================================================== // Jump Tag 1176238636 [ PROC - "copyProps()" ] function copyProps(target, src) { for (var i in src) { if (typeof src[i] =='object' ) { copyProps(target[i],src[i]); } else { target[i]=src[i]; } } } //______________________________________________________________________________ //============================================================================== // updateTreeSelection //------------------------------------------------------------------------------ // Selects a tree node // // Input // ----- // node - name of the tree node, as specified by the reference var the node // was assigned to when instantiated. // // quiet - if true then don't click the node, just select it // // Output // ------ // - // // Author:BMB //______________________________________________________________________________ //============================================================================== // Jump Tag 1176238671 [ PROC - "updateTreeSelection()" ] function updateTreeSelection(node, quiet) { var count=1000; checkTree(); function checkTree() { if (count) { if (top.gFrameTreeLoaded==true) { top.frames.frameTree.selectTreeNode(node, quiet); } else { count--; setTimeout(checkTree,200); } } else { alert("DEVERROR: Could not wait for tree frame to load"); } } } // all pages including this js can use it String.prototype.startsWith = function(str) { for (var i = 0; i < this.length && i < str.length; i++) { if (this.charAt(i) != str.charAt(i)) { return false; } } return true; } //______________________________________________________________________________ //============================================================================== // selectTextInCombo //------------------------------------------------------------------------------ // Selects the particular text in combo box. If the text doesnt exist in combo, // it is added // // Input // ----- // cb - "select" element representing the combo box (HTML DOM element) // str - the string to be selected // startsWith - boolean specifying whether to select text if it starts with given text // // Output // ------ // - // // Author:Manish //______________________________________________________________________________ //============================================================================== // Jump Tag 1176238671 [ PROC - "updateTreeSelection()" ] function selectTextInCombo(cb, str, startsWith, value) { var found = false; if (str == "") { str = "Unknown"; } for (var i = 0; i < cb.options.length; i++) { var op = cb.options[i]; if (startsWith) { if (op.text.startsWith(str)) { op.selected = true; found = true; break; } } else { if (op.text == str) { op.selected = true; found = true; break; } } } if (!found) { var op = document.createElement("option"); op.text = str; if (value != undefined) op.value = value; cb.add(op, null || undefined); // for IE and standard compliant op.selected = true; } } function getSelectedTextInCombo(cb) { return cb.options[cb.selectedIndex].text; } var combo = {}; //______________________________________________________________________________ //============================================================================== // combo.setValue //------------------------------------------------------------------------------ // Selects the option in combo with given value. // // Input // ----- // cb - "select" element representing the combo box (HTML DOM element) // value - value to be selected // // Output // ------ // - // Author:Manish //______________________________________________________________________________ //============================================================================== combo.setValue = function(cb, value) { var found = false; for (var i = 0; i < cb.options.length; i++) { var op = cb.options[i]; if (op.value == value) { op.selected = true; found = true; break; } } if (!found && value == "") { var op = document.createElement("option"); op.text = "Unknown"; cb.add(op, null || undefined); // for IE and standard compliant op.selected = true; } } // sets the float value from float values in option(s) combo.setFloatValue = function(cb, fvalue, add) { var found = false; for (var i = 0; i < cb.options.length; i++) { var op = cb.options[i]; var opvalue = parseFloat(op.value); fvalue = parseFloat(fvalue); if (opvalue == fvalue) { op.selected = true; found = true; break; } } if (!found && add) { var op = document.createElement("option"); op.text = fvalue; cb.add(op, null || undefined); // for IE and standard compliant op.selected = true; } } combo.addOption = function(cmb, text, value) { var op = document.createElement("option"); op.text = text; op.value = value || ""; cmb.add(op, null || undefined); } //______________________________________________________________________________ //============================================================================== // combo.getValue //------------------------------------------------------------------------------ // Gets the selected value from combo // // Input // ----- // cb - "select" element representing the combo box (HTML DOM element) // // Output // ------ // - // Author:Manish //______________________________________________________________________________ //============================================================================== combo.getValue = function(cb) { return cb.options[cb.selectedIndex].value; } combo.getText = function(cb) { return cb.options[cb.selectedIndex].text; } // wait while retrieving data function showWait(enable, text) { if(document.getElementById('WaitDiv') != undefined) { if(enable) { document.getElementById('WaitDiv').style.visibility="visible"; document.getElementById("WaitMsg").innerHTML=text || "Loading..."; window.scrollTo(0, 0); // scroll window to top so that retreiving part is visible } else { document.getElementById('WaitDiv').style.visibility="hidden"; } } } /* * Shows/Hides the given section. * section - name of the section. the id of progress circle must be progress_<section> * show - true means show else hide */ function showSection(section, show) { var div = document.getElementById("progress_" + section); if (div) { div.style.visibility = show ? 'visible' : 'hidden'; } } // Shows progress by disabling certain controls and changing its text // Use hideProgress to enable the controls back and show their normal text // disableControls is array [ // { id: ,changedText: } // ... // ] gDisabledControls = { }; // stores disabled controls. // they will be used in hideProgress to enable them function showProgress(disableControls) { for (var i = 0; i < disableControls.length; i++) { var con = disableControls[i]; var control = document.getElementById(con.id); if (!control) { return; } // store the current value of control gDisabledControls[con.id] = control.value; // disable it and change its value control.disabled = true; if (con.changedText) { control.value = con.changedText; } } } // Hides the progress by enabling the disabled controls with their old values function hideProgress() { for (var id in gDisabledControls) { var control = document.getElementById(id); if (control) { control.value = gDisabledControls[id]; control.disabled = false; } } // finally. reset the gDisabledControls so that to be used again gDisabledControls = { }; } // takes a function which is called while traversing the DOM node function foreachDOMNode(func) { traverseNode(document.body, func); } function traverseNode(node, func) { var childNodes = node.childNodes; for (var i = 0; i < childNodes.length; i++) { var child = childNodes.item(i); traverseNode(child, func); } func(node); } // converts the datetime complextype dat |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0312 ]-- |