From 9f9bdcf3d16de651f85ccfe9e079cb57baca9eb7 Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Mon, 19 Apr 2010 14:41:36 -0700
Subject: lint
---
src/Angular.js | 7 +++----
src/jqLite.js | 2 +-
src/scenario/bootstrap.js | 6 ++++--
src/widgets.js | 4 ++--
4 files changed, 10 insertions(+), 9 deletions(-)
(limited to 'src')
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('');
- };
+ }
+
function addCSS(path) {
document.write('');
- };
+ }
+
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.";
--
cgit v1.2.3