[desktop] added button 'home' in app header
This commit is contained in:
		
							parent
							
								
									fd961d81a2
								
							
						
					
					
						commit
						27ff2a57e7
					
				| 
						 | 
				
			
			@ -93,8 +93,9 @@ define([
 | 
			
		|||
                    }
 | 
			
		||||
 | 
			
		||||
                    if ( obj.singlewindow !== undefined ) {
 | 
			
		||||
                        $('#box-document-title .hedset')[obj.singlewindow ? 'hide' : 'show']();
 | 
			
		||||
                        // $('#box-document-title .hedset')[obj.singlewindow ? 'hide' : 'show']();
 | 
			
		||||
                        native.features.singlewindow = obj.singlewindow;
 | 
			
		||||
                        titlebuttons.home && titlebuttons.home.btn.setVisible(obj.singlewindow);
 | 
			
		||||
                    }
 | 
			
		||||
                } else
 | 
			
		||||
                if (/editor:config/.test(cmd)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -245,6 +246,26 @@ define([
 | 
			
		|||
                        titlebuttons = {};
 | 
			
		||||
                        if ( mode.isEdit ) {
 | 
			
		||||
                            var header = webapp.getController('Viewport').getView('Common.Views.Header');
 | 
			
		||||
 | 
			
		||||
                            {
 | 
			
		||||
                                header.btnHome = (new Common.UI.Button({
 | 
			
		||||
                                    cls: 'btn-header',
 | 
			
		||||
                                    iconCls: 'toolbar__icon icon--inverse btn-home',
 | 
			
		||||
                                    disabled: true,
 | 
			
		||||
                                    visible: false,
 | 
			
		||||
                                    hint: 'Show Main window',
 | 
			
		||||
                                    dataHint:'0',
 | 
			
		||||
                                    dataHintDirection: 'right',
 | 
			
		||||
                                    dataHintOffset: '10, -18',
 | 
			
		||||
                                    dataHintTitle: 'K'
 | 
			
		||||
                                })).render($('#box-document-title #slot-btn-dt-home'));
 | 
			
		||||
                                titlebuttons['home'] = {btn: header.btnHome};
 | 
			
		||||
 | 
			
		||||
                                header.btnHome.on('click', event => {
 | 
			
		||||
                                    native.execCommand('title:button', JSON.stringify({click: "home"}));
 | 
			
		||||
                                });
 | 
			
		||||
                            }
 | 
			
		||||
 | 
			
		||||
                            if (!!header.btnSave) {
 | 
			
		||||
                                titlebuttons['save'] = {btn: header.btnSave};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -278,7 +299,8 @@ define([
 | 
			
		|||
                        }
 | 
			
		||||
 | 
			
		||||
                        if ( native.features.singlewindow !== undefined ) {
 | 
			
		||||
                            $('#box-document-title .hedset')[native.features.singlewindow ? 'hide' : 'show']();
 | 
			
		||||
                            // $('#box-document-title .hedset')[native.features.singlewindow ? 'hide' : 'show']();
 | 
			
		||||
                            !!titlebuttons.home && titlebuttons.home.btn.setVisible(native.features.singlewindow);
 | 
			
		||||
                        }
 | 
			
		||||
                    });
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -121,7 +121,7 @@ Common.UI.HintManager = new(function() {
 | 
			
		|||
        _usedTitles = [],
 | 
			
		||||
        _appPrefix,
 | 
			
		||||
        _staticHints = { // for desktop buttons
 | 
			
		||||
            "btnhome": 'K'
 | 
			
		||||
            // "btnhome": 'K'
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
    var _api;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -123,9 +123,10 @@ define([
 | 
			
		|||
                                '<div id="header-logo"><i></i></div>' +
 | 
			
		||||
                            '</section>';
 | 
			
		||||
 | 
			
		||||
        var templateTitleBox = '<section id="box-document-title">' +
 | 
			
		||||
            var templateTitleBox = '<section id="box-document-title">' +
 | 
			
		||||
                                '<div class="extra"></div>' +
 | 
			
		||||
                                '<div class="hedset">' +
 | 
			
		||||
                                    '<div class="btn-slot" id="slot-btn-dt-home"></div>' +
 | 
			
		||||
                                    '<div class="btn-slot" id="slot-btn-dt-save" data-layout-name="header-save"></div>' +
 | 
			
		||||
                                    '<div class="btn-slot" id="slot-btn-dt-print"></div>' +
 | 
			
		||||
                                    '<div class="btn-slot" id="slot-btn-dt-undo"></div>' +
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										
											BIN
										
									
								
								apps/common/main/resources/img/toolbar/1.25x/btn-home.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								apps/common/main/resources/img/toolbar/1.25x/btn-home.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 653 B  | 
							
								
								
									
										
											BIN
										
									
								
								apps/common/main/resources/img/toolbar/1.5x/btn-home.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								apps/common/main/resources/img/toolbar/1.5x/btn-home.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 750 B  | 
							
								
								
									
										
											BIN
										
									
								
								apps/common/main/resources/img/toolbar/1.75x/btn-home.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								apps/common/main/resources/img/toolbar/1.75x/btn-home.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1,012 B  | 
							
								
								
									
										
											BIN
										
									
								
								apps/common/main/resources/img/toolbar/1x/btn-home.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								apps/common/main/resources/img/toolbar/1x/btn-home.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 511 B  | 
							
								
								
									
										
											BIN
										
									
								
								apps/common/main/resources/img/toolbar/2x/btn-home.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								apps/common/main/resources/img/toolbar/2x/btn-home.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 968 B  | 
		Loading…
	
		Reference in a new issue