@@ -105,9 +105,12 @@ define("webodf/editor/Tools", [
105105 sessionSubscribers . forEach ( function ( subscriber ) {
106106 subscriber . setEditorSession ( editorSession ) ;
107107 } ) ;
108- if ( formatMenuButton ) {
109- formatMenuButton . setAttribute ( 'disabled' , ! editorSession ) ;
110- }
108+
109+ [ saveButton , saveAsButton , downloadButton , closeButton , formatMenuButton ] . forEach ( function ( button ) {
110+ if ( button ) {
111+ button . setAttribute ( 'disabled' , ! editorSession ) ;
112+ }
113+ } ) ;
111114 }
112115
113116 this . setEditorSession = setEditorSession ;
@@ -171,6 +174,7 @@ define("webodf/editor/Tools", [
171174 saveButton = new Button ( {
172175 label : tr ( 'Save' ) ,
173176 showLabel : false ,
177+ disabled : true ,
174178 iconClass : 'dijitEditorIcon dijitEditorIconSave' ,
175179 onClick : function ( ) {
176180 saveOdtFile ( ) ;
@@ -185,6 +189,7 @@ define("webodf/editor/Tools", [
185189 saveAsButton = new Button ( {
186190 label : tr ( 'Save as...' ) ,
187191 showLabel : false ,
192+ disabled : true ,
188193 iconClass : 'webodfeditor-dijitSaveAsIcon' ,
189194 onClick : function ( ) {
190195 saveAsOdtFile ( ) ;
@@ -199,6 +204,7 @@ define("webodf/editor/Tools", [
199204 downloadButton = new Button ( {
200205 label : tr ( 'Download' ) ,
201206 showLabel : true ,
207+ disabled : true ,
202208 style : {
203209 float : 'right'
204210 } ,
@@ -267,6 +273,7 @@ define("webodf/editor/Tools", [
267273 closeButton = new Button ( {
268274 label : tr ( 'Close' ) ,
269275 showLabel : false ,
276+ disabled : true ,
270277 iconClass : 'dijitEditorIcon dijitEditorIconCancel' ,
271278 style : {
272279 float : 'right'
0 commit comments