Merge pull request #231 from ONLYOFFICE/feature/bug-fix

Feature/bug fix
This commit is contained in:
Julia Radzhabova 2019-08-23 16:00:38 +03:00 committed by GitHub
commit e1bf8204b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 15 deletions

View file

@ -209,7 +209,10 @@ define([
Common.Utils.addScrollIfNeed('.page[data-page=comments-view]', '.page[data-page=comments-view] .page-content'); Common.Utils.addScrollIfNeed('.page[data-page=comments-view]', '.page[data-page=comments-view] .page-content');
} else { } else {
if(editor === 'DE' && !this.appConfig.canReview) { if(editor === 'DE' && !this.appConfig.canReview) {
$('#reviewing-settings').hide(); this.canViewReview = me.api.asc_HaveRevisionsChanges(true);
if (!this.canViewReview) {
$('#reviewing-settings').hide();
}
} }
} }
}, },
@ -282,6 +285,11 @@ define([
$('#settings-reject-all').removeClass('disabled'); $('#settings-reject-all').removeClass('disabled');
$('#settings-review').removeClass('disabled'); $('#settings-review').removeClass('disabled');
} }
if (!this.appConfig.canReview) {
$('#settings-review').hide();
$('#settings-accept-all').hide();
$('#settings-reject-all').hide();
}
}, },
onTrackChanges: function(e) { onTrackChanges: function(e) {
@ -384,6 +392,10 @@ define([
$('#btn-prev-change').addClass('disabled'); $('#btn-prev-change').addClass('disabled');
$('#btn-next-change').addClass('disabled'); $('#btn-next-change').addClass('disabled');
} }
if (!this.appConfig.canReview) {
$('#btn-accept-change').addClass('disabled');
$('#btn-reject-change').addClass('disabled');
}
}, },
onPrevChange: function() { onPrevChange: function() {

View file

@ -71,6 +71,7 @@ define([
].join(''); ].join('');
this.options.tpl = _.template(this.template)(this.options); this.options.tpl = _.template(this.template)(this.options);
this.options.formats = this.options.formats || [];
Common.UI.Window.prototype.initialize.call(this, this.options); Common.UI.Window.prototype.initialize.call(this, this.options);
}, },
@ -100,6 +101,7 @@ define([
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
this.options.formats.unshift({value: -1, displayValue: this.txtSameAs});
this.cmbNextStyle = new Common.UI.ComboBox({ this.cmbNextStyle = new Common.UI.ComboBox({
el : $('#id-dlg-style-next-par'), el : $('#id-dlg-style-next-par'),
style : 'width: 100%;', style : 'width: 100%;',
@ -109,8 +111,7 @@ define([
data : this.options.formats, data : this.options.formats,
disabled : (this.options.formats.length==0) disabled : (this.options.formats.length==0)
}); });
if (this.options.formats.length>0) this.cmbNextStyle.setValue(-1);
this.cmbNextStyle.setValue(this.options.formats[0].value);
}, },
show: function() { show: function() {
@ -128,8 +129,8 @@ define([
}, },
getNextStyle: function () { getNextStyle: function () {
var me = this; var val = this.cmbNextStyle.getValue();
return (me.options.formats.length>0) ? me.cmbNextStyle.getValue() : null; return (val!=-1) ? val : null;
}, },
onBtnClick: function(event) { onBtnClick: function(event) {
@ -161,7 +162,8 @@ define([
textHeader: 'Create New Style', textHeader: 'Create New Style',
txtEmpty: 'This field is required', txtEmpty: 'This field is required',
txtNotEmpty: 'Field must not be empty', txtNotEmpty: 'Field must not be empty',
textNextStyle: 'Next paragraph style' textNextStyle: 'Next paragraph style',
txtSameAs: 'Same as created new style'
}, DE.Views.StyleTitleDialog || {})) }, DE.Views.StyleTitleDialog || {}))

View file

@ -1873,6 +1873,7 @@
"DE.Views.StyleTitleDialog.textTitle": "Title", "DE.Views.StyleTitleDialog.textTitle": "Title",
"DE.Views.StyleTitleDialog.txtEmpty": "This field is required", "DE.Views.StyleTitleDialog.txtEmpty": "This field is required",
"DE.Views.StyleTitleDialog.txtNotEmpty": "Field must not be empty", "DE.Views.StyleTitleDialog.txtNotEmpty": "Field must not be empty",
"DE.Views.StyleTitleDialog.txtSameAs": "Same as created new style",
"DE.Views.TableFormulaDialog.cancelButtonText": "Cancel", "DE.Views.TableFormulaDialog.cancelButtonText": "Cancel",
"DE.Views.TableFormulaDialog.okButtonText": "OK", "DE.Views.TableFormulaDialog.okButtonText": "OK",
"DE.Views.TableFormulaDialog.textBookmark": "Paste Bookmark", "DE.Views.TableFormulaDialog.textBookmark": "Paste Bookmark",

View file

@ -1873,6 +1873,7 @@
"DE.Views.StyleTitleDialog.textTitle": "Название", "DE.Views.StyleTitleDialog.textTitle": "Название",
"DE.Views.StyleTitleDialog.txtEmpty": "Это поле необходимо заполнить", "DE.Views.StyleTitleDialog.txtEmpty": "Это поле необходимо заполнить",
"DE.Views.StyleTitleDialog.txtNotEmpty": "Поле не может быть пустым", "DE.Views.StyleTitleDialog.txtNotEmpty": "Поле не может быть пустым",
"DE.Views.StyleTitleDialog.txtSameAs": "Такой же, как создаваемый стиль",
"DE.Views.TableFormulaDialog.cancelButtonText": "Отмена", "DE.Views.TableFormulaDialog.cancelButtonText": "Отмена",
"DE.Views.TableFormulaDialog.okButtonText": "ОК", "DE.Views.TableFormulaDialog.okButtonText": "ОК",
"DE.Views.TableFormulaDialog.textBookmark": "Вставить закладку", "DE.Views.TableFormulaDialog.textBookmark": "Вставить закладку",

View file

@ -557,10 +557,10 @@ define([
if (url.charAt(url.length-1) !== '/') { if (url.charAt(url.length-1) !== '/') {
url += '/'; url += '/';
} }
if (Common.SharedSettings.get('android')) { if (Common.SharedSettings.get('sailfish')) {
url+='mobile-applications/documents/android/index.aspx';
} else if (Common.SharedSettings.get('sailfish')) {
url+='mobile-applications/documents/sailfish/index.aspx'; url+='mobile-applications/documents/sailfish/index.aspx';
} else if (Common.SharedSettings.get('android')) {
url+='mobile-applications/documents/android/index.aspx';
} else { } else {
url+='mobile-applications/documents/index.aspx'; url+='mobile-applications/documents/index.aspx';
} }

View file

@ -184,10 +184,10 @@ define([
if (url.charAt(url.length-1) !== '/') { if (url.charAt(url.length-1) !== '/') {
url += '/'; url += '/';
} }
if (Common.SharedSettings.get('android')) { if (Common.SharedSettings.get('sailfish')) {
url+='mobile-applications/documents/android/index.aspx';
} else if (Common.SharedSettings.get('sailfish')) {
url+='mobile-applications/documents/sailfish/index.aspx'; url+='mobile-applications/documents/sailfish/index.aspx';
} else if (Common.SharedSettings.get('android')) {
url+='mobile-applications/documents/android/index.aspx';
} else { } else {
url+='mobile-applications/documents/index.aspx'; url+='mobile-applications/documents/index.aspx';
} }

View file

@ -116,10 +116,10 @@ define([
if (url.charAt(url.length-1) !== '/') { if (url.charAt(url.length-1) !== '/') {
url += '/'; url += '/';
} }
if (Common.SharedSettings.get('android')) { if (Common.SharedSettings.get('sailfish')) {
url+='mobile-applications/documents/android/index.aspx';
} else if (Common.SharedSettings.get('sailfish')) {
url+='mobile-applications/documents/sailfish/index.aspx'; url+='mobile-applications/documents/sailfish/index.aspx';
} else if (Common.SharedSettings.get('android')) {
url+='mobile-applications/documents/android/index.aspx';
} else { } else {
url+='mobile-applications/documents/index.aspx'; url+='mobile-applications/documents/index.aspx';
} }