[desktop] fix bug 45170
This commit is contained in:
		
							parent
							
								
									b8cd3a4054
								
							
						
					
					
						commit
						7bd2011e08
					
				| 
						 | 
				
			
			@ -209,22 +209,26 @@ define([
 | 
			
		|||
                            Common.NotificationCenter.trigger('app:config', {canUndock: true});
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        var header = webapp.getController('Viewport').getView('Common.Views.Header');
 | 
			
		||||
                        titlebuttons = {};
 | 
			
		||||
                        if ( !!header.btnSave ) {
 | 
			
		||||
                        if ( !mode.isEdit ) {
 | 
			
		||||
                            native.execCommand('webapps:features', JSON.stringify(
 | 
			
		||||
                                    {version: config.version, eventloading:true, titlebuttons:true, viewmode:true} ));
 | 
			
		||||
                        } else {
 | 
			
		||||
                            var header = webapp.getController('Viewport').getView('Common.Views.Header');
 | 
			
		||||
                            if (!!header.btnSave) {
 | 
			
		||||
                                titlebuttons['save'] = {btn: header.btnSave};
 | 
			
		||||
 | 
			
		||||
                                var iconname = /\s?([^\s]+)$/.exec(titlebuttons.save.btn.$icon.attr('class'));
 | 
			
		||||
                                !!iconname && iconname.length && (titlebuttons.save.icon = btnsave_icons[iconname]);
 | 
			
		||||
                            }
 | 
			
		||||
 | 
			
		||||
                        if ( !!header.btnPrint )
 | 
			
		||||
                            if (!!header.btnPrint)
 | 
			
		||||
                                titlebuttons['print'] = {btn: header.btnPrint};
 | 
			
		||||
 | 
			
		||||
                        if ( !!header.btnUndo )
 | 
			
		||||
                            if (!!header.btnUndo)
 | 
			
		||||
                                titlebuttons['undo'] = {btn: header.btnUndo};
 | 
			
		||||
 | 
			
		||||
                        if ( !!header.btnRedo )
 | 
			
		||||
                            if (!!header.btnRedo)
 | 
			
		||||
                                titlebuttons['redo'] = {btn: header.btnRedo};
 | 
			
		||||
 | 
			
		||||
                            for (var i in titlebuttons) {
 | 
			
		||||
| 
						 | 
				
			
			@ -236,6 +240,7 @@ define([
 | 
			
		|||
                                titlebuttons.save.btn.options.signals.push('icon:changed');
 | 
			
		||||
                                titlebuttons.save.btn.on('icon:changed', _onSaveIconChanged.bind(this));
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        if ( !!config.callback_editorconfig ) {
 | 
			
		||||
                            config.callback_editorconfig();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue