This commit is contained in:
Misko Hevery
2010-04-19 14:41:36 -07:00
parent 618a2b423d
commit 9f9bdcf3d1
6 changed files with 13 additions and 13 deletions

View File

@@ -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

View File

@@ -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;
}

View File

@@ -231,4 +231,4 @@ if (msie) {
this[0].fireEvent('on' + type);
}
});
};
}

View File

@@ -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){

View File

@@ -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.";

View File

@@ -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('; ') + ';"';