r1653 - branches/bxe_2_0/js

[email protected] Wed, 20 Dec 2006 17:14:21 +0100 (CET)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Wed Dec 20 17:14:20 2006
New Revision: 1653

Modified:
   branches/bxe_2_0/js/bxeFunctions.js
Log:
clear history on save


Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js	(original)
+++ branches/bxe_2_0/js/bxeFunctions.js	Wed Dec 20 17:14:20 2006
@@ -70,6 +70,7 @@
 		}
 		bxe_lastSavedXML = bxe_getXmlDocument();
 		bxe_status_bar.showMessage(bxe_i18n.getText("Document successfully saved"));
+		bxe_history_reset();
 		if	(e.status == 201 && bxe_config.options['onSaveFileCreated']) {
 			eval(bxe_config.options['onSaveFileCreated']);
 			
@@ -169,9 +170,17 @@
 		bxe_config.xmldoc.documentElement.XMLNode.vdom = vdom;
 		bxe_Transform();
 		
-}
+	}
 	
 }
+
+functino bxe_history_reset() {
+	bxe_snapshots = new Array();
+	bxe_snapshots_position = 0;
+	bxe_snapshots_last = 0;
+	bxe_history_snapshot()
+}
+
 function bxe_history_undo() {
 	if (bxe_snapshots_position >= 0) {
 		if (bxe_snapshots_position == bxe_snapshots_last) {
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs