diff options
| -rwxr-xr-x | lib/jsl/jsl.default.conf | 4 | ||||
| -rw-r--r-- | src/Angular.js | 7 | ||||
| -rw-r--r-- | src/jqLite.js | 2 | ||||
| -rw-r--r-- | src/scenario/bootstrap.js | 6 | ||||
| -rw-r--r-- | src/widgets.js | 4 | ||||
| -rw-r--r-- | test/testabilityPatch.js | 3 |
6 files changed, 13 insertions, 13 deletions
diff --git a/lib/jsl/jsl.default.conf b/lib/jsl/jsl.default.conf index fe4d0ea4..53041db8 100755 --- a/lib/jsl/jsl.default.conf +++ b/lib/jsl/jsl.default.conf @@ -122,7 +122,7 @@ # or "+process Folder\Path\*.htm". # +process src/*.js -+process src/test/*.js ++process src/scenario/*.js +process test/*.js -+process test/test/*.js ++process test/scenario/*.js diff --git a/src/Angular.js b/src/Angular.js index 94853004..005eeb19 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -94,8 +94,7 @@ function jqLiteWrap(element) { var div = document.createElement('div'); div.innerHTML = element; element = new JQLite(div.childNodes); - } else if (element instanceof JQLite) { - } else if (isElement(element)) { + } else if (!(element instanceof JQLite) && isElement(element)) { element = new JQLite(element); } return element; @@ -119,8 +118,8 @@ function isElement(node) { function isVisible(element) { var rect = element[0].getBoundingClientRect(), - width = rect.width || (rect.right||0 - rect.left||0), - height = rect.height || (rect.bottom||0 - rect.top||0); + width = (rect.width || (rect.right||0 - rect.left||0)), + height = (rect.height || (rect.bottom||0 - rect.top||0)); return width>0 && height>0; } diff --git a/src/jqLite.js b/src/jqLite.js index 4dcd9349..53f52215 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -231,4 +231,4 @@ if (msie) { this[0].fireEvent('on' + type); } }); -}; +} diff --git a/src/scenario/bootstrap.js b/src/scenario/bootstrap.js index b49530df..169f1860 100644 --- a/src/scenario/bootstrap.js +++ b/src/scenario/bootstrap.js @@ -12,10 +12,12 @@ })(); function addScript(path) { document.write('<script type="text/javascript" src="' + prefix + path + '"></script>'); - }; + } + function addCSS(path) { document.write('<link rel="stylesheet" type="text/css" href="' + prefix + path + '"/>'); - }; + } + window.onload = function(){ if (!_.stepper) { _.stepper = function(collection, iterator, done){ diff --git a/src/widgets.js b/src/widgets.js index 828e6d24..b296c354 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -214,8 +214,8 @@ angularWidget('NG:INCLUDE', function(element){ angularWidget('NG:SWITCH', function ngSwitch(element){ var compiler = this, watchExpr = element.attr("on"), - whenExpr = (element.attr("using") || 'equals').split(":"); - whenFn = ngSwitch[whenExpr.shift()]; + whenExpr = (element.attr("using") || 'equals').split(":"), + whenFn = ngSwitch[whenExpr.shift()], changeExpr = element.attr('change') || '', cases = []; if (!whenFn) throw "Using expression '" + usingExpr + "' unknown."; diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index 055c2f77..21443fa5 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -77,13 +77,12 @@ function sortedHtml(element) { for(var css in node.style){ var value = node.style[css]; if (isString(value) && isString(css) && css != 'cssText' && value && (1*css != css)) { - var value = node.style[css]; var text = css + ': ' + value; if (value != 'false' && indexOf(style, text) == -1) { style.push(text); } } - }; + } style.sort(); if (style.length) { html += ' style="' + style.join('; ') + ';"'; |
