svn: /web/doc-editor/trunk/js/ui/component/ FilePanel.js

From: Date: Fri, 23 Apr 2010 17:21:57 +0000
Subject: svn: /web/doc-editor/trunk/js/ui/component/ FilePanel.js
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-1801@lists.php.net to get a copy of this message
yannick Fri, 23 Apr 2010 17:21:57 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=298388 Log: Exit when we are into a readOnly file Changed paths: U web/doc-editor/trunk/js/ui/component/FilePanel.js Modified: web/doc-editor/trunk/js/ui/component/FilePanel.js =================================================================== --- web/doc-editor/trunk/js/ui/component/FilePanel.js 2010-04-23 17:21:00 UTC (rev 298387) +++ web/doc-editor/trunk/js/ui/component/FilePanel.js 2010-04-23 17:21:57 UTC (rev 298388) @@ -878,6 +878,10 @@ coderestored : function() { + // This should never occurs on readOnly file + if( this.readOnly ) { + return; + } if ( Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified ) { // Remove [modified] in title @@ -907,7 +911,7 @@ } // Desactivate save button - if ( ! this.isPatch ) { + if ( !this.isPatch ) { Ext.getCmp(id_prefix + '-FILE-' + this.fid + '-btn-save').disable(); Ext.getCmp(id_prefix + '-FILE-' + this.fid + '-btn-saveas').disable(); } @@ -919,6 +923,10 @@ codemodified : function() { + // This should never occurs on readOnly file + if( this.readOnly ) { + return; + } var cmpFile = Ext.getCmp(id_prefix + '-FILE-' + this.fid), cmpPanel = Ext.getCmp(id_prefix + '-PANEL-' + this.fid); @@ -939,7 +947,7 @@ ); // Activate save button - if (! this.isPatch) + if ( !this.isPatch ) { Ext.getCmp(id_prefix + '-FILE-' + this.fid + '-btn-save').enable(); Ext.getCmp(id_prefix + '-FILE-' + this.fid + '-btn-saveas').enable();

« previous php.doc.web (#1801) next »