Added developer mode.
This commit is contained in:
parent
bf566734ee
commit
7749b95544
|
@ -1,6 +1,7 @@
|
|||
<div id="header-container">
|
||||
<div id="header-logo"></div>
|
||||
<div id="header-caption"><div><%= headerCaption %></div></div>
|
||||
<div id="header-developer" class="hidden"><div><%= headerDeveloper %></div></div>
|
||||
<div id="header-documentcaption"><%= documentCaption %></div>
|
||||
<div id="header-back" style="display: <%= canBack ? 'table-cell' : 'none' %>;"><div><%= textBack %></div></div>
|
||||
</div>
|
|
@ -53,6 +53,7 @@ define([
|
|||
options : {
|
||||
branding: {},
|
||||
headerCaption: 'Default Caption',
|
||||
headerDeveloper: 'DEVELOPER MODE',
|
||||
documentCaption: '',
|
||||
canBack: false
|
||||
},
|
||||
|
@ -77,6 +78,7 @@ define([
|
|||
this.options = this.options ? _({}).extend(this.options, options) : options;
|
||||
|
||||
this.headerCaption = this.options.headerCaption;
|
||||
this.headerDeveloper = this.txtHeaderDeveloper;
|
||||
this.documentCaption = this.options.documentCaption;
|
||||
this.canBack = this.options.canBack;
|
||||
this.branding = this.options.customization;
|
||||
|
@ -85,6 +87,7 @@ define([
|
|||
render: function () {
|
||||
$(this.el).html(this.template({
|
||||
headerCaption : this.headerCaption,
|
||||
headerDeveloper : this.headerDeveloper,
|
||||
documentCaption : Common.Utils.String.htmlEncode(this.documentCaption),
|
||||
canBack : this.canBack,
|
||||
textBack : this.textBack
|
||||
|
@ -219,7 +222,12 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
setDeveloperMode: function(mode) {
|
||||
$('#header-developer').toggleClass('hidden', !mode);
|
||||
},
|
||||
|
||||
textBack: 'Go to Documents',
|
||||
openNewTabText: 'Open in New Tab'
|
||||
openNewTabText: 'Open in New Tab',
|
||||
txtHeaderDeveloper: 'DEVELOPER MODE'
|
||||
}, Common.Views.Header || {}))
|
||||
});
|
||||
|
|
|
@ -46,6 +46,34 @@
|
|||
}
|
||||
}
|
||||
|
||||
#header-developer {
|
||||
background-color: #ffb400;
|
||||
padding-left: 15px + @app-header-height / 3;
|
||||
& > div {
|
||||
position: relative;
|
||||
background-color: #ffb400;
|
||||
color: #6e4e00 !important;
|
||||
padding-right: 15px;
|
||||
cursor: default;
|
||||
z-index: 1;
|
||||
white-space: nowrap;
|
||||
height: @app-header-height;
|
||||
line-height: @app-header-height;
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -@app-header-height / 2;
|
||||
width: @app-header-height / 2;
|
||||
height: @app-header-height;
|
||||
border-top: @app-header-height / 2 solid transparent;
|
||||
border-left: @app-header-height / 3 solid #ffb400;
|
||||
border-bottom: @app-header-height / 2 solid transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#header-documentcaption {
|
||||
width: 100%;
|
||||
max-width: 100px;
|
||||
|
|
|
@ -963,12 +963,10 @@ define([
|
|||
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
|
||||
|
||||
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
|
||||
if (this.appOptions.canBranding) {
|
||||
this.getApplication()
|
||||
.getController('Viewport')
|
||||
.getView('Common.Views.Header')
|
||||
.setBranding(this.editorConfig.customization);
|
||||
}
|
||||
if (this.appOptions.canBranding)
|
||||
this.getApplication().getController('Viewport').getView('Common.Views.Header').setBranding(this.editorConfig.customization);
|
||||
|
||||
params.asc_getTrial() && this.getApplication().getController('Viewport').getView('Common.Views.Header').setDeveloperMode(true);
|
||||
|
||||
this.applyModeCommonElements();
|
||||
this.applyModeEditorElements();
|
||||
|
|
|
@ -141,6 +141,7 @@
|
|||
"Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients",
|
||||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||
"Common.Views.Header.textBack": "Go to Documents",
|
||||
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||
"Common.Views.History.textHistoryHeader": "Back to Document",
|
||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||
|
|
|
@ -742,12 +742,10 @@ define([
|
|||
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
|
||||
|
||||
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
|
||||
if (this.appOptions.canBranding) {
|
||||
this.getApplication()
|
||||
.getController('Viewport')
|
||||
.getView('Common.Views.Header')
|
||||
.setBranding(this.editorConfig.customization);
|
||||
}
|
||||
if (this.appOptions.canBranding)
|
||||
this.getApplication().getController('Viewport').getView('Common.Views.Header').setBranding(this.editorConfig.customization);
|
||||
|
||||
params.asc_getTrial() && this.getApplication().getController('Viewport').getView('Common.Views.Header').setDeveloperMode(true);
|
||||
|
||||
this.applyModeCommonElements();
|
||||
this.applyModeEditorElements();
|
||||
|
|
|
@ -80,6 +80,7 @@
|
|||
"Common.Views.ExternalDiagramEditor.textTitle": "Chart Editor",
|
||||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||
"Common.Views.Header.textBack": "Go to Documents",
|
||||
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
|
||||
|
|
|
@ -759,9 +759,10 @@ define([
|
|||
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
|
||||
|
||||
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
|
||||
if (this.appOptions.canBranding) {
|
||||
if (this.appOptions.canBranding)
|
||||
this.headerView.setBranding(this.editorConfig.customization);
|
||||
}
|
||||
|
||||
params.asc_getTrial() && this.headerView.setDeveloperMode(true);
|
||||
}
|
||||
|
||||
this.appOptions.canRequestEditRights = this.editorConfig.canRequestEditRights;
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
"Common.Views.DocumentAccessDialog.textTitle": "Sharing Settings",
|
||||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||
"Common.Views.Header.textBack": "Go to Documents",
|
||||
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
|
||||
|
|
Loading…
Reference in a new issue