mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
working on jQuery passing tests
This commit is contained in:
parent
d7416c4c82
commit
2a9669e1d8
6 changed files with 21 additions and 9 deletions
|
|
@ -3,9 +3,7 @@ server: http://localhost:9876
|
|||
load:
|
||||
- lib/jasmine/jasmine-0.10.3.js
|
||||
- lib/jasmine-jstd-adapter/JasmineAdapter.js
|
||||
# - lib/webtoolkit/webtoolkit.base64.js
|
||||
# - lib/jquery/jquery-1.4.2.js
|
||||
# - lib/underscore/underscore.js
|
||||
- lib/jquery/jquery-1.4.2.js
|
||||
- src/Angular.js
|
||||
- src/*.js
|
||||
- src/scenario/_namespace.js
|
||||
|
|
|
|||
|
|
@ -112,9 +112,7 @@ function lowercase(value){ return isString(value) ? value.toLowerCase() : value;
|
|||
function uppercase(value){ return isString(value) ? value.toUpperCase() : value; }
|
||||
function trim(value) { return isString(value) ? value.replace(/^\s*/, '').replace(/\s*$/, '') : value; }
|
||||
function isElement(node) {
|
||||
if (node && !node.item && isDefined(node.length) && isDefined(node[0]))
|
||||
node = node[0];
|
||||
return node && node.nodeName;
|
||||
return node && (node.nodeName || node instanceof JQLite || node instanceof jQuery);
|
||||
}
|
||||
|
||||
if (msie) {
|
||||
|
|
|
|||
|
|
@ -269,7 +269,9 @@ foreach({
|
|||
},
|
||||
|
||||
'html': function(html){
|
||||
return jqLite(html);
|
||||
var div = jqLite('div');
|
||||
div.html(html);
|
||||
return div.children();
|
||||
},
|
||||
|
||||
'linky': function(text){
|
||||
|
|
|
|||
|
|
@ -118,6 +118,10 @@ JQLite.prototype = {
|
|||
this[0].parentNode.replaceChild(jqLite(replaceNode)[0], this[0]);
|
||||
},
|
||||
|
||||
children: function() {
|
||||
return new JQLite(this[0].childNodes);
|
||||
},
|
||||
|
||||
append: function(node) {
|
||||
var self = this[0];
|
||||
node = jqLite(node);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ angularService("$hover", function(browser) {
|
|||
width: width + "px"
|
||||
});
|
||||
}
|
||||
} else if (tooltip) {
|
||||
} else if (tooltip && false) {
|
||||
tooltip.callout.remove();
|
||||
tooltip = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
jstd = jstestdriver;
|
||||
dump = bind(jstd.console, jstd.console.log);
|
||||
|
||||
var NBSP = jqLite(' ').text();
|
||||
var NBSP = (function(){
|
||||
var div = document.createElement('div');
|
||||
div.innerHtml = ' ';
|
||||
return msie ? div.innerText : div.textContent;
|
||||
})();
|
||||
|
||||
function nakedExpect(obj) {
|
||||
return expect(angular.fromJson(angular.toJson(obj)));
|
||||
|
|
@ -82,6 +86,12 @@ function sortedHtml(element) {
|
|||
}
|
||||
}
|
||||
style.sort();
|
||||
var tmp = style;
|
||||
style = [];
|
||||
foreach(tmp, function(value){
|
||||
if (!value.match(/^max[^\-]/))
|
||||
style.push(value);
|
||||
});
|
||||
if (style.length) {
|
||||
html += ' style="' + style.join('; ') + ';"';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue