[DE] Remove spellcheck and document language buttons from the toolbar collaboration tab.
This commit is contained in:
parent
25403d1c55
commit
7d1a4e14c9
|
@ -132,7 +132,7 @@ define([
|
|||
SetDisabled: function(state) {
|
||||
if (this.dlgChanges)
|
||||
this.dlgChanges.close();
|
||||
this.view && this.view.SetDisabled(state);
|
||||
this.view && this.view.SetDisabled(state, this.langs);
|
||||
},
|
||||
|
||||
onApiShowChange: function (sdkchange) {
|
||||
|
@ -561,6 +561,12 @@ define([
|
|||
|
||||
if (this.view) {
|
||||
this.view.$el.find('.no-group-mask').css('opacity', 1);
|
||||
|
||||
this.view.btnsDocLang && this.view.btnsDocLang.forEach(function(button) {
|
||||
if ( button ) {
|
||||
button.setDisabled(disable || this.langs.length<1);
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -625,7 +631,11 @@ define([
|
|||
|
||||
setLanguages: function (array) {
|
||||
this.langs = array;
|
||||
this.view.btnDocLang.setDisabled(this.langs.length<1);
|
||||
this.view && this.view.btnsDocLang && this.view.btnsDocLang.forEach(function(button) {
|
||||
if ( button ) {
|
||||
button.setDisabled(this.langs.length<1);
|
||||
}
|
||||
}, this);
|
||||
},
|
||||
|
||||
onDocLanguage: function() {
|
||||
|
|
|
@ -412,14 +412,7 @@ define([
|
|||
Common.Views.ReviewChanges = Common.UI.BaseView.extend(_.extend((function(){
|
||||
var template =
|
||||
'<section id="review-changes-panel" class="panel" data-tab="review">' +
|
||||
'<div class="group">' +
|
||||
'<span id="slot-set-lang" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
'<div class="group no-group-mask" style="padding-left: 0;">' +
|
||||
'<span id="slot-btn-spelling" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
'<div class="separator long"/>' +
|
||||
'<div class="group">' +
|
||||
'<div class="group no-group-mask">' +
|
||||
'<span id="slot-btn-sharing" class="btn-slot text x-huge"></span>' +
|
||||
'<span id="slot-btn-coauthmode" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
|
@ -434,8 +427,7 @@ define([
|
|||
'<div class="group no-group-mask" style="padding-left: 0;">' +
|
||||
'<span id="btn-review-view" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
'<div class="separator long review"/>' +
|
||||
'<div class="group move-changes">' +
|
||||
'<div class="group move-changes" style="padding-left: 0;">' +
|
||||
'<span id="btn-change-prev" class="btn-slot text x-huge"></span>' +
|
||||
'<span id="btn-change-next" class="btn-slot text x-huge"></span>' +
|
||||
'<span id="btn-change-accept" class="btn-slot text x-huge"></span>' +
|
||||
|
@ -494,8 +486,10 @@ define([
|
|||
});
|
||||
});
|
||||
|
||||
this.btnDocLang.on('click', function (btn, e) {
|
||||
me.fireEvent('lang:document', this);
|
||||
this.btnsDocLang.forEach(function(button) {
|
||||
button.on('click', function (b, e) {
|
||||
me.fireEvent('lang:document', this);
|
||||
});
|
||||
});
|
||||
|
||||
this.btnSharing && this.btnSharing.on('click', function (btn, e) {
|
||||
|
@ -579,20 +573,8 @@ define([
|
|||
});
|
||||
}
|
||||
|
||||
this.btnSetSpelling = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'btn-ic-docspell',
|
||||
caption: this.txtSpelling,
|
||||
enableToggle: true
|
||||
});
|
||||
this.btnsSpelling = [this.btnSetSpelling];
|
||||
|
||||
this.btnDocLang = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'btn-ic-doclang',
|
||||
caption: this.txtDocLang,
|
||||
disabled: true
|
||||
});
|
||||
this.btnsSpelling = [];
|
||||
this.btnsDocLang = [];
|
||||
|
||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||
},
|
||||
|
@ -689,9 +671,6 @@ define([
|
|||
.next('.group').hide();
|
||||
}
|
||||
|
||||
me.btnDocLang.updateHint(me.tipSetDocLang);
|
||||
me.btnSetSpelling.updateHint(me.tipSetSpelling);
|
||||
|
||||
me.btnSharing && me.btnSharing.updateHint(me.tipSharing);
|
||||
|
||||
if (me.btnCoAuthMode) {
|
||||
|
@ -741,9 +720,6 @@ define([
|
|||
this.btnReviewView.render(this.$el.find('#btn-review-view'));
|
||||
}
|
||||
|
||||
this.btnSetSpelling.render(this.$el.find('#slot-btn-spelling'));
|
||||
this.btnDocLang.render(this.$el.find('#slot-set-lang'));
|
||||
|
||||
this.btnSharing && this.btnSharing.render(this.$el.find('#slot-btn-sharing'));
|
||||
this.btnCoAuthMode && this.btnCoAuthMode.render(this.$el.find('#slot-btn-coauthmode'));
|
||||
|
||||
|
@ -791,6 +767,17 @@ define([
|
|||
});
|
||||
this.btnsSpelling.push(button);
|
||||
|
||||
return button;
|
||||
} else if (type == 'doclang' && parent == 'statusbar' ) {
|
||||
button = new Common.UI.Button({
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'btn-ic-doclang',
|
||||
hintAnchor : 'top',
|
||||
hint: this.tipSetDocLang,
|
||||
disabled: true
|
||||
});
|
||||
this.btnsDocLang.push(button);
|
||||
|
||||
return button;
|
||||
}
|
||||
},
|
||||
|
@ -831,12 +818,17 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
SetDisabled: function (state) {
|
||||
SetDisabled: function (state, langs) {
|
||||
this.btnsSpelling && this.btnsSpelling.forEach(function(button) {
|
||||
if ( button ) {
|
||||
button.setDisabled(state);
|
||||
}
|
||||
}, this);
|
||||
this.btnsDocLang && this.btnsDocLang.forEach(function(button) {
|
||||
if ( button ) {
|
||||
button.setDisabled(state || langs && langs.length<1);
|
||||
}
|
||||
}, this);
|
||||
this.btnsTurnReview && this.btnsTurnReview.forEach(function(button) {
|
||||
if ( button ) {
|
||||
button.setDisabled(state);
|
||||
|
|
|
@ -99,6 +99,8 @@ define([
|
|||
|
||||
me.btnSpelling = review.getButton('spelling', 'statusbar');
|
||||
me.btnSpelling.render( me.statusbar.$layout.find('#btn-doc-spell') );
|
||||
me.btnDocLang = review.getButton('doclang', 'statusbar');
|
||||
me.btnDocLang.render( me.statusbar.$layout.find('#btn-doc-lang') );
|
||||
} else {
|
||||
me.statusbar.$el.find('.el-edit, .el-review').hide();
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<div class="caret up img-commonctrl" />
|
||||
</div>
|
||||
</div>
|
||||
<span id="btn-doc-lang" class="el-edit"></span>
|
||||
<span id="btn-doc-spell" class="el-edit"></span>
|
||||
<div class="separator short el-edit"></div>
|
||||
<div id="btn-doc-review" class="el-edit el-review" style="display: inline-block;"></div>
|
||||
|
|
|
@ -327,7 +327,7 @@
|
|||
//.button-normal-icon(btn-text, 46, @toolbar-icon-size);
|
||||
//.button-normal-icon(btn-insertequation, 53, @toolbar-icon-size);
|
||||
//.button-normal-icon(btn-dropcap, 50, @toolbar-icon-size);
|
||||
//.button-normal-icon(btn-ic-doclang, 67, @toolbar-icon-size);
|
||||
.button-normal-icon(btn-ic-doclang, 67, @toolbar-icon-size);
|
||||
//.button-normal-icon(btn-notes, 78, @toolbar-icon-size);
|
||||
//.button-normal-icon(review-prev, 79, @toolbar-icon-size);
|
||||
//.button-normal-icon(review-next, 80, @toolbar-icon-size);
|
||||
|
|
Loading…
Reference in a new issue