Merge branch 'hotfix/v5.3.2' into develop

This commit is contained in:
Julia Radzhabova 2019-06-21 18:28:46 +03:00
commit 08e3e47fa1
10 changed files with 56 additions and 59 deletions

View file

@ -124,7 +124,8 @@
help: true, help: true,
compactHeader: false, compactHeader: false,
toolbarNoTabs: false, toolbarNoTabs: false,
toolbarHideFileName: false toolbarHideFileName: false,
reviewDisplay: 'original'
}, },
plugins: { plugins: {
autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'], autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'],

View file

@ -671,7 +671,13 @@ define([
}); });
} else if (config.canViewReview) { } else if (config.canViewReview) {
config.canViewReview = me.api.asc_HaveRevisionsChanges(true); // check revisions from all users config.canViewReview = me.api.asc_HaveRevisionsChanges(true); // check revisions from all users
config.canViewReview && me.turnDisplayMode(config.isRestrictedEdit ? 'markup' : Common.localStorage.getItem(me.view.appPrefix + "review-mode") || 'original'); // load display mode only in viewer if (config.canViewReview) {
var val = Common.localStorage.getItem(me.view.appPrefix + "review-mode");
if (val===null)
val = me.appConfig.customization && /^(original|final|markup)$/i.test(me.appConfig.customization.reviewDisplay) ? me.appConfig.customization.reviewDisplay.toLocaleLowerCase() : 'original';
me.turnDisplayMode(config.isRestrictedEdit ? 'markup' : val); // load display mode only in viewer
me.view.turnDisplayMode(config.isRestrictedEdit ? 'markup' : val);
}
} }
if (me.view && me.view.btnChat) { if (me.view && me.view.btnChat) {

View file

@ -90,7 +90,7 @@ define([
'</tr>', '</tr>',
'<tr>', '<tr>',
'<td colspan="3" align="center">', '<td colspan="3" align="center">',
'<a href="<%= publisherurl %>" target="_blank"><% print(publisherurl.replace(/https?:\\/{2}/, "")) %></a>', '<a href="<%= publisherurl %>" target="_blank"><% print(publisherurl.replace(/https?:\\/{2}/, "").replace(/\\/$/,"")) %></a>',
'</td>', '</td>',
'</tr>', '</tr>',
'</table>', '</table>',
@ -143,7 +143,7 @@ define([
'</tr>', '</tr>',
'<tr>', '<tr>',
'<td colspan="3" align="center">', '<td colspan="3" align="center">',
'<label class="asc-about-desc"><% print(publisherurl.replace(/https?:\\/{2}/, "")) %></label>', '<label class="asc-about-desc"><% print(publisherurl.replace(/https?:\\/{2}/, "").replace(/\\/$/,"")) %></label>',
'</td>', '</td>',
'</tr>', '</tr>',
'</table>' '</table>'
@ -156,7 +156,7 @@ define([
el.html(this.template({ el.html(this.template({
publishername: '{{PUBLISHER_NAME}}', publishername: '{{PUBLISHER_NAME}}',
publisheraddr: '{{PUBLISHER_ADDRESS}}', publisheraddr: '{{PUBLISHER_ADDRESS}}',
publisherurl: /^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1], publisherurl: '{{PUBLISHER_URL}}',
supportemail: '{{SUPPORT_EMAIL}}', supportemail: '{{SUPPORT_EMAIL}}',
phonenum: '{{PUBLISHER_PHONE}}', phonenum: '{{PUBLISHER_PHONE}}',
scope: this scope: this

View file

@ -209,13 +209,49 @@ define([
caption: this.txtNext caption: this.txtNext
}); });
if (!this.appConfig.isRestrictedEdit) // hide Display mode option for fillForms and commenting mode if (!this.appConfig.isRestrictedEdit) {// hide Display mode option for fillForms and commenting mode
var menuTemplate = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem"><div><%= caption %></div>' +
'<% if (options.description !== null) { %><label style="display: block;color: #a5a5a5;cursor: pointer;white-space: normal;"><%= options.description %></label>' +
'<% } %></a>');
this.btnReviewView = new Common.UI.Button({ this.btnReviewView = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-ic-reviewview', iconCls: 'btn-ic-reviewview',
caption: this.txtView, caption: this.txtView,
menu: true menu: new Common.UI.Menu({
cls: 'ppm-toolbar',
items: [
{
caption: this.txtMarkupCap,
checkable: true,
toggleGroup: 'menuReviewView',
checked: true,
value: 'markup',
template: menuTemplate,
description: this.txtMarkup
},
{
caption: this.txtFinalCap,
checkable: true,
toggleGroup: 'menuReviewView',
checked: false,
template: menuTemplate,
description: this.txtFinal,
value: 'final'
},
{
caption: this.txtOriginalCap,
checkable: true,
toggleGroup: 'menuReviewView',
checked: false,
template: menuTemplate,
description: this.txtOriginal,
value: 'original'
}
]
})
}); });
}
} }
if (!!this.appConfig.sharingSettingsUrl && this.appConfig.sharingSettingsUrl.length && this._readonlyRights!==true) { if (!!this.appConfig.sharingSettingsUrl && this.appConfig.sharingSettingsUrl.length && this._readonlyRights!==true) {
@ -319,41 +355,7 @@ define([
me.btnPrev.updateHint(me.hintPrev); me.btnPrev.updateHint(me.hintPrev);
me.btnNext.updateHint(me.hintNext); me.btnNext.updateHint(me.hintNext);
me.btnReviewView && me.btnReviewView.setMenu(
new Common.UI.Menu({
cls: 'ppm-toolbar',
items: [
{
caption: me.txtMarkupCap,
checkable: true,
toggleGroup: 'menuReviewView',
checked: true,
value: 'markup',
template: menuTemplate,
description: me.txtMarkup
},
{
caption: me.txtFinalCap,
checkable: true,
toggleGroup: 'menuReviewView',
checked: false,
template: menuTemplate,
description: me.txtFinal,
value: 'final'
},
{
caption: me.txtOriginalCap,
checkable: true,
toggleGroup: 'menuReviewView',
checked: false,
template: menuTemplate,
description: me.txtOriginal,
value: 'original'
}
]
}));
me.btnReviewView && me.btnReviewView.updateHint(me.tipReviewView); me.btnReviewView && me.btnReviewView.updateHint(me.tipReviewView);
!me.appConfig.canReview && me.turnDisplayMode(Common.localStorage.getItem(me.appPrefix + "review-mode") || 'original');
} }
me.btnSharing && me.btnSharing.updateHint(me.tipSharing); me.btnSharing && me.btnSharing.updateHint(me.tipSharing);
me.btnHistory && me.btnHistory.updateHint(me.tipHistory); me.btnHistory && me.btnHistory.updateHint(me.tipHistory);

View file

@ -1095,7 +1095,7 @@ define([
primary: 'contact', primary: 'contact',
callback: function(btn) { callback: function(btn) {
if (btn == 'contact') if (btn == 'contact')
window.open('mailto:sales@onlyoffice.com', "_blank"); window.open('mailto:{{SALES_EMAIL}}', "_blank");
} }
}); });
} }
@ -1189,10 +1189,6 @@ define([
this.appOptions.canBranding = params.asc_getCustomization(); this.appOptions.canBranding = params.asc_getCustomization();
if (this.appOptions.canBranding) if (this.appOptions.canBranding)
appHeader.setBranding(this.editorConfig.customization); appHeader.setBranding(this.editorConfig.customization);
else if (typeof this.editorConfig.customization == 'object') {
this.editorConfig.customization.compactHeader = this.editorConfig.customization.toolbarNoTabs =
this.editorConfig.customization.toolbarHideFileName = false;
}
this.appOptions.canRename && appHeader.setCanRename(true); this.appOptions.canRename && appHeader.setCanRename(true);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);

View file

@ -660,7 +660,7 @@ define([
text: me.textContactUs, text: me.textContactUs,
bold: true, bold: true,
onClick: function() { onClick: function() {
window.open('mailto:sales@onlyoffice.com', "_blank"); window.open('mailto:{{SALES_EMAIL}}', "_blank");
} }
}, },
{ text: me.textClose }] { text: me.textClose }]

View file

@ -839,7 +839,7 @@ define([
primary: 'contact', primary: 'contact',
callback: function(btn) { callback: function(btn) {
if (btn == 'contact') if (btn == 'contact')
window.open('mailto:sales@onlyoffice.com', "_blank"); window.open('mailto:{{SALES_EMAIL}}', "_blank");
} }
}); });
} }
@ -910,10 +910,6 @@ define([
this.appOptions.canBranding = params.asc_getCustomization(); this.appOptions.canBranding = params.asc_getCustomization();
if (this.appOptions.canBranding) if (this.appOptions.canBranding)
appHeader.setBranding(this.editorConfig.customization); appHeader.setBranding(this.editorConfig.customization);
else if (typeof this.editorConfig.customization == 'object') {
this.editorConfig.customization.compactHeader = this.editorConfig.customization.toolbarNoTabs =
this.editorConfig.customization.toolbarHideFileName = false;
}
this.appOptions.canRename && appHeader.setCanRename(true); this.appOptions.canRename && appHeader.setCanRename(true);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);

View file

@ -608,7 +608,7 @@ define([
text: me.textContactUs, text: me.textContactUs,
bold: true, bold: true,
onClick: function() { onClick: function() {
window.open('mailto:sales@onlyoffice.com', "_blank"); window.open('mailto:{{SALES_EMAIL}}', "_blank");
} }
}, },
{ text: me.textClose }] { text: me.textClose }]

View file

@ -853,7 +853,7 @@ define([
primary: 'contact', primary: 'contact',
callback: function(btn) { callback: function(btn) {
if (btn == 'contact') if (btn == 'contact')
window.open('mailto:sales@onlyoffice.com', "_blank"); window.open('mailto:{{SALES_EMAIL}}', "_blank");
} }
}); });
} }
@ -912,10 +912,6 @@ define([
this.appOptions.canBranding = params.asc_getCustomization(); this.appOptions.canBranding = params.asc_getCustomization();
if (this.appOptions.canBranding) if (this.appOptions.canBranding)
this.headerView.setBranding(this.editorConfig.customization); this.headerView.setBranding(this.editorConfig.customization);
else if (typeof this.editorConfig.customization == 'object') {
this.editorConfig.customization.compactHeader = this.editorConfig.customization.toolbarNoTabs =
this.editorConfig.customization.toolbarHideFileName = false;
}
this.appOptions.canRename && this.headerView.setCanRename(true); this.appOptions.canRename && this.headerView.setCanRename(true);
} else } else

View file

@ -623,7 +623,7 @@ define([
text: me.textContactUs, text: me.textContactUs,
bold: true, bold: true,
onClick: function() { onClick: function() {
window.open('mailto:sales@onlyoffice.com', "_blank"); window.open('mailto:{{SALES_EMAIL}}', "_blank");
} }
}, },
{ text: me.textClose }] { text: me.textClose }]