Changeset 13927
- Timestamp:
- 05/26/12 18:57:28 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/smartfact/index.js
r13926 r13927 165 165 function $txt(txt) { return document.createTextNode(txt); } 166 166 function trim(str) { return str.replace("/^\s\s*/", '').replace("/\s\s*$/", ''); } 167 function valid(str) { if ( str===undefined) return false; if (str.length==0) return false; return true;}167 function valid(str) { if (!str) return false; if (str.length==0) return false; return true;} 168 168 function isSliding() { var z = $("body").getAttribute("data-visible"); return $("table"+z) ? $("table"+z).offsetLeft!=0 : false; } 169 function htmlDecode(input) { var e = $new('div'); e.innerHTML = input; return e.firstChild ===undefined ? input : e.firstChild.nodeValue; }169 function htmlDecode(input) { var e = $new('div'); e.innerHTML = input; return e.firstChild ? e.firstChild.nodeValue : input; } 170 170 function setUTC(el, time) { var str = time.toUTCString(); var utc = str.substr(str.length-12, 8); el.innerHTML = "• "+utc+" UTC •"; } 171 171 … … 811 811 var img = $("image"+z); 812 812 var canv = $("canvas"+z); 813 if ( img === undefined || canv === undefined)813 if (!img || !canv) 814 814 return; 815 815 … … 1079 1079 1080 1080 var e = $("data"+z+"-"+line); 1081 if ( e === undefined)1081 if (!e) 1082 1082 continue; 1083 1083 1084 1084 var form = e.getAttribute("data-form"); 1085 if ( form===undefined)1085 if (!form) 1086 1086 continue; 1087 1087 … … 1498 1498 var z = $("body").getAttribute("data-visible"); 1499 1499 var canv = $("canvas"+z); 1500 if ( canv === undefined)1500 if (!canv) 1501 1501 return; 1502 1502
Note:
See TracChangeset
for help on using the changeset viewer.