r1679 - in branches/bxe_2_0: css js

[email protected] Mon, 21 May 2007 20:23:14 +0200 (CEST)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Mon May 21 20:23:12 2007
New Revision: 1679

Log:
fix for BXEB-6

Formularansicht von Textelementen.




Modified:
   branches/bxe_2_0/css/editor.css
   branches/bxe_2_0/js/bxeFunctions.js
   branches/bxe_2_0/js/widget.js

Modified: branches/bxe_2_0/css/editor.css
==============================================================================
--- branches/bxe_2_0/css/editor.css	(original)
+++ branches/bxe_2_0/css/editor.css	Mon May 21 20:23:12 2007
@@ -370,3 +370,5 @@
     /*-moz-user-input: disabled;*/
     -moz-user-select: none;
 }
+
+[

Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js	(original)
+++ branches/bxe_2_0/js/bxeFunctions.js	Mon May 21 20:23:12 2007
@@ -674,6 +674,32 @@
 		menui.MenuPopup._node = node._node;
 		popup.hasEditAttributes = true;
 	}
+	if (node._node.firstChild && node._node.firstChild.nodeType == 3 && node._node.childNodes.length == 1) {
+		var menui = popup.addMenuItem(bxe_i18n.getText("Edit text in popup"), function (e) {
+			var mod = mozilla.getWidgetModalBox("Edit text here", function(values) {
+				menui.MenuPopup.MainNode._node.firstChild.nodeValue = values.text;
+				bxe_Transform();
+			});
+			var inputfield = mod.addItem("text", "", "textarea");
+			if (node.firstChild) {
+				inputfield.value = node.firstChild.nodeValue;
+			}
+			var _modBox = document.getElementById("modalBoxtext");
+	
+			mod.node.style.width = window.innerWidth - 150 + "px"; 
+			_modBox.style.width = window.innerWidth - 250 + "px"; 
+			
+			mod.node.style.height = window.innerHeight - 110 + "px"; 
+			_modBox.style.height= window.innerHeight - 190 + "px"; 
+			
+			
+			mod.show(100,50,"fixed");
+			_modBox.focus();
+			
+			
+			
+	    });
+    }
 	
 	if (typeof BxeClipboardPasteDialog == 'function') {
 		popup.addMenuItem(bxe_i18n.getText("Paste from Extern", new Array(node.vdom.bxeName)), function (e) {
@@ -1270,7 +1296,9 @@
 }
 
 function MouseClickEvent(e) {
+	
 	e.stopPropagation();
+	
 	var target = e.currentTarget;
 	if(target.userModifiable && bxe_editable_page) {
 		return bxe_updateXPath(target);

Modified: branches/bxe_2_0/js/widget.js
==============================================================================
--- branches/bxe_2_0/js/widget.js	(original)
+++ branches/bxe_2_0/js/widget.js	Mon May 21 20:23:12 2007
@@ -1007,6 +1007,7 @@
 	this.doCancel = false;
 
 	this.node = this.initNode("div","ModalBox");
+	
 	this.node.id="ModalBox";
 	this.Display = "block";
 	this.node.appendToBody();
@@ -1019,6 +1020,8 @@
 
 Widget_ModalBox.prototype.reset = function (title, callback, callbackCancel) {
 	this.doCancel = false;
+	this.node.setAttribute("__bxe_noteditable","true");
+	
 	if (this.PaneNode.hasChildNodes()) {
 		this.PaneNode.removeAllChildren();
 	}
@@ -1039,11 +1042,13 @@
 			var inputfield = document.createElement("input");
 			inputfield.value = value;
 			inputfield.name = name;
+			this.node.setAttribute("__bxe_noteditable","false");
 			td.appendChild(inputfield);
 		break;
 		
 		case "textarea":
 			var td = this.addFormEntry(name, description);
+			this.node.setAttribute("__bxe_noteditable","false");
 			var inputfield = document.createElement("textarea");
 			//inputfield.setAttribute("cols","50");
 			//inputfield.setAttribute("rows","30");
@@ -1109,6 +1114,7 @@
 		default:
 			td.appendChild(document.createTextNode("type " + type + " not defined"));
 	}
+	return inputfield;
 }
 
 Widget_ModalBox.prototype.createTable = function() {
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs