Merge pull request #232 from ONLYOFFICE/feature/bug-fix
Feature/bug fix
This commit is contained in:
commit
bc3210dbc4
|
@ -59,7 +59,8 @@ define([
|
|||
_userId,
|
||||
editUsers = [],
|
||||
editor = !!window.DE ? 'DE' : !!window.PE ? 'PE' : 'SSE',
|
||||
displayMode = "Markup",
|
||||
displayMode = "markup",
|
||||
canViewReview,
|
||||
arrChangeReview = [],
|
||||
dateChange = [],
|
||||
_fileKey;
|
||||
|
@ -208,11 +209,8 @@ define([
|
|||
me.initComments();
|
||||
Common.Utils.addScrollIfNeed('.page[data-page=comments-view]', '.page[data-page=comments-view] .page-content');
|
||||
} else {
|
||||
if(editor === 'DE' && !this.appConfig.canReview) {
|
||||
this.canViewReview = me.api.asc_HaveRevisionsChanges(true);
|
||||
if (!this.canViewReview) {
|
||||
$('#reviewing-settings').hide();
|
||||
}
|
||||
if(editor === 'DE' && !this.appConfig.canReview && !canViewReview) {
|
||||
$('#reviewing-settings').hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -276,7 +274,7 @@ define([
|
|||
$('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me));
|
||||
$('#settings-accept-all').single('click', _.bind(me.onAcceptAllClick, me));
|
||||
$('#settings-reject-all').single('click', _.bind(me.onRejectAllClick, me));
|
||||
if(this.appConfig.isReviewOnly || displayMode == "Final" || displayMode == "Original" ) {
|
||||
if(this.appConfig.isReviewOnly || displayMode == "final" || displayMode == "original" ) {
|
||||
$('#settings-accept-all').addClass('disabled');
|
||||
$('#settings-reject-all').addClass('disabled');
|
||||
$('#settings-review').addClass('disabled');
|
||||
|
@ -320,12 +318,12 @@ define([
|
|||
var me = this;
|
||||
$('input:radio').single('change', _.bind(me.onReviewViewClick, me));
|
||||
var value = displayMode;
|
||||
if (value == null || value === "Markup") {
|
||||
$('input[value="Markup"]').attr('checked', true);
|
||||
} else if (value === 'Final') {
|
||||
$('input[value="Final"]').attr('checked', true);
|
||||
} else if (value === 'Original') {
|
||||
$('input[value="Original"]').attr('checked', true);
|
||||
if (value == null || value === "markup") {
|
||||
$('input[value="markup"]').attr('checked', true);
|
||||
} else if (value === 'final') {
|
||||
$('input[value="final"]').attr('checked', true);
|
||||
} else if (value === 'original') {
|
||||
$('input[value="original"]').attr('checked', true);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -333,24 +331,29 @@ define([
|
|||
return displayMode;
|
||||
},
|
||||
|
||||
setCanViewReview: function(config) {
|
||||
canViewReview = config;
|
||||
},
|
||||
|
||||
onReviewViewClick: function(event) {
|
||||
var value = $(event.currentTarget).val();
|
||||
this.turnDisplayMode(value);
|
||||
!this.appConfig.canReview && Common.localStorage.setItem("de-view-review-mode", value);
|
||||
},
|
||||
|
||||
turnDisplayMode: function(value) {
|
||||
displayMode = value;
|
||||
turnDisplayMode: function(value, suppressEvent) {
|
||||
displayMode = value.toLocaleLowerCase();
|
||||
if (this.api) {
|
||||
if (value === 'Final')
|
||||
if (displayMode === 'final')
|
||||
this.api.asc_BeginViewModeInReview(true);
|
||||
|
||||
else if (value === 'Original')
|
||||
else if (displayMode === 'original')
|
||||
this.api.asc_BeginViewModeInReview(false);
|
||||
else
|
||||
this.api.asc_EndViewModeInReview();
|
||||
}
|
||||
this.initReviewingSettingsView();
|
||||
DE.getController('Toolbar').setDisplayMode(value);
|
||||
!suppressEvent && this.initReviewingSettingsView();
|
||||
DE.getController('Toolbar').setDisplayMode(displayMode);
|
||||
},
|
||||
|
||||
|
||||
|
@ -386,7 +389,7 @@ define([
|
|||
$('#btn-delete-change').single('click', _.bind(this.onDeleteChange, this));
|
||||
}
|
||||
}
|
||||
if(displayMode == "Final" || displayMode == "Original") {
|
||||
if(displayMode == "final" || displayMode == "original") {
|
||||
$('#btn-accept-change').addClass('disabled');
|
||||
$('#btn-reject-change').addClass('disabled');
|
||||
$('#btn-prev-change').addClass('disabled');
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
<ul>
|
||||
<li>
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="doc-orientation" value="Markup">
|
||||
<input type="radio" name="doc-orientation" value="markup">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textMarkup %></div>
|
||||
|
@ -159,7 +159,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="doc-orientation" value="Final">
|
||||
<input type="radio" name="doc-orientation" value="final">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textFinal %></div>
|
||||
|
@ -168,7 +168,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="doc-orientation" value="Original">
|
||||
<input type="radio" name="doc-orientation" value="original">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textOriginal %></div>
|
||||
|
|
|
@ -604,6 +604,19 @@ define([
|
|||
me.applyLicense();
|
||||
|
||||
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||
|
||||
if (!me.appOptions.canReview) {
|
||||
var canViewReview = me.appOptions.isEdit || me.api.asc_HaveRevisionsChanges(true);
|
||||
DE.getController('Common.Controllers.Collaboration').setCanViewReview(canViewReview);
|
||||
if (canViewReview) {
|
||||
var viewReviewMode = Common.localStorage.getItem("de-view-review-mode");
|
||||
if (viewReviewMode===null)
|
||||
viewReviewMode = me.appOptions.customization && /^(original|final|markup)$/i.test(me.appOptions.customization.reviewDisplay) ? me.appOptions.customization.reviewDisplay.toLocaleLowerCase() : 'original';
|
||||
viewReviewMode = me.appOptions.isEdit ? 'markup' : viewReviewMode;
|
||||
DE.getController('Common.Controllers.Collaboration').turnDisplayMode(viewReviewMode);
|
||||
}
|
||||
}
|
||||
|
||||
Common.Gateway.documentReady();
|
||||
},
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ define([
|
|||
$('#settings-print').single('click', _.bind(me.onPrint, me));
|
||||
$('#settings-collaboration').single('click', _.bind(me.clickCollaboration, me));
|
||||
var _stateDisplayMode = DE.getController('Common.Controllers.Collaboration').getDisplayMode();
|
||||
if(_stateDisplayMode == "Final" || _stateDisplayMode == "Original") {
|
||||
if(_stateDisplayMode == "final" || _stateDisplayMode == "original") {
|
||||
$('#settings-document').addClass('disabled');
|
||||
}
|
||||
var _userCount = DE.getController('Main').returnUserCount();
|
||||
|
@ -378,7 +378,7 @@ define([
|
|||
value = (value!==null) ? parseInt(value) : Common.Utils.Metric.getDefaultMetric();
|
||||
$unitMeasurement.val([value]);
|
||||
var _stateDisplayMode = DE.getController('Common.Controllers.Collaboration').getDisplayMode();
|
||||
if(_stateDisplayMode == "Final" || _stateDisplayMode == "Original") {
|
||||
if(_stateDisplayMode == "final" || _stateDisplayMode == "original") {
|
||||
$('#settings-no-characters').addClass('disabled');
|
||||
$('#settings-hidden-borders').addClass('disabled');
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ define([
|
|||
},
|
||||
|
||||
setDisplayMode: function(displayMode) {
|
||||
stateDisplayMode = displayMode == "Final" || displayMode == "Original" ? true : false;
|
||||
stateDisplayMode = displayMode == "final" || displayMode == "original" ? true : false;
|
||||
var selected = this.api.getSelectedElements();
|
||||
this.onApiFocusObject(selected);
|
||||
},
|
||||
|
|
|
@ -633,21 +633,21 @@
|
|||
</div>
|
||||
<div class="content-block">
|
||||
<h3>DOCUMENT EDITOR</h3>
|
||||
<h3><%= scope.textVersion %> {{PRODUCT_VERSION}}</h3>
|
||||
<h3><%= scope.textVersion %> <%= prodversion %></h3>
|
||||
</div>
|
||||
<div class="content-block">
|
||||
<h3 id="settings-about-name" class="vendor">{{PUBLISHER_NAME}}</h3>
|
||||
<p><label><%= scope.textAddress %>:</label><a id="settings-about-address" class="external" href="#">{{PUBLISHER_ADDRESS}}</a></p>
|
||||
<p><label><%= scope.textEmail %>:</label><a id="settings-about-email" class="external" target="_blank" href="mailto:{{SUPPORT_EMAIL}}">{{SUPPORT_EMAIL}}</a></p>
|
||||
<p><label><%= scope.textTel %>:</label><a id="settings-about-tel" class="external" target="_blank" href="tel:{{PUBLISHER_PHONE}}">{{PUBLISHER_PHONE}}</a></p>
|
||||
<p><a id="settings-about-url" class="external" target="_blank" href="{{PUBLISHER_URL}}"><% print(/^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1]); %></a></p>
|
||||
<h3 id="settings-about-name" class="vendor"><%= publishername %></h3>
|
||||
<p><label><%= scope.textAddress %>:</label><a id="settings-about-address" class="external" href="#"><%= publisheraddr %></a></p>
|
||||
<p><label><%= scope.textEmail %>:</label><a id="settings-about-email" class="external" target="_blank" href="mailto:<%= supportemail %>"><%= supportemail %></a></p>
|
||||
<p><label><%= scope.textTel %>:</label><a id="settings-about-tel" class="external" target="_blank" href="tel:<%= phonenum %>"><%= phonenum %></a></p>
|
||||
<p><a id="settings-about-url" class="external" target="_blank" href="<%= publisherurl %>"><%= printed_url %></a></p>
|
||||
<p><label id="settings-about-info" style="display: none;"></label></p>
|
||||
</div>
|
||||
<div class="content-block" id="settings-about-licensor" style="display: none;">
|
||||
<div class="content-block-inner" style="padding-top:0; padding-bottom: 1px;"/>
|
||||
<div class="content-block-inner" style="padding-top:0; padding-bottom: 1px;"></div>
|
||||
<p><label><%= scope.textPoweredBy %></label></p>
|
||||
<h3 class="vendor">{{PUBLISHER_NAME}}</h3>
|
||||
<p><a class="external" target="_blank" href="{{PUBLISHER_URL}}"><% print(/^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1]); %></a></p>
|
||||
<h3 class="vendor"><%= publishername %></h3>
|
||||
<p><a class="external" target="_blank" href="<%= publisherurl %>"><%= printed_url %></a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -91,7 +91,14 @@ define([
|
|||
phone : Common.SharedSettings.get('phone'),
|
||||
orthography: Common.SharedSettings.get('sailfish'),
|
||||
scope : this,
|
||||
width : $(window).width()
|
||||
width : $(window).width(),
|
||||
prodversion: '{{PRODUCT_VERSION}}',
|
||||
publishername: '{{PUBLISHER_NAME}}',
|
||||
publisheraddr: '{{PUBLISHER_ADDRESS}}',
|
||||
publisherurl: '{{PUBLISHER_URL}}',
|
||||
printed_url: ("{{PUBLISHER_URL}}").replace(/https?:\/{2}/, "").replace(/\/$/,""),
|
||||
supportemail: '{{SUPPORT_EMAIL}}',
|
||||
phonenum: '{{PUBLISHER_PHONE}}'
|
||||
}));
|
||||
|
||||
return this;
|
||||
|
|
|
@ -386,21 +386,21 @@
|
|||
</div>
|
||||
<div class="content-block">
|
||||
<h3>PRESENTATION EDITOR</h3>
|
||||
<h3><%= scope.textVersion %> {{PRODUCT_VERSION}}</h3>
|
||||
<h3><%= scope.textVersion %> <%= prodversion %></h3>
|
||||
</div>
|
||||
<div class="content-block">
|
||||
<h3 id="settings-about-name" class="vendor">Ascensio System SIA</h3>
|
||||
<p><label><%= scope.textAddress %>:</label><a id="settings-about-address" class="external" href="#">{{PUBLISHER_ADDRESS}}</a></p>
|
||||
<p><label><%= scope.textEmail %>:</label><a id="settings-about-email" class="external" target="_blank" href="mailto:{{SUPPORT_EMAIL}}">{{SUPPORT_EMAIL}}</a></p>
|
||||
<p><label><%= scope.textTel %>:</label><a id="settings-about-tel" class="external" target="_blank" href="tel:{{PUBLISHER_PHONE}}">{{PUBLISHER_PHONE}}</a></p>
|
||||
<p><a id="settings-about-url" class="external" target="_blank" href="{{PUBLISHER_URL}}"><% print(/^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1]); %></a></p>
|
||||
<h3 id="settings-about-name" class="vendor"><%= publishername %></h3>
|
||||
<p><label><%= scope.textAddress %>:</label><a id="settings-about-address" class="external" href="#"><%= publisheraddr %></a></p>
|
||||
<p><label><%= scope.textEmail %>:</label><a id="settings-about-email" class="external" target="_blank" href="mailto:<%= supportemail %>"><%= supportemail %></a></p>
|
||||
<p><label><%= scope.textTel %>:</label><a id="settings-about-tel" class="external" target="_blank" href="tel:<%= phonenum %>"><%= phonenum %></a></p>
|
||||
<p><a id="settings-about-url" class="external" target="_blank" href="<%= publisherurl %>"><%= printed_url %></a></p>
|
||||
<p><label id="settings-about-info" style="display: none;"></label></p>
|
||||
</div>
|
||||
<div class="content-block" id="settings-about-licensor" style="display: none;">
|
||||
<div class="content-block-inner" style="padding-top:0; padding-bottom: 1px;"></div >
|
||||
<div class="content-block-inner" style="padding-top:0; padding-bottom: 1px;"></div>
|
||||
<p><label><%= scope.textPoweredBy %></label></p>
|
||||
<h3 class="vendor">{{PUBLISHER_NAME}}</h3>
|
||||
<p><a class="external" target="_blank" href="{{PUBLISHER_URL}}"><% print(/^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1]); %></a></p>
|
||||
<h3 class="vendor"><%= publishername %></h3>
|
||||
<p><a class="external" target="_blank" href="<%= publisherurl %>"><%= printed_url %></a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -92,7 +92,14 @@ define([
|
|||
android: Common.SharedSettings.get('android'),
|
||||
phone: Common.SharedSettings.get('phone'),
|
||||
scope: this,
|
||||
width: $(window).width()
|
||||
width: $(window).width(),
|
||||
prodversion: '{{PRODUCT_VERSION}}',
|
||||
publishername: '{{PUBLISHER_NAME}}',
|
||||
publisheraddr: '{{PUBLISHER_ADDRESS}}',
|
||||
publisherurl: '{{PUBLISHER_URL}}',
|
||||
printed_url: ("{{PUBLISHER_URL}}").replace(/https?:\/{2}/, "").replace(/\/$/,""),
|
||||
supportemail: '{{SUPPORT_EMAIL}}',
|
||||
phonenum: '{{PUBLISHER_PHONE}}'
|
||||
}));
|
||||
|
||||
return this;
|
||||
|
|
|
@ -436,21 +436,21 @@
|
|||
</div>
|
||||
<div class="content-block">
|
||||
<h3>SPREADSHEET EDITOR</h3>
|
||||
<h3><%= scope.textVersion %> {{PRODUCT_VERSION}}</h3>
|
||||
<h3><%= scope.textVersion %> <%= prodversion %></h3>
|
||||
</div>
|
||||
<div class="content-block">
|
||||
<h3 id="settings-about-name" class="vendor">{{PUBLISHER_NAME}}</h3>
|
||||
<p><label><%= scope.textAddress %>:</label><a id="settings-about-address" class="external" href="#">{{PUBLISHER_ADDRESS}}</a></p>
|
||||
<p><label><%= scope.textEmail %>:</label><a id="settings-about-email" class="external" target="_blank" href="mailto:{{SUPPORT_EMAIL}}">{{SUPPORT_EMAIL}}</a></p>
|
||||
<p><label><%= scope.textTel %>:</label><a id="settings-about-tel" class="external" target="_blank" href="tel:{{PUBLISHER_PHONE}}">{{PUBLISHER_PHONE}}</a></p>
|
||||
<p><a id="settings-about-url" class="external" target="_blank" href="{{PUBLISHER_URL}}"><% print(/^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1]); %></a></p>
|
||||
<h3 id="settings-about-name" class="vendor"><%= publishername %></h3>
|
||||
<p><label><%= scope.textAddress %>:</label><a id="settings-about-address" class="external" href="#"><%= publisheraddr %></a></p>
|
||||
<p><label><%= scope.textEmail %>:</label><a id="settings-about-email" class="external" target="_blank" href="mailto:<%= supportemail %>"><%= supportemail %></a></p>
|
||||
<p><label><%= scope.textTel %>:</label><a id="settings-about-tel" class="external" target="_blank" href="tel:<%= phonenum %>"><%= phonenum %></a></p>
|
||||
<p><a id="settings-about-url" class="external" target="_blank" href="<%= publisherurl %>"><%= printed_url %></a></p>
|
||||
<p><label id="settings-about-info" style="display: none;"></label></p>
|
||||
</div>
|
||||
<div class="content-block" id="settings-about-licensor" style="display: none;">
|
||||
<div class="content-block-inner" style="padding-top:0; padding-bottom: 1px;"/>
|
||||
<div class="content-block-inner" style="padding-top:0; padding-bottom: 1px;"></div>
|
||||
<p><label><%= scope.textPoweredBy %></label></p>
|
||||
<h3 class="vendor">{{PUBLISHER_NAME}}</h3>
|
||||
<p><a class="external" target="_blank" href="{{PUBLISHER_URL}}"><% print(/^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1]); %></a></p>
|
||||
<h3 class="vendor"><%= publishername %></h3>
|
||||
<p><a class="external" target="_blank" href="<%= publisherurl %>"><%= printed_url %></a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -101,7 +101,14 @@ define([
|
|||
xltx: Asc.c_oAscFileType.XLTX,
|
||||
ots: Asc.c_oAscFileType.OTS
|
||||
},
|
||||
width : $(window).width()
|
||||
width : $(window).width(),
|
||||
prodversion: '{{PRODUCT_VERSION}}',
|
||||
publishername: '{{PUBLISHER_NAME}}',
|
||||
publisheraddr: '{{PUBLISHER_ADDRESS}}',
|
||||
publisherurl: '{{PUBLISHER_URL}}',
|
||||
printed_url: ("{{PUBLISHER_URL}}").replace(/https?:\/{2}/, "").replace(/\/$/,""),
|
||||
supportemail: '{{SUPPORT_EMAIL}}',
|
||||
phonenum: '{{PUBLISHER_PHONE}}'
|
||||
}));
|
||||
|
||||
return this;
|
||||
|
|
Loading…
Reference in a new issue