Skip to content
Browse files

Merge branch 'master' of github.com:ajaxorg/cloud9

  • Loading branch information...
2 parents 5202af3 + 6e4e12d commit 9266add0d90be4f5e302c830c93d463f164081fd @fjakobs fjakobs committed Oct 1, 2010
Showing with 61 additions and 33 deletions.
  1. +1 −1 client/ext/editors/editors.js
  2. +60 −32 client/js/apf_release.js
View
2 client/ext/editors/editors.js
@@ -81,7 +81,7 @@ return ext.register("ext/editors/editors", {
id : "barButtons",
edge : "0 0 0 6",
zindex : 1000,
- class : "relative",
+ "class" : "relative",
padding : "-1",
margin : "-2 0 0 0"
})
View
92 client/js/apf_release.js
@@ -5367,7 +5367,7 @@ apf.flash = (function(){
-/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/lib/util/hook.js)SIZE(9650)TIME(Fri, 24 Sep 2010 09:34:39 GMT)*/
+/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/lib/util/hook.js)SIZE(9655)TIME(Fri, 01 Oct 2010 15:58:05 GMT)*/
/*
* See the NOTICE file distributed with this work for additional
@@ -39636,7 +39636,7 @@ apf.runXslt = function(){
-/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/baseclasses/liveedit.js)SIZE(33830)TIME(Fri, 24 Sep 2010 09:34:39 GMT)*/
+/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/baseclasses/liveedit.js)SIZE(33858)TIME(Fri, 01 Oct 2010 15:58:05 GMT)*/
/*
* See the NOTICE file distributed with this work for additional
@@ -39712,13 +39712,13 @@ apf.LiveEdit = function() {
apf.GuiElement.propHandlers.focussable.call(this, true);
}
- if (!this.$mouseOver)
+ if (!this.$leMouseOver)
this.$setMouseEvents();
- apf.addListener(this.$ext, "mouseup", this.$mouseUp);
- apf.addListener(this.$ext, "mousedown", this.$mouseDown);
- apf.addListener(this.$ext, "mouseout", this.$mouseOut);
- apf.addListener(this.$ext, "mouseover", this.$mouseOver);
+ apf.addListener(this.$ext, "mouseup", this.$leMouseUp);
+ apf.addListener(this.$ext, "mousedown", this.$leMouseDown);
+ apf.addListener(this.$ext, "mouseout", this.$leMouseOut);
+ apf.addListener(this.$ext, "mouseover", this.$leMouseOver);
this.addEventListener("keydown", keydownHandler, true);
this.addEventListener("blur", blurHandler);
@@ -39732,17 +39732,17 @@ apf.LiveEdit = function() {
else
this.addEventListener("xmlupdate", xmlupdateHandler);
}
- else if (this.$mouseOver) {
+ else if (this.$leMouseOver) {
if (this.$unFocussable) {
this.$focussable = this.$unFocussable[0];
apf.GuiElement.propHandlers.focussable.call(this, this.$unFocussable[1]);
delete this.$unFocussable;
}
- apf.removeListener(this.$ext, "mouseover", this.$mouseOver);
- apf.removeListener(this.$ext, "mouseout", this.$mouseOut);
- apf.removeListener(this.$ext, "mousedown", this.$mouseDown);
- apf.removeListener(this.$ext, "mouseup", this.$mouseUp);
+ apf.removeListener(this.$ext, "mouseover", this.$leMouseOver);
+ apf.removeListener(this.$ext, "mouseout", this.$leMouseOut);
+ apf.removeListener(this.$ext, "mousedown", this.$leMouseDown);
+ apf.removeListener(this.$ext, "mouseup", this.$leMouseUp);
this.$activeNode = null;
this.$lastActiveNode = null;
@@ -39790,7 +39790,7 @@ apf.LiveEdit = function() {
removeHandler.call(moEditor);
}
- this.$mouseOver = function(e) {
+ this.$leMouseOver = function(e) {
var el = e.srcElement || e.target;
if (!el) return;
while (el && (!el.className || el.className.indexOf("liveEdit") == -1) && el != _self.$ext)
@@ -39811,7 +39811,7 @@ apf.LiveEdit = function() {
else
apf.setStyleClass(el, "liveEditOver");
};
- this.$mouseOut = function(e) {
+ this.$leMouseOut = function(e) {
var el = e.srcElement || e.target;
if (!el) return;
while (el && (!el.className || el.className.indexOf("liveEdit") == -1) && el != _self.$ext)
@@ -39821,7 +39821,7 @@ apf.LiveEdit = function() {
apf.setStyleClass(el, null, ["liveEditOver"]);
};
- this.$mouseDown = function(e, preventPropagation) {
+ this.$leMouseDown = function(e, preventPropagation) {
if (!preventPropagation)
apf.cancelBubble(e);
@@ -39858,7 +39858,7 @@ apf.LiveEdit = function() {
return false;
};
- this.$mouseUp = function(e) {
+ this.$leMouseUp = function(e) {
var el = e.srcElement || e.target;
if (_self.$activeNode && _self.$selection && apf.isChildOf(_self.$activeNode, el, true))
_self.$selection.cache();
@@ -71755,7 +71755,7 @@ apf.initGears = function(){
};
-/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/browsers/gecko.js)SIZE(6781)TIME(Fri, 24 Sep 2010 09:34:38 GMT)*/
+/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/browsers/gecko.js)SIZE(6860)TIME(Fri, 01 Oct 2010 15:58:05 GMT)*/
/*
* See the NOTICE file distributed with this work for additional
@@ -71815,12 +71815,14 @@ apf.runGecko = function(){
//Element.selectNodes
Text.prototype.selectNodes =
+ Attr.prototype.selectNodes =
Element.prototype.selectNodes = function(sExpr){
return this.ownerDocument.selectNodes(sExpr, this);
};
//XMLDocument.selectSingleNode
- HTMLDocument.prototype.selectSingleNode = XMLDocument.prototype.selectSingleNode = function(sExpr, contextNode){
+ HTMLDocument.prototype.selectSingleNode =
+ XMLDocument.prototype.selectSingleNode = function(sExpr, contextNode){
try {
var oResult = this.evaluate(sExpr, (contextNode || this),
this.createNSResolver(this.documentElement),
@@ -71838,6 +71840,7 @@ apf.runGecko = function(){
//Element.selectSingleNode
Text.prototype.selectSingleNode =
+ Attr.prototype.selectSingleNode =
Element.prototype.selectSingleNode = function(sExpr){
return this.ownerDocument.selectSingleNode(sExpr, this);
};
@@ -73283,7 +73286,7 @@ apf.runNonIe = function (){
-/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/browsers/opera.js)SIZE(6614)TIME(Fri, 24 Sep 2010 09:34:38 GMT)*/
+/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/browsers/opera.js)SIZE(6687)TIME(Fri, 01 Oct 2010 15:58:05 GMT)*/
/*
* See the NOTICE file distributed with this work for additional
@@ -73350,6 +73353,7 @@ apf.runOpera = function (){
//Element.selectNodes
Text.prototype.selectNodes =
+ Attr.prototype.selectNodes =
Element.prototype.selectNodes = function(sExpr){
var doc = this.ownerDocument;
if (!doc.selectSingleNode) {
@@ -73375,6 +73379,7 @@ apf.runOpera = function (){
//Element.selectSingleNode
Text.prototype.selectSingleNode =
+ Attr.prototype.selectSingleNode =
Element.prototype.selectSingleNode = function(sExpr){
var doc = this.ownerDocument;
if (!doc.selectSingleNode) {
@@ -73464,7 +73469,7 @@ apf.runOpera = function (){
-/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/browsers/webkit.js)SIZE(7610)TIME(Fri, 24 Sep 2010 09:34:38 GMT)*/
+/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/browsers/webkit.js)SIZE(7780)TIME(Fri, 01 Oct 2010 15:58:05 GMT)*/
/*
* See the NOTICE file distributed with this work for additional
@@ -73557,6 +73562,7 @@ apf.runWebkit = function(){
//Element.selectNodes
Text.prototype.selectNodes =
+ Attr.prototype.selectNodes =
Element.prototype.selectNodes = function(sExpr){
return this.ownerDocument.selectNodes(sExpr, this);
};
@@ -73569,6 +73575,7 @@ apf.runWebkit = function(){
//Element.selectSingleNode
Text.prototype.selectSingleNode =
+ Attr.prototype.selectSingleNode =
Element.prototype.selectSingleNode = function(sExpr){
return this.ownerDocument.selectSingleNode(sExpr, this);
};
@@ -76531,7 +76538,7 @@ apf.JsParser = new (function(){
-/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/parsers/livemarkup.js)SIZE(112593)TIME(Fri, 24 Sep 2010 09:34:38 GMT)*/
+/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/core/parsers/livemarkup.js)SIZE(112596)TIME(Fri, 01 Oct 2010 15:58:05 GMT)*/
/*
* See the NOTICE file distributed with this work for additional
@@ -78516,7 +78523,7 @@ apf.lm_exec = new (function(){
function __val(n, x){
if (!n)
return (wlvl > 1 && wnode(x),"")
- return (n = (n.nodeType != 1 && n || (n = n.selectSingleNode(x))
+ return (n = (!n.nodeType && n || (n = n.selectSingleNode(x)) //!= 1
&& (n.nodeType != 1 && n || (n = n.firstChild) && n.nodeType!=1 && n)))
&& n.nodeValue || (wlvl > 2 && wxpath(x, "_val"),"");
}
@@ -85588,7 +85595,7 @@ apf.aml.setElement("browser", apf.browser);
-/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/elements/button.js)SIZE(29706)TIME(Fri, 24 Sep 2010 09:34:45 GMT)*/
+/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/elements/button.js)SIZE(29768)TIME(Fri, 01 Oct 2010 15:58:05 GMT)*/
/*
* See the NOTICE file distributed with this work for additional
@@ -85729,8 +85736,10 @@ apf.button = function(struct, tagName){
if (ml && ml != "optional" && e.keyCode == 13
&& e.ctrlKey || (!ml || ml == "optional")
- && e.keyCode == 13 && !e.ctrlKey && !e.shiftKey && !e.altKey)
+ && e.keyCode == 13 && !e.ctrlKey && !e.shiftKey && !e.altKey) {
+ e.htmlEvent.preventDefault();
_self.$ext.onmouseup(e.htmlEvent, true);
+ }
}
this.addEventListener("focus", setDefault);
@@ -89132,7 +89141,7 @@ apf.aml.setElement("checkbox", apf.checkbox);
-/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/elements/codeeditor.js)SIZE(15460)TIME(Wed, 29 Sep 2010 19:17:06 GMT)*/
+/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/elements/codeeditor.js)SIZE(15959)TIME(Fri, 01 Oct 2010 15:58:05 GMT)*/
/*
* See the NOTICE file distributed with this work for additional
@@ -89236,9 +89245,13 @@ apf.codeeditor = function(struct, tagName) {
var key = this.$getCacheKey(xmlNode);
if (key)
- delete this.$cache[key];
+ delete this.$cache[key];
}
+ this.addEventListener("unloadmodel", function(e) {
+ this.$changeValue();
+ });
+
/**
* @attribute {String} value the text of this element
* @todo apf3.0 check use of this.$propHandlers["value"].call
@@ -89269,6 +89282,7 @@ apf.codeeditor = function(struct, tagName) {
? value.nodeValue
: value.firstChild && value.firstChild.nodeValue || ""));
+ doc.cacheId = key;
doc.setUndoManager(new UndoManager());
if (key)
@@ -89520,6 +89534,10 @@ apf.codeeditor = function(struct, tagName) {
return this.$editor.getDocument().getSelection();
};
+ this.getLastSearchOptions = function() {
+ return this.$editor.getLastSearchOptions();
+ };
+
/**
@@ -89553,13 +89571,21 @@ apf.codeeditor = function(struct, tagName) {
this.$editor.focus();
};
- this.$blur = function(e){
+ this.$changeValue = function() {
+ var doc = this.$editor.getDocument();
+ if (doc.cacheId == this.$getCacheKey(this.value)) {
+ var value = this.getValue();
+ if (this.value != value)
+ this.change(value);
+ }
+ };
+
+ this.$blur = function(e) {
if (!this.$ext)
return;
- if (this.value != this.getValue())
- this.change(this.getValue());
-
+ this.$changeValue();
+
this.$setStyleClass(this.$ext, "", [this.$baseCSSname + "Focus"]);
this.$editor.blur();
};
@@ -89584,7 +89610,7 @@ apf.codeeditor = function(struct, tagName) {
this.$editor.resize();
});
- this.$editor = new Editor(new VirtualRenderer(this.$input));
+ this.$editor = new Editor(new VirtualRenderer(this.$input, {cssClass: "ce"}));
// read defaults...
var ed = this.$editor,
doc = ed.getDocument();
@@ -102957,7 +102983,7 @@ apf.aml.setElement("window", apf.modalwindow);
-/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/elements/model.js)SIZE(43096)TIME(Tue, 28 Sep 2010 10:52:01 GMT)*/
+/*FILEHEAD(/Volumes/Docs/NetBeansProjects/packager/vendor/apf/elements/model.js)SIZE(43157)TIME(Fri, 01 Oct 2010 15:58:05 GMT)*/
/*
* See the NOTICE file distributed with this work for additional
@@ -103235,6 +103261,8 @@ apf.model = function(struct, tagName){
var list = amlNode.$propsUsingMainModel;
for (var prop in list)
this.$unbindXmlProperty(amlNode, prop);
+
+ amlNode.dispatchEvent("unloadmodel");
};
/**

0 comments on commit 9266add

Please sign in to comment.
Something went wrong with that request. Please try again.