diff options
author | ayvis <ayvis.infra@gmail.com> | 2014-03-26 00:25:32 +0100 |
---|---|---|
committer | ayvis <ayvis.infra@gmail.com> | 2014-03-26 00:25:32 +0100 |
commit | 354ecfbc9eb6c90fb493984fb17b1ca81d9ea343 (patch) | |
tree | f5fb4ea9d21292f50fccda74328a467141543902 /usr/local/www/javascript/pi.js | |
parent | 07130afe2b5dd906d9f9b39585c355a07af006f9 (diff) | |
download | pfsense-354ecfbc9eb6c90fb493984fb17b1ca81d9ea343.zip pfsense-354ecfbc9eb6c90fb493984fb17b1ca81d9ea343.tar.gz |
javascript normalization
Diffstat (limited to 'usr/local/www/javascript/pi.js')
-rw-r--r-- | usr/local/www/javascript/pi.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/local/www/javascript/pi.js b/usr/local/www/javascript/pi.js index c89b7d9..8a3a3c3 100644 --- a/usr/local/www/javascript/pi.js +++ b/usr/local/www/javascript/pi.js @@ -23,10 +23,10 @@ pi.util = { IsArray:function(_object){ - return _object && _object != window && ( _object instanceof Array || ( typeof _object.length == "number" && typeof _object.item =="function" ) ) + return _object && _object != window && ( _object instanceof Array || ( typeof _object.length == "number" && typeof _object.item =="function" ) ); }, IsHash:function(_object){ - return _object && typeof _object=="object"&&(_object==window||_object instanceof Object)&&!_object.nodeName&&!pi.util.IsArray(_object) + return _object && typeof _object=="object"&&(_object==window||_object instanceof Object)&&!_object.nodeName&&!pi.util.IsArray(_object); }, DOMContentLoaded:[], AddEvent: function(_element,_eventName,_fn,_useCapture){ @@ -40,7 +40,7 @@ return { height:pi.env.ie?Math.max(document.documentElement.clientHeight,document.body.clientHeight):window.innerHeight, width:pi.env.ie?Math.max(document.documentElement.clientWidth,document.body.clientWidth):window.innerWidth - } + }; }, Include:function(_url,_callback){ var script = new pi.element("script").attribute.set("src",_url), callback = _callback||new Function, done = false, head = pi.get.byTag("head")[0]; @@ -122,7 +122,7 @@ "offsetHeight":_element.offsetHeight, "offsetWidth":_element.offsetWidth, "width":view["width"] - } + }; }, addStyle:function(_element,_style){ for(var key in _style){ @@ -168,7 +168,7 @@ var value = _source[key]; if (pi.util.IsArray(_source[key])) { if(pi.util.IsArray( _object[key] )){ - Array.prototype.push.apply( _source[key], _object[key] ) + Array.prototype.push.apply( _source[key], _object[key] ); } else value = _source[key].clone(); @@ -647,7 +647,7 @@ var values = arguments; return this.replace(/\{(\d)\}/g,function(){ return values[arguments[1]]; - }) + }); }; String.prototype.leftpad = function(_len,_ch){ |