kopia lustrzana https://github.com/c9/core
fix tests failing on phantomjs
rodzic
09f595723a
commit
c3f362e796
|
@ -512,7 +512,7 @@ function checkCache() {
|
||||||
config.useCache = ideCachePromiss = ideCache = null;
|
config.useCache = ideCachePromiss = ideCache = null;
|
||||||
}).then(function(ideCache_) {
|
}).then(function(ideCache_) {
|
||||||
ideCache = ideCache_;
|
ideCache = ideCache_;
|
||||||
return ideCache.keys();
|
return ideCache ? ideCache.keys() : [];
|
||||||
}).then(function(keys) {
|
}).then(function(keys) {
|
||||||
baseUrl = config.baseUrl;
|
baseUrl = config.baseUrl;
|
||||||
if (baseUrl[0] == "/")
|
if (baseUrl[0] == "/")
|
||||||
|
@ -525,7 +525,7 @@ function checkCache() {
|
||||||
return "";
|
return "";
|
||||||
return r.headers.get("etag") + " " + url;
|
return r.headers.get("etag") + " " + url;
|
||||||
}).join("\n") + "\n";
|
}).join("\n") + "\n";
|
||||||
if (val.length == 1) {
|
if (val.length <= 1) {
|
||||||
ideCachePromiss = null;
|
ideCachePromiss = null;
|
||||||
return ideCache;
|
return ideCache;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
/**
|
/*global apf*/
|
||||||
* Search Helper Library for the Cloud9
|
|
||||||
*
|
|
||||||
* @copyright 2013, Ajax.org B.V.
|
|
||||||
*/
|
|
||||||
|
|
||||||
define(function(require, exports, module) {
|
define(function(require, exports, module) {
|
||||||
|
|
||||||
|
@ -139,7 +135,7 @@ module.exports = function(settings, execFind, toggleDialog, restore, toggleOptio
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
tooltip.$ext.innerHTML = apf.escapeXML(e.message.replace(": /" + searchTxt + "/", ""));
|
tooltip.$ext.innerHTML = apf.escapeXML(e.message.replace(": /" + searchTxt + "/", ""));
|
||||||
apf.setOpacity(tooltip.$ext, 1);
|
tooltip.$ext.style.opacity = 1;
|
||||||
|
|
||||||
var pos = apf.getAbsolutePosition(win.$ext);
|
var pos = apf.getAbsolutePosition(win.$ext);
|
||||||
tooltip.$ext.style.left = pos[0] + txtFind.getLeft() + "px";
|
tooltip.$ext.style.left = pos[0] + txtFind.getLeft() + "px";
|
||||||
|
|
|
@ -45,7 +45,7 @@ define(function(require, exports, module) {
|
||||||
this.data = v;
|
this.data = v;
|
||||||
},
|
},
|
||||||
toString: function() {
|
toString: function() {
|
||||||
return this.xml;
|
return this.json;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1527,7 +1527,6 @@ apf.BaseTab = function() {
|
||||||
|
|
||||||
//Skin changing support
|
//Skin changing support
|
||||||
if (this.$int) {
|
if (this.$int) {
|
||||||
//apf.AmlParser.replaceNode(this.oPages, oPages);
|
|
||||||
this.$int = this.oPages;
|
this.$int = this.oPages;
|
||||||
page = true;
|
page = true;
|
||||||
|
|
||||||
|
|
|
@ -2377,7 +2377,7 @@ apf.plane = {
|
||||||
var toOpacity = parseFloat(options && options.opacity) || 1;
|
var toOpacity = parseFloat(options && options.opacity) || 1;
|
||||||
if (this.animate) {
|
if (this.animate) {
|
||||||
var _self = this;
|
var _self = this;
|
||||||
apf.setOpacity(this.plane, 0);
|
this.plane.style.opacity = 0;
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
apf.tween.single(_self.plane, {
|
apf.tween.single(_self.plane, {
|
||||||
steps: 5,
|
steps: 5,
|
||||||
|
@ -2389,7 +2389,7 @@ apf.plane = {
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
apf.setOpacity(this.plane, toOpacity);
|
this.plane.style.opacity = toOpacity;
|
||||||
|
|
||||||
var diff = apf.getDiff(plane);
|
var diff = apf.getDiff(plane);
|
||||||
this.plane.style.width = "100%";//(pWidth - diff[0]) + "px";
|
this.plane.style.width = "100%";//(pWidth - diff[0]) + "px";
|
||||||
|
@ -2421,7 +2421,7 @@ apf.plane = {
|
||||||
steps: 5,
|
steps: 5,
|
||||||
interval: 10,
|
interval: 10,
|
||||||
type: "fade",
|
type: "fade",
|
||||||
from: apf.getOpacity(_self.plane),
|
from: apf.getStyle(_self.plane, "opacity"),
|
||||||
to: 0,
|
to: 0,
|
||||||
onfinish: function(){
|
onfinish: function(){
|
||||||
_self.plane.style.display = "none";
|
_self.plane.style.display = "none";
|
||||||
|
@ -2433,7 +2433,7 @@ apf.plane = {
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
apf.setOpacity(this.plane, 0);
|
this.plane.style.opacity = 0;
|
||||||
if (this.current)
|
if (this.current)
|
||||||
apf.window.zManager.clear(this.plane, this.current);
|
apf.window.zManager.clear(this.plane, this.current);
|
||||||
this.plane.style.display = "none";
|
this.plane.style.display = "none";
|
||||||
|
@ -8516,7 +8516,6 @@ apf.GuiElement.propHandlers = {
|
||||||
|
|
||||||
// crazy stuff!
|
// crazy stuff!
|
||||||
!function(){
|
!function(){
|
||||||
if (apf.isO3) return;
|
|
||||||
var prot = apf.XhtmlElement.prototype;
|
var prot = apf.XhtmlElement.prototype;
|
||||||
|
|
||||||
prot.implement(
|
prot.implement(
|
||||||
|
@ -12036,9 +12035,6 @@ apf.window = new apf.window();
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
apf.runGecko = function(){
|
apf.runGecko = function(){
|
||||||
if (apf.runNonIe)
|
|
||||||
apf.runNonIe();
|
|
||||||
|
|
||||||
apf.getHtmlLeft = function(oHtml) {
|
apf.getHtmlLeft = function(oHtml) {
|
||||||
return (oHtml.offsetLeft
|
return (oHtml.offsetLeft
|
||||||
+ (parseInt(apf.getStyle(oHtml.parentNode, "borderLeftWidth")) || 0));
|
+ (parseInt(apf.getStyle(oHtml.parentNode, "borderLeftWidth")) || 0));
|
||||||
|
@ -12209,20 +12205,6 @@ function findNodes(htmlNode, textNode, result, re) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
apf.runNonIe = function (){
|
|
||||||
|
|
||||||
|
|
||||||
DocumentFragment.prototype.getElementById = function(id) {
|
|
||||||
return this.childNodes.length ? this.childNodes[0].ownerDocument.getElementById(id) : null;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// *** XML Serialization *** //
|
// *** XML Serialization *** //
|
||||||
if (XMLDocument.prototype.__defineGetter__) {
|
if (XMLDocument.prototype.__defineGetter__) {
|
||||||
//XMLDocument.xml
|
//XMLDocument.xml
|
||||||
|
@ -12246,75 +12228,14 @@ apf.runNonIe = function (){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ******** HTML Interfaces **************************************************
|
|
||||||
insertAdjacentHTML(), insertAdjacentText() and insertAdjacentElement()
|
|
||||||
****************************************************************************/
|
|
||||||
if (typeof HTMLElement!="undefined") {
|
if (typeof HTMLElement!="undefined") {
|
||||||
if (!HTMLElement.prototype.insertAdjacentElement) {
|
|
||||||
Text.prototype.insertAdjacentElement =
|
|
||||||
HTMLElement.prototype.insertAdjacentElement = function(where,parsedNode) {
|
|
||||||
switch (where.toLowerCase()) {
|
|
||||||
case "beforebegin":
|
|
||||||
this.parentNode.insertBefore(parsedNode,this);
|
|
||||||
break;
|
|
||||||
case "afterbegin":
|
|
||||||
this.insertBefore(parsedNode,this.firstChild);
|
|
||||||
break;
|
|
||||||
case "beforeend":
|
|
||||||
this.appendChild(parsedNode);
|
|
||||||
break;
|
|
||||||
case "afterend":
|
|
||||||
if (this.nextSibling)
|
|
||||||
this.parentNode.insertBefore(parsedNode,this.nextSibling);
|
|
||||||
else
|
|
||||||
this.parentNode.appendChild(parsedNode);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!HTMLElement.prototype.insertAdjacentHTML) {
|
|
||||||
Text.prototype.insertAdjacentHTML =
|
|
||||||
HTMLElement.prototype.insertAdjacentHTML = function(where,htmlStr) {
|
|
||||||
var r = this.ownerDocument.createRange();
|
|
||||||
r.setStartBefore(apf.isWebkit
|
|
||||||
? document.body
|
|
||||||
: (self.document ? document.body : this));
|
|
||||||
var parsedHTML = r.createContextualFragment(htmlStr);
|
|
||||||
this.insertAdjacentElement(where, parsedHTML);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!HTMLBodyElement.prototype.insertAdjacentHTML) //apf.isWebkit)
|
|
||||||
HTMLBodyElement.prototype.insertAdjacentHTML = HTMLElement.prototype.insertAdjacentHTML;
|
|
||||||
|
|
||||||
if (!HTMLElement.prototype.insertAdjacentText) {
|
|
||||||
Text.prototype.insertAdjacentText =
|
|
||||||
HTMLElement.prototype.insertAdjacentText = function(where,txtStr) {
|
|
||||||
var parsedText = document.createTextNode(txtStr);
|
|
||||||
this.insertAdjacentElement(where,parsedText);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
//HTMLElement.removeNode
|
//HTMLElement.removeNode
|
||||||
HTMLElement.prototype.removeNode = function(){
|
HTMLElement.prototype.removeNode = function(){
|
||||||
if (!this.parentNode) return;
|
if (!this.parentNode) return;
|
||||||
|
|
||||||
this.parentNode.removeChild(this);
|
this.parentNode.removeChild(this);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ******** XML Compatibility ************************************************
|
|
||||||
Giving the Mozilla XML Parser the same interface as IE's Parser
|
|
||||||
****************************************************************************/
|
|
||||||
var ASYNCNOTSUPPORTED = false;
|
|
||||||
|
|
||||||
//Test if Async is supported
|
|
||||||
try {
|
|
||||||
XMLDocument.prototype.async = true;
|
|
||||||
ASYNCNOTSUPPORTED = true;
|
|
||||||
} catch (e) {/*trap*/}
|
|
||||||
|
|
||||||
//Document.prototype.onreadystatechange = null;
|
//Document.prototype.onreadystatechange = null;
|
||||||
Document.prototype.parseError = 0;
|
Document.prototype.parseError = 0;
|
||||||
|
|
||||||
|
@ -12323,15 +12244,6 @@ apf.runNonIe = function (){
|
||||||
|
|
||||||
Node.prototype.getElementById = function(id) {};
|
Node.prototype.getElementById = function(id) {};
|
||||||
|
|
||||||
HTMLElement.prototype.replaceNode =
|
|
||||||
Element.prototype.replaceNode = function(xmlNode) {
|
|
||||||
if (!this.parentNode) return;
|
|
||||||
|
|
||||||
this.parentNode.insertBefore(xmlNode, this);
|
|
||||||
this.parentNode.removeChild(this);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method retrieves the current value of a property on a HTML element
|
* This method retrieves the current value of a property on a HTML element
|
||||||
|
@ -12404,18 +12316,6 @@ apf.runNonIe = function (){
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
apf.getOpacity = function(oHtml) {
|
|
||||||
return apf.getStyle(oHtml, "opacity");
|
|
||||||
};
|
|
||||||
|
|
||||||
apf.setOpacity = function(oHtml, value) {
|
|
||||||
oHtml.style.opacity = value;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12452,9 +12352,6 @@ apf.runWebkit = function(){
|
||||||
- (parseInt(apf.getStyle(p, "borderTopWidth")) || 0)
|
- (parseInt(apf.getStyle(p, "borderTopWidth")) || 0)
|
||||||
- (parseInt(apf.getStyle(p, "borderBottomWidth")) || 0));
|
- (parseInt(apf.getStyle(p, "borderBottomWidth")) || 0));
|
||||||
};
|
};
|
||||||
|
|
||||||
if (apf.runNonIe)
|
|
||||||
apf.runNonIe();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -12472,7 +12369,6 @@ apf.runWebkit = function(){
|
||||||
apf.application = function(){
|
apf.application = function(){
|
||||||
this.$init("application", apf.NODE_HIDDEN);
|
this.$init("application", apf.NODE_HIDDEN);
|
||||||
|
|
||||||
if (!apf.isO3) {
|
|
||||||
this.$int = document.body;
|
this.$int = document.body;
|
||||||
this.$tabList = []; //Prevents documentElement from being focussed
|
this.$tabList = []; //Prevents documentElement from being focussed
|
||||||
// this.$focussable = apf.KEYBOARD;
|
// this.$focussable = apf.KEYBOARD;
|
||||||
|
@ -12482,10 +12378,7 @@ apf.application = function(){
|
||||||
this.focus = function(){ this.dispatchEvent("focus"); };
|
this.focus = function(){ this.dispatchEvent("focus"); };
|
||||||
this.blur = function(){ this.dispatchEvent("blur"); };
|
this.blur = function(){ this.dispatchEvent("blur"); };
|
||||||
|
|
||||||
|
|
||||||
apf.window.$addFocus(this);
|
apf.window.$addFocus(this);
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
apf.application.prototype = new apf.AmlElement();
|
apf.application.prototype = new apf.AmlElement();
|
||||||
apf.aml.setElement("application", apf.application);
|
apf.aml.setElement("application", apf.application);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/*global apf*/
|
||||||
define(function(require, exports, module) {
|
define(function(require, exports, module) {
|
||||||
main.consumes = ["Plugin", "ui"];
|
main.consumes = ["Plugin", "ui"];
|
||||||
main.provides = ["tooltip"];
|
main.provides = ["tooltip"];
|
||||||
|
@ -85,7 +86,7 @@ define(function(require, exports, module) {
|
||||||
if (options.control)
|
if (options.control)
|
||||||
options.control.stop();
|
options.control.stop();
|
||||||
|
|
||||||
apf.setOpacity(this, 1);
|
this.style.display = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
function ttmouseout(e) {
|
function ttmouseout(e) {
|
||||||
|
@ -134,7 +135,7 @@ define(function(require, exports, module) {
|
||||||
control: options.control = {}});
|
control: options.control = {}});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
apf.setOpacity(options.tooltip, 1);
|
options.tooltip.style.opacity = 1;
|
||||||
}
|
}
|
||||||
}, options.timeout);
|
}, options.timeout);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue