[DE] Change watermark button

This commit is contained in:
Julia Radzhabova 2019-06-18 12:35:01 +03:00
parent 23c85be00e
commit 1fcc5190e5
3 changed files with 8 additions and 15 deletions

View file

@ -1906,9 +1906,10 @@ define([
onWatermarkSelect: function(menu, item) {
if (this.api) {
if (item.value == 'add') {
if (item.value == 'remove')
this.api.asc_WatermarkRemove();
else {
var me = this;
if (_.isUndefined(me.fontstore)) {
me.fontstore = new Common.Collections.Fonts();
var fonts = me.toolbar.cmbFontName.store.toJSON();
@ -1932,9 +1933,7 @@ define([
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
})).show();
} else if (item.value == 'remove')
this.api.asc_WatermarkRemove();
}
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Edit ' + item.value);
}

View file

@ -1024,13 +1024,9 @@ define([
cls: 'ppm-toolbar',
items: [
{
caption: this.textAddWatermark,
value: 'add'
caption: this.textEditWatermark,
value: 'edit'
},
// {
// caption: this.textEditWatermark,
// value: 'add'
// },
{
caption: this.textRemWatermark,
value: 'remove'
@ -2461,10 +2457,9 @@ define([
txtMarginAlign: 'Align to Margin',
txtObjectsAlign: 'Align Selected Objects',
capBtnWatermark: 'Watermark',
textAddWatermark: 'Add Watermark',
textEditWatermark: 'Edit Watermark',
textEditWatermark: 'Settings',
textRemWatermark: 'Remove Watermark',
tipWatermark: 'Insert watermark'
tipWatermark: 'Edit watermark'
}
})(), DE.Views.Toolbar || {}));
});

View file

@ -336,7 +336,6 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
})
});
this.btnTextColor.render($('#watermark-textcolor'));
// this.btnTextColor.on('click', _.bind(this.onTextColor, this));
this.mnuTextColorPicker = initNewColor(this.btnTextColor, "#watermark-menu-textcolor");
$('#watermark-auto-color').on('click', _.bind(this.onAutoColor, this));
this.textControls.push(this.btnTextColor);