diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index b7d1e7ec49..3b8856fc77 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -421,7 +421,7 @@ define([ this.appOptions.user.anonymous && Common.localStorage.setItem("guest-id", this.appOptions.user.id); this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop' || Common.Controllers.Desktop.isActive(); - if( Common.Controllers.Desktop.isActive() ){ + if( Common.Controllers.Desktop.isActive() ) { !this.editorConfig.recent && (this.editorConfig.recent = []); } diff --git a/apps/documenteditor/main/resources/less/filemenu.less b/apps/documenteditor/main/resources/less/filemenu.less index 5123a2a53c..9c0c6e24e1 100644 --- a/apps/documenteditor/main/resources/less/filemenu.less +++ b/apps/documenteditor/main/resources/less/filemenu.less @@ -405,7 +405,7 @@ .item { border: none; - width: calc(100% - 3px); + width: calc(100% - 4px); .box-shadow(none); } @@ -422,6 +422,7 @@ .recent-icon { display: inline-block; + .float-left(); width: 24px; height: 30px; margin-top: 1px; @@ -510,7 +511,7 @@ > div:not(:first-child) { display: block; - padding-left: 10px; + .padding-left-10(); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 77206cb02a..8926ad2d37 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -378,10 +378,8 @@ define([ this.appOptions.user.anonymous && Common.localStorage.setItem("guest-id", this.appOptions.user.id); this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop' || Common.Controllers.Desktop.isActive(); - if(this.appOptions.isDesktopApp){ - var desktopRecent = Common.Controllers.Desktop.recentFiles(); - if (desktopRecent && desktopRecent.length > 0) - this.editorConfig.recent = !this.editorConfig.recent ? desktopRecent : this.editorConfig.recent = this.editorConfig.recent.concat(desktopRecent); + if( Common.Controllers.Desktop.isActive() ) { + !this.editorConfig.recent && (this.editorConfig.recent = []); } this.appOptions.canCreateNew = this.editorConfig.canRequestCreateNew || !_.isEmpty(this.editorConfig.createUrl) || this.editorConfig.templates && this.editorConfig.templates.length; diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 8177dbeca3..8198d70784 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -333,6 +333,10 @@ define([ } this.applyMode(); + if ( Common.Controllers.Desktop.isActive() ) { + Common.NotificationCenter.trigger('update:recents', Common.Controllers.Desktop.recentFiles()); + } + if ( !!this.api ) { this.panels['info'].setApi(this.api); if (this.panels['opts']) this.panels['opts'].setApi(this.api); diff --git a/apps/presentationeditor/main/resources/less/leftmenu.less b/apps/presentationeditor/main/resources/less/leftmenu.less index 6787d4890e..b08b267a5b 100644 --- a/apps/presentationeditor/main/resources/less/leftmenu.less +++ b/apps/presentationeditor/main/resources/less/leftmenu.less @@ -396,7 +396,7 @@ .item { border: none; - width: calc(100% - 3px); + width: calc(100% - 4px); .box-shadow(none); } @@ -415,6 +415,7 @@ width: 24px; height: 30px; margin-top: 1px; + .float-left(); div { width: 100%; height: 100%; @@ -476,7 +477,7 @@ > div:not(:first-child) { display: block; - padding-left: 10px; + .padding-left-10(); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 2739e9753a..3a483f360a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -423,10 +423,8 @@ define([ this.appOptions.user.anonymous && Common.localStorage.setItem("guest-id", this.appOptions.user.id); this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop' || Common.Controllers.Desktop.isActive(); - if(this.appOptions.isDesktopApp){ - var desktopRecent = Common.Controllers.Desktop.recentFiles(); - if (desktopRecent && desktopRecent.length > 0) - this.editorConfig.recent = !this.editorConfig.recent ? desktopRecent : this.editorConfig.recent = this.editorConfig.recent.concat(desktopRecent); + if( Common.Controllers.Desktop.isActive() ){ + !this.editorConfig.recent && (this.editorConfig.recent = []); } this.appOptions.canCreateNew = this.editorConfig.canRequestCreateNew || !_.isEmpty(this.editorConfig.createUrl) || this.editorConfig.templates && this.editorConfig.templates.length; diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js index 64938ad720..df0deefbe6 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -315,6 +315,10 @@ define([ } this.applyMode(); + if ( Common.Controllers.Desktop.isActive() ) { + Common.NotificationCenter.trigger('update:recents', Common.Controllers.Desktop.recentFiles()); + } + if ( !!this.api ) { this.panels['info'].setApi(this.api); if ( this.panels['protect'] ) diff --git a/apps/spreadsheeteditor/main/resources/less/leftmenu.less b/apps/spreadsheeteditor/main/resources/less/leftmenu.less index 18d03001d4..b7599f654a 100644 --- a/apps/spreadsheeteditor/main/resources/less/leftmenu.less +++ b/apps/spreadsheeteditor/main/resources/less/leftmenu.less @@ -488,7 +488,7 @@ .item { border: none; - width: calc(100% - 3px); + width: calc(100% - 4px); .box-shadow(none); } @@ -507,6 +507,7 @@ width: 24px; height: 30px; margin-top: 1px; + .float-left(); div { width: 100%; height: 100%; @@ -565,7 +566,7 @@ > div:not(:first-child) { display: block; - padding-left: 10px; + .padding-left-10(); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;