[DE] Added parameter showReviewChanges to config: open review changes dialog, when showReviewChanges is true (but do not track review changes).
This commit is contained in:
parent
2da9bef66c
commit
c79eb90e08
|
@ -115,7 +115,8 @@
|
||||||
statusBar: true,
|
statusBar: true,
|
||||||
autosave: true,
|
autosave: true,
|
||||||
forcesave: false,
|
forcesave: false,
|
||||||
commentAuthorOnly: false
|
commentAuthorOnly: false,
|
||||||
|
showReviewChanges: false
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
autoStartGuid: 'asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}',
|
autoStartGuid: 'asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}',
|
||||||
|
|
|
@ -76,6 +76,11 @@ define([
|
||||||
'reviewchange:delete': _.bind(this.onDeleteClick, this),
|
'reviewchange:delete': _.bind(this.onDeleteClick, this),
|
||||||
'reviewchange:preview': _.bind(this.onBtnPreviewClick, this),
|
'reviewchange:preview': _.bind(this.onBtnPreviewClick, this),
|
||||||
'lang:document': _.bind(this.onDocLanguage, this)
|
'lang:document': _.bind(this.onDocLanguage, this)
|
||||||
|
},
|
||||||
|
'Common.Views.ReviewChangesDialog': {
|
||||||
|
'reviewchange:accept': _.bind(this.onAcceptClick, this),
|
||||||
|
'reviewchange:reject': _.bind(this.onRejectClick, this),
|
||||||
|
'reviewchange:preview': _.bind(this.onBtnPreviewClick, this)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -144,6 +149,10 @@ define([
|
||||||
if (!this.appConfig.isReviewOnly && this._state.lock !== lock) {
|
if (!this.appConfig.isReviewOnly && this._state.lock !== lock) {
|
||||||
this.view.btnAccept.setDisabled(lock==true);
|
this.view.btnAccept.setDisabled(lock==true);
|
||||||
this.view.btnReject.setDisabled(lock==true);
|
this.view.btnReject.setDisabled(lock==true);
|
||||||
|
if (this.dlgChanges) {
|
||||||
|
this.dlgChanges.btnAccept.setDisabled(lock==true);
|
||||||
|
this.dlgChanges.btnReject.setDisabled(lock==true);
|
||||||
|
}
|
||||||
this._state.lock = lock;
|
this._state.lock = lock;
|
||||||
}
|
}
|
||||||
this._state.posx = posX;
|
this._state.posx = posX;
|
||||||
|
@ -517,6 +526,16 @@ define([
|
||||||
|
|
||||||
if ( Common.localStorage.getBool("de-settings-spellcheck") )
|
if ( Common.localStorage.getBool("de-settings-spellcheck") )
|
||||||
me.view.turnSpelling(true);
|
me.view.turnSpelling(true);
|
||||||
|
|
||||||
|
if ( typeof (me.appConfig.customization) == 'object' && (me.appConfig.customization.showReviewChanges==true) ) {
|
||||||
|
me.dlgChanges = (new Common.Views.ReviewChangesDialog({
|
||||||
|
popoverChanges : me.popoverChanges,
|
||||||
|
mode : me.appConfig
|
||||||
|
}));
|
||||||
|
var sdk = $('#editor_sdk'),
|
||||||
|
offset = sdk.offset();
|
||||||
|
me.dlgChanges.show(Math.max(10, offset.left + sdk.width() - 300), Math.max(10, offset.top + sdk.height() - 150));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -725,5 +725,134 @@ define([
|
||||||
tipSetSpelling: 'Spell checking',
|
tipSetSpelling: 'Spell checking',
|
||||||
tipReview: 'Review'
|
tipReview: 'Review'
|
||||||
}
|
}
|
||||||
}()), Common.Views.ReviewChanges || {}))
|
}()), Common.Views.ReviewChanges || {}));
|
||||||
|
|
||||||
|
Common.Views.ReviewChangesDialog = Common.UI.Window.extend(_.extend({
|
||||||
|
options: {
|
||||||
|
width : 283,
|
||||||
|
height : 90,
|
||||||
|
title : 'Review Changes',
|
||||||
|
modal : false,
|
||||||
|
cls : 'review-changes modal-dlg',
|
||||||
|
alias : 'Common.Views.ReviewChangesDialog'
|
||||||
|
},
|
||||||
|
|
||||||
|
initialize : function(options) {
|
||||||
|
_.extend(this.options, options || {});
|
||||||
|
|
||||||
|
this.template = [
|
||||||
|
'<div class="box">',
|
||||||
|
'<div class="input-row">',
|
||||||
|
'<div id="id-review-button-prev" style=""></div>',
|
||||||
|
'<div id="id-review-button-next" style=""></div>',
|
||||||
|
'<div id="id-review-button-accept" style=""></div>',
|
||||||
|
'<div id="id-review-button-reject" style="margin-right: 0;"></div>',
|
||||||
|
'</div>',
|
||||||
|
'</div>'
|
||||||
|
].join('');
|
||||||
|
|
||||||
|
this.options.tpl = _.template(this.template)(this.options);
|
||||||
|
this.popoverChanges = this.options.popoverChanges;
|
||||||
|
this.mode = this.options.mode;
|
||||||
|
|
||||||
|
Common.UI.Window.prototype.initialize.call(this, this.options);
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function() {
|
||||||
|
Common.UI.Window.prototype.render.call(this);
|
||||||
|
|
||||||
|
this.btnPrev = new Common.UI.Button({
|
||||||
|
cls: 'dlg-btn iconic',
|
||||||
|
iconCls: 'img-commonctrl prev',
|
||||||
|
hint: this.txtPrev,
|
||||||
|
hintAnchor: 'top'
|
||||||
|
});
|
||||||
|
this.btnPrev.render( this.$window.find('#id-review-button-prev'));
|
||||||
|
|
||||||
|
this.btnNext = new Common.UI.Button({
|
||||||
|
cls: ' dlg-btn iconic',
|
||||||
|
iconCls: 'img-commonctrl next',
|
||||||
|
hint: this.txtNext,
|
||||||
|
hintAnchor: 'top'
|
||||||
|
});
|
||||||
|
this.btnNext.render( this.$window.find('#id-review-button-next'));
|
||||||
|
|
||||||
|
this.btnAccept = new Common.UI.Button({
|
||||||
|
cls : 'btn-toolbar',
|
||||||
|
caption : this.txtAccept,
|
||||||
|
split : true,
|
||||||
|
disabled : this.mode.isReviewOnly,
|
||||||
|
menu : new Common.UI.Menu({
|
||||||
|
items: [
|
||||||
|
this.mnuAcceptCurrent = new Common.UI.MenuItem({
|
||||||
|
caption: this.txtAcceptCurrent,
|
||||||
|
value: 'current'
|
||||||
|
}),
|
||||||
|
this.mnuAcceptAll = new Common.UI.MenuItem({
|
||||||
|
caption: this.txtAcceptAll,
|
||||||
|
value: 'all'
|
||||||
|
})
|
||||||
|
]
|
||||||
|
})
|
||||||
|
});
|
||||||
|
this.btnAccept.render(this.$window.find('#id-review-button-accept'));
|
||||||
|
|
||||||
|
this.btnReject = new Common.UI.Button({
|
||||||
|
cls : 'btn-toolbar',
|
||||||
|
caption : this.txtReject,
|
||||||
|
split : true,
|
||||||
|
disabled : this.mode.isReviewOnly,
|
||||||
|
menu : new Common.UI.Menu({
|
||||||
|
items: [
|
||||||
|
this.mnuRejectCurrent = new Common.UI.MenuItem({
|
||||||
|
caption: this.txtRejectCurrent,
|
||||||
|
value: 'current'
|
||||||
|
}),
|
||||||
|
this.mnuRejectAll = new Common.UI.MenuItem({
|
||||||
|
caption: this.txtRejectAll,
|
||||||
|
value: 'all'
|
||||||
|
})
|
||||||
|
]
|
||||||
|
})
|
||||||
|
});
|
||||||
|
this.btnReject.render(this.$window.find('#id-review-button-reject'));
|
||||||
|
|
||||||
|
var me = this;
|
||||||
|
this.btnPrev.on('click', function (e) {
|
||||||
|
me.fireEvent('reviewchange:preview', [me.btnPrev, 'prev']);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.btnNext.on('click', function (e) {
|
||||||
|
me.fireEvent('reviewchange:preview', [me.btnNext, 'next']);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.btnAccept.on('click', function (e) {
|
||||||
|
me.fireEvent('reviewchange:accept', [me.btnAccept, 'current']);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.btnAccept.menu.on('item:click', function (menu, item, e) {
|
||||||
|
me.fireEvent('reviewchange:accept', [menu, item]);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.btnReject.on('click', function (e) {
|
||||||
|
me.fireEvent('reviewchange:reject', [me.btnReject, 'current']);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.btnReject.menu.on('item:click', function (menu, item, e) {
|
||||||
|
me.fireEvent('reviewchange:reject', [menu, item]);
|
||||||
|
});
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
textTitle: 'Review Changes',
|
||||||
|
txtPrev: 'To previous change',
|
||||||
|
txtNext: 'To next change',
|
||||||
|
txtAccept: 'Accept',
|
||||||
|
txtAcceptCurrent: 'Accept Current Change',
|
||||||
|
txtAcceptAll: 'Accept All Changes',
|
||||||
|
txtReject: 'Reject',
|
||||||
|
txtRejectCurrent: 'Reject Current Change',
|
||||||
|
txtRejectAll: 'Reject All Changes'
|
||||||
|
}, Common.Views.ReviewChangesDialog || {}));
|
||||||
});
|
});
|
|
@ -1,43 +1,38 @@
|
||||||
.review-changes {
|
.review-changes {
|
||||||
//position: absolute;
|
|
||||||
//bottom: -1px;
|
|
||||||
//right: 55px;
|
|
||||||
//background: @gray-light;
|
|
||||||
//border: 1px solid @gray-dark;
|
|
||||||
//height: 35px;
|
|
||||||
//z-index: @zindex-dropdown - 1;
|
|
||||||
//
|
|
||||||
//.review-group {
|
|
||||||
// display: inline-block;
|
|
||||||
// vertical-align: middle;
|
|
||||||
// padding: 6px 0px 6px 10px;
|
|
||||||
//
|
|
||||||
// & > div, & > label {
|
|
||||||
// margin-right: 10px;
|
|
||||||
// display: inline-block;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//#id-review-label-total {
|
|
||||||
// font: bold 10px Helvetica, Arial, Verdana, sans-serif;
|
|
||||||
// color: @gray-darker;
|
|
||||||
// text-shadow: none;
|
|
||||||
// white-space: nowrap;
|
|
||||||
// cursor: pointer;
|
|
||||||
// vertical-align: middle;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//#id-review-button-accept,
|
|
||||||
//#id-review-button-reject {
|
|
||||||
// span.caption {
|
|
||||||
// vertical-align: middle;
|
|
||||||
// font-size: 12px;
|
|
||||||
// margin: 0 6px;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//.separator {
|
.input-row > div {
|
||||||
// margin: 0 !important;
|
margin-right: 10px;
|
||||||
// height: 19px;
|
|
||||||
//}
|
button {
|
||||||
|
height: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#id-review-button-accept,
|
||||||
|
#id-review-button-reject {
|
||||||
|
span.caption {
|
||||||
|
vertical-align: middle;
|
||||||
|
font-size: 12px;
|
||||||
|
margin: 0 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconic {
|
||||||
|
width: 45px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prev, .next {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prev {
|
||||||
|
background-position: @search-dlg-offset-x @search-dlg-offset-y;
|
||||||
|
}
|
||||||
|
|
||||||
|
.next {
|
||||||
|
background-position: @search-dlg-offset-x @search-dlg-offset-y - 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,6 +204,15 @@
|
||||||
"Common.Views.ReviewChanges.tipReview": "Review",
|
"Common.Views.ReviewChanges.tipReview": "Review",
|
||||||
"Common.Views.ReviewChanges.tipSetDocLang": "Set Document Language",
|
"Common.Views.ReviewChanges.tipSetDocLang": "Set Document Language",
|
||||||
"Common.Views.ReviewChanges.tipSetSpelling": "Spell checking",
|
"Common.Views.ReviewChanges.tipSetSpelling": "Spell checking",
|
||||||
|
"Common.Views.ReviewChangesDialog.textTitle": "Review Changes",
|
||||||
|
"Common.Views.ReviewChangesDialog.txtAccept": "Accept",
|
||||||
|
"Common.Views.ReviewChangesDialog.txtAcceptAll": "Accept All Changes",
|
||||||
|
"Common.Views.ReviewChangesDialog.txtAcceptCurrent": "Accept Current Change",
|
||||||
|
"Common.Views.ReviewChangesDialog.txtNext": "To Next Change",
|
||||||
|
"Common.Views.ReviewChangesDialog.txtPrev": "To Previous Change",
|
||||||
|
"Common.Views.ReviewChangesDialog.txtReject": "Reject",
|
||||||
|
"Common.Views.ReviewChangesDialog.txtRejectAll": "Reject All Changes",
|
||||||
|
"Common.Views.ReviewChangesDialog.txtRejectCurrent": "Reject Current Change",
|
||||||
"DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.<br> Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",
|
"DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.<br> Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",
|
||||||
"DE.Controllers.LeftMenu.newDocumentTitle": "Unnamed document",
|
"DE.Controllers.LeftMenu.newDocumentTitle": "Unnamed document",
|
||||||
"DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning",
|
"DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning",
|
||||||
|
|
Loading…
Reference in a new issue