Added developer mode.
This commit is contained in:
parent
bf566734ee
commit
7749b95544
|
@ -1,6 +1,7 @@
|
||||||
<div id="header-container">
|
<div id="header-container">
|
||||||
<div id="header-logo"></div>
|
<div id="header-logo"></div>
|
||||||
<div id="header-caption"><div><%= headerCaption %></div></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-documentcaption"><%= documentCaption %></div>
|
||||||
<div id="header-back" style="display: <%= canBack ? 'table-cell' : 'none' %>;"><div><%= textBack %></div></div>
|
<div id="header-back" style="display: <%= canBack ? 'table-cell' : 'none' %>;"><div><%= textBack %></div></div>
|
||||||
</div>
|
</div>
|
|
@ -53,6 +53,7 @@ define([
|
||||||
options : {
|
options : {
|
||||||
branding: {},
|
branding: {},
|
||||||
headerCaption: 'Default Caption',
|
headerCaption: 'Default Caption',
|
||||||
|
headerDeveloper: 'DEVELOPER MODE',
|
||||||
documentCaption: '',
|
documentCaption: '',
|
||||||
canBack: false
|
canBack: false
|
||||||
},
|
},
|
||||||
|
@ -77,6 +78,7 @@ define([
|
||||||
this.options = this.options ? _({}).extend(this.options, options) : options;
|
this.options = this.options ? _({}).extend(this.options, options) : options;
|
||||||
|
|
||||||
this.headerCaption = this.options.headerCaption;
|
this.headerCaption = this.options.headerCaption;
|
||||||
|
this.headerDeveloper = this.txtHeaderDeveloper;
|
||||||
this.documentCaption = this.options.documentCaption;
|
this.documentCaption = this.options.documentCaption;
|
||||||
this.canBack = this.options.canBack;
|
this.canBack = this.options.canBack;
|
||||||
this.branding = this.options.customization;
|
this.branding = this.options.customization;
|
||||||
|
@ -85,6 +87,7 @@ define([
|
||||||
render: function () {
|
render: function () {
|
||||||
$(this.el).html(this.template({
|
$(this.el).html(this.template({
|
||||||
headerCaption : this.headerCaption,
|
headerCaption : this.headerCaption,
|
||||||
|
headerDeveloper : this.headerDeveloper,
|
||||||
documentCaption : Common.Utils.String.htmlEncode(this.documentCaption),
|
documentCaption : Common.Utils.String.htmlEncode(this.documentCaption),
|
||||||
canBack : this.canBack,
|
canBack : this.canBack,
|
||||||
textBack : this.textBack
|
textBack : this.textBack
|
||||||
|
@ -219,7 +222,12 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setDeveloperMode: function(mode) {
|
||||||
|
$('#header-developer').toggleClass('hidden', !mode);
|
||||||
|
},
|
||||||
|
|
||||||
textBack: 'Go to Documents',
|
textBack: 'Go to Documents',
|
||||||
openNewTabText: 'Open in New Tab'
|
openNewTabText: 'Open in New Tab',
|
||||||
|
txtHeaderDeveloper: 'DEVELOPER MODE'
|
||||||
}, Common.Views.Header || {}))
|
}, 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 {
|
#header-documentcaption {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 100px;
|
max-width: 100px;
|
||||||
|
|
|
@ -963,12 +963,10 @@ define([
|
||||||
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';
|
||||||
|
|
||||||
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
|
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
|
||||||
if (this.appOptions.canBranding) {
|
if (this.appOptions.canBranding)
|
||||||
this.getApplication()
|
this.getApplication().getController('Viewport').getView('Common.Views.Header').setBranding(this.editorConfig.customization);
|
||||||
.getController('Viewport')
|
|
||||||
.getView('Common.Views.Header')
|
params.asc_getTrial() && this.getApplication().getController('Viewport').getView('Common.Views.Header').setDeveloperMode(true);
|
||||||
.setBranding(this.editorConfig.customization);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.applyModeCommonElements();
|
this.applyModeCommonElements();
|
||||||
this.applyModeEditorElements();
|
this.applyModeEditorElements();
|
||||||
|
|
|
@ -141,6 +141,7 @@
|
||||||
"Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients",
|
"Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients",
|
||||||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||||
"Common.Views.Header.textBack": "Go to Documents",
|
"Common.Views.Header.textBack": "Go to Documents",
|
||||||
|
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||||
"Common.Views.History.textHistoryHeader": "Back to Document",
|
"Common.Views.History.textHistoryHeader": "Back to Document",
|
||||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
||||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
"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._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');
|
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
|
||||||
if (this.appOptions.canBranding) {
|
if (this.appOptions.canBranding)
|
||||||
this.getApplication()
|
this.getApplication().getController('Viewport').getView('Common.Views.Header').setBranding(this.editorConfig.customization);
|
||||||
.getController('Viewport')
|
|
||||||
.getView('Common.Views.Header')
|
params.asc_getTrial() && this.getApplication().getController('Viewport').getView('Common.Views.Header').setDeveloperMode(true);
|
||||||
.setBranding(this.editorConfig.customization);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.applyModeCommonElements();
|
this.applyModeCommonElements();
|
||||||
this.applyModeEditorElements();
|
this.applyModeEditorElements();
|
||||||
|
|
|
@ -80,6 +80,7 @@
|
||||||
"Common.Views.ExternalDiagramEditor.textTitle": "Chart Editor",
|
"Common.Views.ExternalDiagramEditor.textTitle": "Chart Editor",
|
||||||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||||
"Common.Views.Header.textBack": "Go to Documents",
|
"Common.Views.Header.textBack": "Go to Documents",
|
||||||
|
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
||||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||||
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
|
"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.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');
|
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);
|
this.headerView.setBranding(this.editorConfig.customization);
|
||||||
}
|
|
||||||
|
params.asc_getTrial() && this.headerView.setDeveloperMode(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.appOptions.canRequestEditRights = this.editorConfig.canRequestEditRights;
|
this.appOptions.canRequestEditRights = this.editorConfig.canRequestEditRights;
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
"Common.Views.DocumentAccessDialog.textTitle": "Sharing Settings",
|
"Common.Views.DocumentAccessDialog.textTitle": "Sharing Settings",
|
||||||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||||
"Common.Views.Header.textBack": "Go to Documents",
|
"Common.Views.Header.textBack": "Go to Documents",
|
||||||
|
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
||||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||||
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
|
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
|
||||||
|
|
Loading…
Reference in a new issue