svn: /web/doc-editor/trunk/js/ux/others/main_specific/ Ext.ux.CodeMirror.js

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Fri, 23 Apr 2010 17:21:00 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=298387

Log:
Enable undoBtn only if it exist

Changed paths:
    U   web/doc-editor/trunk/js/ux/others/main_specific/Ext.ux.CodeMirror.js

Modified: web/doc-editor/trunk/js/ux/others/main_specific/Ext.ux.CodeMirror.js
===================================================================
--- web/doc-editor/trunk/js/ux/others/main_specific/Ext.ux.CodeMirror.js	2010-04-23 17:20:16 UTC (rev 298386)
+++ web/doc-editor/trunk/js/ux/others/main_specific/Ext.ux.CodeMirror.js	2010-04-23 17:21:00 UTC (rev 298387)
@@ -116,7 +116,12 @@
                 }

             } else {
-                btnUndo.enable(); // undo
+
+                // Enable the Undo Btn if it exist (don't exist when we open a fil in readOnly mode
+                if( btnUndo ) {
+                    btnUndo.enable(); // undo
+                }
+
                 if( cmp.documentDurty === false ) {
                     cmp.fireEvent('codemodified');
                     cmp.documentDurty = true;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.