[all] opened 'create new' option for desktop app
This commit is contained in:
parent
13fe6a52ff
commit
511888dc4e
|
@ -125,6 +125,12 @@ define([
|
|||
if ( opts == 'preloader:hide' ) {
|
||||
app.execCommand('editor:onready', '');
|
||||
return true;
|
||||
} else
|
||||
if ( opts == 'create:new' ) {
|
||||
if (config.createUrl == 'desktop://create.new') {
|
||||
app.LocalFileCreate(!!window.SSE ? 2 : !!window.PE ? 1 : 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -436,8 +436,10 @@ define([
|
|||
},
|
||||
|
||||
onCreateNew: function(menu, type) {
|
||||
if ( !Common.Controllers.Desktop.process('create:new') ) {
|
||||
var newDocumentPage = window.open(type == 'blank' ? this.mode.createUrl : type, "_blank");
|
||||
if (newDocumentPage) newDocumentPage.focus();
|
||||
}
|
||||
|
||||
if (menu) {
|
||||
menu.hide();
|
||||
|
|
|
@ -329,7 +329,7 @@ define([
|
|||
this.editorConfig.user =
|
||||
this.appOptions.user = Common.Utils.fillUserInfo(this.editorConfig.user, this.editorConfig.lang, this.textAnonymous);
|
||||
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop';
|
||||
this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl) && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl);
|
||||
this.appOptions.canOpenRecent = this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.templates = this.editorConfig.templates;
|
||||
this.appOptions.recent = this.editorConfig.recent;
|
||||
|
|
|
@ -327,8 +327,10 @@ define([
|
|||
},
|
||||
|
||||
onCreateNew: function(menu, type) {
|
||||
if ( !Common.Controllers.Desktop.process('create:new') ) {
|
||||
var newDocumentPage = window.open(type == 'blank' ? this.mode.createUrl : type, "_blank");
|
||||
if (newDocumentPage) newDocumentPage.focus();
|
||||
}
|
||||
if (menu) {
|
||||
menu.hide();
|
||||
}
|
||||
|
|
|
@ -299,7 +299,7 @@ define([
|
|||
this.editorConfig.user =
|
||||
this.appOptions.user = Common.Utils.fillUserInfo(data.config.user, this.editorConfig.lang, this.textAnonymous);
|
||||
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop';
|
||||
this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl) && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl);
|
||||
this.appOptions.canOpenRecent = this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.templates = this.editorConfig.templates;
|
||||
this.appOptions.recent = this.editorConfig.recent;
|
||||
|
|
|
@ -292,9 +292,6 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
if (this.mode.isDesktopApp && this.mode.isOffline)
|
||||
this.$el.find('#fm-btn-create, #fm-btn-back, #fm-btn-create+.devider').hide();
|
||||
|
||||
if (this.mode.canProtect) {
|
||||
this.panels['protect'] = (new PE.Views.FileMenuPanels.ProtectDoc({menu:this})).render();
|
||||
this.panels['protect'].setMode(this.mode);
|
||||
|
|
|
@ -385,8 +385,10 @@ define([
|
|||
},
|
||||
|
||||
onCreateNew: function(menu, type) {
|
||||
if ( !Common.Controllers.Desktop.process('create:new') ) {
|
||||
var newDocumentPage = window.open(type == 'blank' ? this.mode.createUrl : type, "_blank");
|
||||
if (newDocumentPage) newDocumentPage.focus();
|
||||
}
|
||||
if (menu) {
|
||||
menu.hide();
|
||||
}
|
||||
|
|
|
@ -301,7 +301,7 @@ define([
|
|||
this.editorConfig.user =
|
||||
this.appOptions.user = Common.Utils.fillUserInfo(this.editorConfig.user, this.editorConfig.lang, this.textAnonymous);
|
||||
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop';
|
||||
this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl) && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl);
|
||||
this.appOptions.canOpenRecent = this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.templates = this.editorConfig.templates;
|
||||
this.appOptions.recent = this.editorConfig.recent;
|
||||
|
|
Loading…
Reference in a new issue