',
'',
'',
@@ -122,6 +137,7 @@ define([
this.handler = options.handler;
this.props = options.props;
+ this.api = options.api;
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
},
@@ -180,6 +196,11 @@ define([
this.btnColor.setColor('000000');
this.btnColor.menu.items[1].on('click', _.bind(this.addNewColor, this, this.colors, this.btnColor));
+ this.btnApplyAll = new Common.UI.Button({
+ el: $('#control-settings-btn-all')
+ });
+ this.btnApplyAll.on('click', _.bind(this.applyAllClick, this));
+
this.chLockDelete = new Common.UI.CheckBox({
el: $('#control-settings-chb-lock-delete'),
labelText: this.txtLockDelete
@@ -273,6 +294,16 @@ define([
return true;
},
+ applyAllClick: function(btn, eOpts){
+ if (this.api) {
+ var props = new AscCommon.CContentControlPr();
+ props.put_Appearance(this.cmbShow.getValue());
+ var color = Common.Utils.ThemeColor.getRgbColor(this.colors.getColor());
+ props.put_Color(color.get_r(), color.get_g(), color.get_b());
+ this.api.asc_SetContentControlProperties(props, null, true);
+ }
+ },
+
textTitle: 'Content Control Settings',
textName: 'Title',
textTag: 'Tag',
@@ -285,7 +316,8 @@ define([
textColor: 'Color',
textBox: 'Bounding box',
textNone: 'None',
- textNewColor: 'Add New Custom Color'
+ textNewColor: 'Add New Custom Color',
+ textApplyAll: 'Apply to All'
}, DE.Views.ControlSettingsDialog || {}))
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js
index 83899bc05..064d0b02f 100644
--- a/apps/documenteditor/main/app/view/DocumentHolder.js
+++ b/apps/documenteditor/main/app/view/DocumentHolder.js
@@ -1877,6 +1877,7 @@ define([
if (item.value == 'settings') {
(new DE.Views.ControlSettingsDialog({
props: props,
+ api: me.api,
handler: function (result, value) {
if (result == 'ok') {
me.api.asc_SetContentControlProperties(value, props.get_InternalId());
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index 9c9b50a4a..6dc7f5d0f 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -855,6 +855,7 @@
"DE.Views.ControlSettingsDialog.textTitle": "Content Control Settings",
"DE.Views.ControlSettingsDialog.txtLockDelete": "Content control cannot be deleted",
"DE.Views.ControlSettingsDialog.txtLockEdit": "Contents cannot be edited",
+ "DE.Views.ControlSettingsDialog.textApplyAll": "Apply to All",
"DE.Views.CustomColumnsDialog.cancelButtonText": "Cancel",
"DE.Views.CustomColumnsDialog.okButtonText": "Ok",
"DE.Views.CustomColumnsDialog.textColumns": "Number of columns",
|