mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-12 22:45:52 +08:00
lint
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -231,4 +231,4 @@ if (msie) {
|
||||
this[0].fireEvent('on' + type);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
6
src/scenario/bootstrap.js
vendored
6
src/scenario/bootstrap.js
vendored
@@ -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){
|
||||
|
||||
@@ -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.";
|
||||
|
||||
@@ -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('; ') + ';"';
|
||||
|
||||
Reference in New Issue
Block a user