r1732 - branches/bxe_2_0/js

[email protected] Tue, 14 Aug 2007 06:38:47 +0200 (CEST)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Tue Aug 14 06:38:46 2007
New Revision: 1732

Log:
more fixes for undo when subelementchooser is closed

Modified:
   branches/bxe_2_0/js/bxeFunctions.js

Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js	(original)
+++ branches/bxe_2_0/js/bxeFunctions.js	Tue Aug 14 06:38:46 2007
@@ -195,7 +195,7 @@
 	bxe_history_snapshot()
 }
 
-function bxe_history_undo(last) {
+function bxe_history_undo() {
 				
 	if (bxe_snapshots_position >= 0) {
 		if (bxe_snapshots_position == bxe_snapshots_last) {
@@ -208,9 +208,7 @@
 		if (!currXmlStr) { alert(bxe_i18n.getText("You're in Source Mode. Not possible to use this button")); return false;} 
 		var xmlstr = bxe_snapshots[bxe_snapshots_position];
 		if (xmlstr) {
-			if (!last) {
-				bxe_snapshots_position--;
-			}
+			bxe_snapshots_position--;
 			while(currXmlStr == xmlstr && bxe_snapshots[bxe_snapshots_position ] ) {
 				xmlstr = bxe_snapshots[bxe_snapshots_position];
 				bxe_snapshots_position--;
@@ -1014,6 +1012,7 @@
 
 function bxe_appendNode(e) {
 	var aNode = e.additionalInfo.appendToNode;
+	bxe_history_snapshot();
 	if (e.additionalInfo.node) {
 		var newNode = e.additionalInfo.node;
 		if (newNode.nodeType == 11) {
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs