[DE] removed nativeApp flag
This commit is contained in:
parent
e88fb9b51b
commit
011130b5bd
|
@ -326,12 +326,8 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onCreateNew: function(menu, type) {
|
onCreateNew: function(menu, type) {
|
||||||
if (this.mode.nativeApp === true) {
|
|
||||||
this.api.OpenNewDocument(type == 'blank' ? '' : type);
|
|
||||||
} else {
|
|
||||||
var newDocumentPage = window.open(type == 'blank' ? this.mode.createUrl : type, "_blank");
|
var newDocumentPage = window.open(type == 'blank' ? this.mode.createUrl : type, "_blank");
|
||||||
if (newDocumentPage) newDocumentPage.focus();
|
if (newDocumentPage) newDocumentPage.focus();
|
||||||
}
|
|
||||||
|
|
||||||
if (menu) {
|
if (menu) {
|
||||||
menu.hide();
|
menu.hide();
|
||||||
|
|
|
@ -233,10 +233,9 @@ define([
|
||||||
|
|
||||||
this.editorConfig.user =
|
this.editorConfig.user =
|
||||||
this.appOptions.user = Common.Utils.fillUserInfo(this.editorConfig.user, this.editorConfig.lang, this.textAnonymous);
|
this.appOptions.user = Common.Utils.fillUserInfo(this.editorConfig.user, this.editorConfig.lang, this.textAnonymous);
|
||||||
this.appOptions.nativeApp = this.editorConfig.nativeApp === true;
|
|
||||||
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop';
|
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.isDesktopApp;
|
||||||
this.appOptions.canOpenRecent = this.editorConfig.nativeApp !== true && this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp;
|
this.appOptions.canOpenRecent = this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp;
|
||||||
this.appOptions.templates = this.editorConfig.templates;
|
this.appOptions.templates = this.editorConfig.templates;
|
||||||
this.appOptions.recent = this.editorConfig.recent;
|
this.appOptions.recent = this.editorConfig.recent;
|
||||||
this.appOptions.createUrl = this.editorConfig.createUrl;
|
this.appOptions.createUrl = this.editorConfig.createUrl;
|
||||||
|
@ -249,7 +248,7 @@ define([
|
||||||
this.appOptions.customization = this.editorConfig.customization;
|
this.appOptions.customization = this.editorConfig.customization;
|
||||||
this.appOptions.canBackToFolder = (this.editorConfig.canBackToFolder!==false) && (typeof (this.editorConfig.customization) == 'object')
|
this.appOptions.canBackToFolder = (this.editorConfig.canBackToFolder!==false) && (typeof (this.editorConfig.customization) == 'object')
|
||||||
&& (typeof (this.editorConfig.customization.goback) == 'object') && !_.isEmpty(this.editorConfig.customization.goback.url);
|
&& (typeof (this.editorConfig.customization.goback) == 'object') && !_.isEmpty(this.editorConfig.customization.goback.url);
|
||||||
this.appOptions.canBack = this.editorConfig.nativeApp !== true && this.appOptions.canBackToFolder === true;
|
this.appOptions.canBack = this.appOptions.canBackToFolder === true;
|
||||||
this.appOptions.canPlugins = false;
|
this.appOptions.canPlugins = false;
|
||||||
this.plugins = this.editorConfig.plugins;
|
this.plugins = this.editorConfig.plugins;
|
||||||
|
|
||||||
|
@ -1028,8 +1027,8 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType);
|
var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType);
|
||||||
this.appOptions.canDownloadOrigin = !this.appOptions.nativeApp && this.permissions.download !== false && (type && typeof type[1] === 'string');
|
this.appOptions.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string');
|
||||||
this.appOptions.canDownload = !this.appOptions.nativeApp && this.permissions.download !== false && (!type || typeof type[1] !== 'string');
|
this.appOptions.canDownload = this.permissions.download !== false && (!type || typeof type[1] !== 'string');
|
||||||
|
|
||||||
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
|
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
|
||||||
|
|
||||||
|
@ -1074,10 +1073,6 @@ define([
|
||||||
// headerView.setVisible(!this.appOptions.nativeApp && !value && !this.appOptions.isDesktopApp);
|
// headerView.setVisible(!this.appOptions.nativeApp && !value && !this.appOptions.isDesktopApp);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (this.appOptions.nativeApp) {
|
|
||||||
$('body').removeClass('safari');
|
|
||||||
}
|
|
||||||
|
|
||||||
viewport && viewport.setMode(this.appOptions);
|
viewport && viewport.setMode(this.appOptions);
|
||||||
statusbarView && statusbarView.setMode(this.appOptions);
|
statusbarView && statusbarView.setMode(this.appOptions);
|
||||||
|
|
||||||
|
|
|
@ -186,8 +186,6 @@ define([
|
||||||
* UI Events
|
* UI Events
|
||||||
*/
|
*/
|
||||||
|
|
||||||
toolbar.btnNewDocument.on('click', _.bind(this.onNewDocument, this));
|
|
||||||
toolbar.btnOpenDocument.on('click', _.bind(this.onOpenDocument, this));
|
|
||||||
toolbar.btnPrint.on('click', _.bind(this.onPrint, this));
|
toolbar.btnPrint.on('click', _.bind(this.onPrint, this));
|
||||||
toolbar.btnSave.on('click', _.bind(this.onSave, this));
|
toolbar.btnSave.on('click', _.bind(this.onSave, this));
|
||||||
toolbar.btnUndo.on('click', _.bind(this.onUndo, this));
|
toolbar.btnUndo.on('click', _.bind(this.onUndo, this));
|
||||||
|
@ -2695,7 +2693,7 @@ define([
|
||||||
toolbar.btnHide.setDisabled(disable);
|
toolbar.btnHide.setDisabled(disable);
|
||||||
if(disable) {
|
if(disable) {
|
||||||
mask = $("<div class='toolbar-mask'>").appendTo(toolbar.$el);
|
mask = $("<div class='toolbar-mask'>").appendTo(toolbar.$el);
|
||||||
var left = toolbar.isCompactView ? 75 : (toolbar.mode.nativeApp ? 80 : 48 );
|
var left = toolbar.isCompactView ? 75 : 48;
|
||||||
mask.css('left', left + 'px');
|
mask.css('left', left + 'px');
|
||||||
mask.css('right', (toolbar.isCompactView ? 0 : 45) + 'px');
|
mask.css('right', (toolbar.isCompactView ? 0 : 45) + 'px');
|
||||||
Common.util.Shortcuts.suspendEvents('alt+h');
|
Common.util.Shortcuts.suspendEvents('alt+h');
|
||||||
|
|
|
@ -22,14 +22,6 @@
|
||||||
</div>
|
</div>
|
||||||
<section class="box-controls">
|
<section class="box-controls">
|
||||||
<section class="panel">
|
<section class="panel">
|
||||||
<div class="group native">
|
|
||||||
<div class="elset">
|
|
||||||
<span class="btn-slot" id="slot-btn-newdocument"></span>
|
|
||||||
</div>
|
|
||||||
<div class="elset">
|
|
||||||
<span class="btn-slot" id="slot-btn-opendocument"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="group no-mask">
|
<div class="group no-mask">
|
||||||
<div class="elset">
|
<div class="elset">
|
||||||
<span class="btn-slot" id="slot-btn-print"></span>
|
<span class="btn-slot" id="slot-btn-print"></span>
|
||||||
|
|
|
@ -212,20 +212,6 @@ define([
|
||||||
this.btnSaveCls = 'btn-save';
|
this.btnSaveCls = 'btn-save';
|
||||||
this.btnSaveTip = this.tipSave + Common.Utils.String.platformKey('Ctrl+S');
|
this.btnSaveTip = this.tipSave + Common.Utils.String.platformKey('Ctrl+S');
|
||||||
|
|
||||||
this.btnNewDocument = new Common.UI.Button({
|
|
||||||
id: 'id-toolbar-btn-newdocument',
|
|
||||||
cls: 'btn-toolbar',
|
|
||||||
iconCls: 'btn-newdocument'
|
|
||||||
});
|
|
||||||
this.toolbarControls.push(this.btnNewDocument);
|
|
||||||
|
|
||||||
this.btnOpenDocument = new Common.UI.Button({
|
|
||||||
id: 'id-toolbar-btn-opendocument',
|
|
||||||
cls: 'btn-toolbar',
|
|
||||||
iconCls: 'btn-opendocument'
|
|
||||||
});
|
|
||||||
this.toolbarControls.push(this.btnOpenDocument);
|
|
||||||
|
|
||||||
this.btnPrint = new Common.UI.Button({
|
this.btnPrint = new Common.UI.Button({
|
||||||
id: 'id-toolbar-btn-print',
|
id: 'id-toolbar-btn-print',
|
||||||
cls: 'btn-toolbar',
|
cls: 'btn-toolbar',
|
||||||
|
@ -1400,8 +1386,6 @@ define([
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_injectComponent('#slot-btn-newdocument', this.btnNewDocument);
|
|
||||||
_injectComponent('#slot-btn-opendocument', this.btnOpenDocument);
|
|
||||||
_injectComponent('#slot-field-fontname', this.cmbFontName);
|
_injectComponent('#slot-field-fontname', this.cmbFontName);
|
||||||
_injectComponent('#slot-field-fontsize', this.cmbFontSize);
|
_injectComponent('#slot-field-fontsize', this.cmbFontSize);
|
||||||
_injectComponent('#slot-btn-print', this.btnPrint);
|
_injectComponent('#slot-btn-print', this.btnPrint);
|
||||||
|
@ -1649,8 +1633,6 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
// set hints
|
// set hints
|
||||||
this.btnNewDocument.updateHint(this.tipNewDocument);
|
|
||||||
this.btnOpenDocument.updateHint(this.tipOpenDocument);
|
|
||||||
this.btnPrint.updateHint(this.tipPrint + Common.Utils.String.platformKey('Ctrl+P'));
|
this.btnPrint.updateHint(this.tipPrint + Common.Utils.String.platformKey('Ctrl+P'));
|
||||||
this.btnSave.updateHint(this.btnSaveTip);
|
this.btnSave.updateHint(this.btnSaveTip);
|
||||||
this.btnUndo.updateHint(this.tipUndo + Common.Utils.String.platformKey('Ctrl+Z'));
|
this.btnUndo.updateHint(this.tipUndo + Common.Utils.String.platformKey('Ctrl+Z'));
|
||||||
|
@ -2205,8 +2187,6 @@ define([
|
||||||
|
|
||||||
setMode: function (mode) {
|
setMode: function (mode) {
|
||||||
if (mode.isDisconnected) {
|
if (mode.isDisconnected) {
|
||||||
this.btnNewDocument.setDisabled(true);
|
|
||||||
this.btnOpenDocument.setDisabled(true);
|
|
||||||
this.btnSave.setDisabled(true);
|
this.btnSave.setDisabled(true);
|
||||||
this.btnCopy.setDisabled(true);
|
this.btnCopy.setDisabled(true);
|
||||||
this.btnPaste.setDisabled(true);
|
this.btnPaste.setDisabled(true);
|
||||||
|
@ -2263,16 +2243,6 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
if (!mode.nativeApp) {
|
|
||||||
var nativeBtnGroup = this.$el.find('.group.native');
|
|
||||||
|
|
||||||
if (nativeBtnGroup) {
|
|
||||||
nativeBtnGroup.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mode.isDesktopApp)
|
|
||||||
$('.toolbar-group-native').hide();
|
|
||||||
|
|
||||||
this.btnMailRecepients.setVisible(mode.canCoAuthoring == true && mode.canUseMailMerge);
|
this.btnMailRecepients.setVisible(mode.canCoAuthoring == true && mode.canUseMailMerge);
|
||||||
this.listStylesAdditionalMenuItem.setVisible(mode.canEditStyles);
|
this.listStylesAdditionalMenuItem.setVisible(mode.canEditStyles);
|
||||||
|
@ -2593,8 +2563,6 @@ define([
|
||||||
tipInsertHyperlink: 'Add Hyperlink',
|
tipInsertHyperlink: 'Add Hyperlink',
|
||||||
mniHiddenChars: 'Nonprinting Characters',
|
mniHiddenChars: 'Nonprinting Characters',
|
||||||
mniHiddenBorders: 'Hidden Table Borders',
|
mniHiddenBorders: 'Hidden Table Borders',
|
||||||
tipNewDocument: 'New Document',
|
|
||||||
tipOpenDocument: 'Open Document',
|
|
||||||
tipSynchronize: 'The document has been changed by another user. Please click to save your changes and reload the updates.',
|
tipSynchronize: 'The document has been changed by another user. Please click to save your changes and reload the updates.',
|
||||||
textNewColor: 'Add New Custom Color',
|
textNewColor: 'Add New Custom Color',
|
||||||
textAutoColor: 'Automatic',
|
textAutoColor: 'Automatic',
|
||||||
|
|
|
@ -1568,10 +1568,8 @@
|
||||||
"DE.Views.Toolbar.tipMailRecepients": "Mail Merge",
|
"DE.Views.Toolbar.tipMailRecepients": "Mail Merge",
|
||||||
"DE.Views.Toolbar.tipMarkers": "Bullets",
|
"DE.Views.Toolbar.tipMarkers": "Bullets",
|
||||||
"DE.Views.Toolbar.tipMultilevels": "Multilevel List",
|
"DE.Views.Toolbar.tipMultilevels": "Multilevel List",
|
||||||
"DE.Views.Toolbar.tipNewDocument": "New Document",
|
|
||||||
"DE.Views.Toolbar.tipNotes": "Footnotes",
|
"DE.Views.Toolbar.tipNotes": "Footnotes",
|
||||||
"DE.Views.Toolbar.tipNumbers": "Numbering",
|
"DE.Views.Toolbar.tipNumbers": "Numbering",
|
||||||
"DE.Views.Toolbar.tipOpenDocument": "Open Document",
|
|
||||||
"DE.Views.Toolbar.tipPageBreak": "Insert Page or Section break",
|
"DE.Views.Toolbar.tipPageBreak": "Insert Page or Section break",
|
||||||
"DE.Views.Toolbar.tipPageMargins": "Page Margins",
|
"DE.Views.Toolbar.tipPageMargins": "Page Margins",
|
||||||
"DE.Views.Toolbar.tipPageOrient": "Page Orientation",
|
"DE.Views.Toolbar.tipPageOrient": "Page Orientation",
|
||||||
|
|
|
@ -164,10 +164,9 @@ define([
|
||||||
|
|
||||||
me.editorConfig.user =
|
me.editorConfig.user =
|
||||||
me.appOptions.user = Common.Utils.fillUserInfo(me.editorConfig.user, me.editorConfig.lang, me.textAnonymous);
|
me.appOptions.user = Common.Utils.fillUserInfo(me.editorConfig.user, me.editorConfig.lang, me.textAnonymous);
|
||||||
me.appOptions.nativeApp = me.editorConfig.nativeApp === true;
|
|
||||||
me.appOptions.isDesktopApp = me.editorConfig.targetApp == 'desktop';
|
me.appOptions.isDesktopApp = me.editorConfig.targetApp == 'desktop';
|
||||||
me.appOptions.canCreateNew = !_.isEmpty(me.editorConfig.createUrl) && !me.appOptions.isDesktopApp;
|
me.appOptions.canCreateNew = !_.isEmpty(me.editorConfig.createUrl) && !me.appOptions.isDesktopApp;
|
||||||
me.appOptions.canOpenRecent = me.editorConfig.nativeApp !== true && me.editorConfig.recent !== undefined && !me.appOptions.isDesktopApp;
|
me.appOptions.canOpenRecent = me.editorConfig.recent !== undefined && !me.appOptions.isDesktopApp;
|
||||||
me.appOptions.templates = me.editorConfig.templates;
|
me.appOptions.templates = me.editorConfig.templates;
|
||||||
me.appOptions.recent = me.editorConfig.recent;
|
me.appOptions.recent = me.editorConfig.recent;
|
||||||
me.appOptions.createUrl = me.editorConfig.createUrl;
|
me.appOptions.createUrl = me.editorConfig.createUrl;
|
||||||
|
@ -180,7 +179,7 @@ define([
|
||||||
me.appOptions.customization = me.editorConfig.customization;
|
me.appOptions.customization = me.editorConfig.customization;
|
||||||
me.appOptions.canBackToFolder = (me.editorConfig.canBackToFolder!==false) && (typeof (me.editorConfig.customization) == 'object')
|
me.appOptions.canBackToFolder = (me.editorConfig.canBackToFolder!==false) && (typeof (me.editorConfig.customization) == 'object')
|
||||||
&& (typeof (me.editorConfig.customization.goback) == 'object') && !_.isEmpty(me.editorConfig.customization.goback.url);
|
&& (typeof (me.editorConfig.customization.goback) == 'object') && !_.isEmpty(me.editorConfig.customization.goback.url);
|
||||||
me.appOptions.canBack = me.editorConfig.nativeApp !== true && me.appOptions.canBackToFolder === true;
|
me.appOptions.canBack = me.appOptions.canBackToFolder === true;
|
||||||
me.appOptions.canPlugins = false;
|
me.appOptions.canPlugins = false;
|
||||||
me.plugins = me.editorConfig.plugins;
|
me.plugins = me.editorConfig.plugins;
|
||||||
|
|
||||||
|
@ -615,8 +614,8 @@ define([
|
||||||
me.appOptions.canPrint = (me.permissions.print !== false);
|
me.appOptions.canPrint = (me.permissions.print !== false);
|
||||||
|
|
||||||
var type = /^(?:(pdf|djvu|xps))$/.exec(me.document.fileType);
|
var type = /^(?:(pdf|djvu|xps))$/.exec(me.document.fileType);
|
||||||
me.appOptions.canDownloadOrigin = !me.appOptions.nativeApp && me.permissions.download !== false && (type && typeof type[1] === 'string');
|
me.appOptions.canDownloadOrigin = me.permissions.download !== false && (type && typeof type[1] === 'string');
|
||||||
me.appOptions.canDownload = !me.appOptions.nativeApp && me.permissions.download !== false && (!type || typeof type[1] !== 'string');
|
me.appOptions.canDownload = me.permissions.download !== false && (!type || typeof type[1] !== 'string');
|
||||||
|
|
||||||
me._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && me.appOptions.canEdit && me.editorConfig.mode !== 'view';
|
me._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && me.appOptions.canEdit && me.editorConfig.mode !== 'view';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue