' +
'<% var me = this; %>' +
'<% $(colors).each(function(num, item) { %>' +
'<% if (me.isBlankSeparator(item)) { %>
' +
diff --git a/apps/documenteditor/main/app/controller/FormsTab.js b/apps/documenteditor/main/app/controller/FormsTab.js
index 8869661fd..28e15d94d 100644
--- a/apps/documenteditor/main/app/controller/FormsTab.js
+++ b/apps/documenteditor/main/app/controller/FormsTab.js
@@ -69,7 +69,6 @@ define([
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
this.api.asc_registerCallback('asc_onChangeSpecialFormsGlobalSettings', _.bind(this.onChangeSpecialFormsGlobalSettings, this));
- this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
// this.api.asc_registerCallback('asc_onShowContentControlsActions',_.bind(this.onShowContentControlsActions, this));
@@ -90,7 +89,6 @@ define([
'forms:clear': this.onClearClick,
'forms:no-color': this.onNoControlsColor,
'forms:select-color': this.onSelectControlsColor,
- 'forms:open-color': this.onColorsShow,
'forms:mode': this.onModeClick
}
});
@@ -145,36 +143,6 @@ define([
}
},
- onSendThemeColors: function() {
- this._needUpdateColors = true;
- },
-
- updateThemeColors: function() {
- var updateColors = function(picker, defaultColorIndex) {
- if (picker) {
- var clr;
-
- var effectcolors = Common.Utils.ThemeColor.getEffectColors();
- for (var i = 0; i < effectcolors.length; i++) {
- if (typeof(picker.currentColor) == 'object' &&
- clr === undefined &&
- picker.currentColor.effectId == effectcolors[i].effectId)
- clr = effectcolors[i];
- }
-
- picker.updateColors(effectcolors, Common.Utils.ThemeColor.getStandartColors());
- if (picker.currentColor === undefined) {
- picker.currentColor = effectcolors[defaultColorIndex];
- } else if ( clr!==undefined ) {
- picker.currentColor = clr;
- }
- }
- };
-
- this.view && this.view.mnuFormsColorPicker && updateColors(this.view.mnuFormsColorPicker, 1);
- this.onChangeSpecialFormsGlobalSettings();
- },
-
onChangeSpecialFormsGlobalSettings: function() {
if (this.view && this.view.mnuFormsColorPicker) {
var clr = this.api.asc_GetSpecialFormsHighlightColor(),
@@ -190,11 +158,6 @@ define([
}
},
- onColorsShow: function(menu) {
- this._needUpdateColors && this.updateThemeColors();
- this._needUpdateColors = false;
- },
-
onControlsSelect: function(type) {
if (!(this.toolbar.mode && this.toolbar.mode.canFeatureContentControl)) return;
diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js
index 1207e25d3..1993b7c48 100644
--- a/apps/documenteditor/main/app/controller/RightMenu.js
+++ b/apps/documenteditor/main/app/controller/RightMenu.js
@@ -321,7 +321,6 @@ define([
this.rightmenu.tableSettings.UpdateThemeColors();
this.rightmenu.shapeSettings.UpdateThemeColors();
this.rightmenu.textartSettings.UpdateThemeColors();
- this.rightmenu.formSettings && this.rightmenu.formSettings.UpdateThemeColors();
},
updateMetricUnit: function() {
diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index fa9a5baa5..dda1210ca 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -2861,9 +2861,6 @@ define([
this.onParagraphColor(this._state.clrshd_asccolor);
}
this._state.clrshd_asccolor = undefined;
-
- updateColors(this.toolbar.mnuControlsColorPicker, 1);
- this.onChangeSdtGlobalSettings();
},
_onInitEditorStyles: function(styles) {
diff --git a/apps/documenteditor/main/app/view/ControlSettingsDialog.js b/apps/documenteditor/main/app/view/ControlSettingsDialog.js
index 863793b91..db0d6c3f2 100644
--- a/apps/documenteditor/main/app/view/ControlSettingsDialog.js
+++ b/apps/documenteditor/main/app/view/ControlSettingsDialog.js
@@ -137,7 +137,13 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
},
{caption: '--'}],
additionalAlign: this.menuAddAlign,
- color: '000000'
+ color: '000000',
+ colors: ['000000', '993300', '333300', '003300', '003366', '000080', '333399', '333333', '800000', 'FF6600',
+ '808000', '00FF00', '008080', '0000FF', '666699', '808080', 'FF0000', 'FF9900', '99CC00', '339966',
+ '33CCCC', '3366FF', '800080', '999999', 'FF00FF', 'FFCC00', 'FFFF00', '00FF00', '00FFFF', '00CCFF',
+ '993366', 'C0C0C0', 'FF99CC', 'FFCC99', 'FFFF99', 'CCFFCC', 'CCFFFF', '99CCFF', 'CC99FF', 'FFFFFF'
+ ],
+ paletteHeight: 94
});
this.btnColor.on('color:select', _.bind(this.onColorsSelect, this));
this.colors = this.btnColor.getPicker();
@@ -381,10 +387,6 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
this.isSystemColor = false;
},
- updateThemeColors: function() {
- this.colors.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
- },
-
onSystemColor: function(e) {
var color = Common.Utils.ThemeColor.getHexColor(220, 220, 220);
this.btnColor.setColor(color);
@@ -395,7 +397,6 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
},
afterRender: function() {
- this.updateThemeColors();
this.updateMetricUnit();
this._setDefaults(this.props);
if (this.storageName) {
diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js
index e540bda36..767d0fbc8 100644
--- a/apps/documenteditor/main/app/view/FormSettings.js
+++ b/apps/documenteditor/main/app/view/FormSettings.js
@@ -533,7 +533,7 @@ define([
onColorPickerSelect: function(btn, color) {
this.BorderColor = color;
- this._state.BorderColor = this.BorderColor;
+ this._state.BorderColor = undefined;
if (this.api && !this._noApply) {
var props = this._originalProps || new AscCommon.CContentControlPr();
@@ -554,6 +554,20 @@ define([
}
},
+ onNoBorderClick: function(item) {
+ this.BorderColor = 'transparent';
+ this._state.BorderColor = undefined;
+
+ if (this.api && !this._noApply) {
+ var props = this._originalProps || new AscCommon.CContentControlPr();
+ var formTextPr = this._originalTextFormProps || new AscCommon.CSdtTextFormPr();
+ formTextPr.put_CombBorder();
+ props.put_TextFormPr(formTextPr);
+ this.api.asc_SetContentControlProperties(props, this.internalId);
+ this.fireEvent('editcomplete', this);
+ }
+ },
+
ChangeSettings: function(props) {
if (this._initSettings)
this.createDelayedElements();
@@ -721,7 +735,8 @@ define([
this.btnColor.setColor(this.BorderColor);
this.mnuColorPicker.clearSelection();
- this.mnuColorPicker.selectByRGB(typeof(this.BorderColor) == 'object' ? this.BorderColor.color : this.BorderColor,true);
+ this.mnuNoBorder.setChecked(this.BorderColor == 'transparent', true);
+ (this.BorderColor != 'transparent') && this.mnuColorPicker.selectByRGB(typeof(this.BorderColor) == 'object' ? this.BorderColor.color : this.BorderColor,true);
this._state.BorderColor = this.BorderColor;
}
}
@@ -754,18 +769,27 @@ define([
if (!this.btnColor) {
this.btnColor = new Common.UI.ColorButton({
parentEl: (this.$el || $(this.el)).findById('#form-color-btn'),
- transparent: true,
- menu : true
+ additionalItems: [
+ this.mnuNoBorder = new Common.UI.MenuItem({
+ style: 'padding-left:20px;',
+ caption: this.textNoBorder,
+ toggleGroup: 'form-settings-no-border',
+ checkable: true
+ }), {caption: '--'}],
+ menu : true,
+ colors: ['000000', '993300', '333300', '003300', '003366', '000080', '333399', '333333', '800000', 'FF6600',
+ '808000', '00FF00', '008080', '0000FF', '666699', '808080', 'FF0000', 'FF9900', '99CC00', '339966',
+ '33CCCC', '3366FF', '800080', '999999', 'FF00FF', 'FFCC00', 'FFFF00', '00FF00', '00FFFF', '00CCFF',
+ '993366', 'C0C0C0', 'FF99CC', 'FFCC99', 'FFFF99', 'CCFFCC', 'CCFFFF', '99CCFF', 'CC99FF', 'FFFFFF'
+ ],
+ paletteHeight: 94
});
this.lockedControls.push(this.btnColor);
+ this.mnuNoBorder.on('click', _.bind(this.onNoBorderClick, this));
this.btnColor.on('color:select', this.onColorPickerSelect.bind(this));
this.btnColor.setMenu();
this.mnuColorPicker = this.btnColor.getPicker();
}
-
- this.mnuColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
- this.mnuColorPicker.clearSelection();
- this.BorderColor && this.mnuColorPicker.selectByRGB(typeof(this.BorderColor) == 'object' ? this.BorderColor.color : this.BorderColor,true);
},
onHideMenus: function(menu, e, isFromInputControl){
@@ -863,7 +887,8 @@ define([
textFromStorage: 'From Storage',
textColor: 'Border color',
textConnected: 'Fields connected',
- textDisconnect: 'Disconnect'
+ textDisconnect: 'Disconnect',
+ textNoBorder: 'No border'
}, DE.Views.FormSettings || {}));
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/view/FormsTab.js b/apps/documenteditor/main/app/view/FormsTab.js
index e49706509..32102f230 100644
--- a/apps/documenteditor/main/app/view/FormsTab.js
+++ b/apps/documenteditor/main/app/view/FormsTab.js
@@ -207,12 +207,17 @@ define([
checkable: true
}),
{caption: '--'},
- {template: _.template('')},
+ {template: _.template('')},
{template: _.template('')}
]
}));
me.mnuFormsColorPicker = new Common.UI.ThemeColorPalette({
- el: $('#id-toolbar-menu-form-color')
+ el: $('#id-toolbar-menu-form-color'),
+ colors: ['000000', '993300', '333300', '003300', '003366', '000080', '333399', '333333', '800000', 'FF6600',
+ '808000', '00FF00', '008080', '0000FF', '666699', '808080', 'FF0000', 'FF9900', '99CC00', '339966',
+ '33CCCC', '3366FF', '800080', '999999', 'FF00FF', 'FFCC00', 'FFFF00', '00FF00', '00FFFF', '00CCFF',
+ '993366', 'C0C0C0', 'FF99CC', 'FFCC99', 'FFFF99', 'CCFFCC', 'CCFFFF', '99CCFF', 'CC99FF', 'FFFFFF'
+ ]
});
var colorVal = $('
');
$('button:first-child', me.btnHighlight.cmpEl).append(colorVal);
diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js
index c49196100..96f8edd31 100644
--- a/apps/documenteditor/main/app/view/Toolbar.js
+++ b/apps/documenteditor/main/app/view/Toolbar.js
@@ -268,7 +268,7 @@ define([
template: _.template('
<%= caption %>')
},
{caption: '--'},
- {template: _.template('')},
+ {template: _.template('')},
{template: _.template('')}
]
})
@@ -282,7 +282,7 @@ define([
split: true,
menu: new Common.UI.Menu({
items: [
- {template: _.template('')},
+ {template: _.template('')},
{template: _.template('')}
]
})
@@ -666,7 +666,7 @@ define([
checkable: true
}),
{caption: '--'},
- {template: _.template('')},
+ {template: _.template('')},
{template: _.template('')}
]
})
@@ -1959,7 +1959,12 @@ define([
if (this.btnContentControls.cmpEl) {
this.mnuControlsColorPicker = new Common.UI.ThemeColorPalette({
- el: $('#id-toolbar-menu-controls-color')
+ el: $('#id-toolbar-menu-controls-color'),
+ colors: ['000000', '993300', '333300', '003300', '003366', '000080', '333399', '333333', '800000', 'FF6600',
+ '808000', '00FF00', '008080', '0000FF', '666699', '808080', 'FF0000', 'FF9900', '99CC00', '339966',
+ '33CCCC', '3366FF', '800080', '999999', 'FF00FF', 'FFCC00', 'FFFF00', '00FF00', '00FFFF', '00CCFF',
+ '993366', 'C0C0C0', 'FF99CC', 'FFCC99', 'FFFF99', 'CCFFCC', 'CCFFFF', '99CCFF', 'CC99FF', 'FFFFFF'
+ ]
});
}
},
diff --git a/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js b/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js
index e20f56622..63a5b9a05 100644
--- a/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js
+++ b/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js
@@ -344,7 +344,7 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
template: _.template('
<%= caption %>')
},
{caption: '--'},
- { template: _.template('') },
+ { template: _.template('') },
{ template: _.template('') }
]
})
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index 8462f0eea..94381236d 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -1661,6 +1661,7 @@
"DE.Views.FormSettings.textConnected": "Fields connected",
"DE.Views.FormSettings.textDelete": "Delete",
"DE.Views.FormSettings.textDisconnect": "Disconnect",
+ "DE.Views.FormSettings.textNoBorder": "No border",
"DE.Views.FormSettings.textDropDown": "Dropdown",
"DE.Views.FormSettings.textField": "Text Field",
"DE.Views.FormSettings.textFromFile": "From File",
diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js
index f221f69d1..2eaf49a69 100644
--- a/apps/presentationeditor/main/app/view/Toolbar.js
+++ b/apps/presentationeditor/main/app/view/Toolbar.js
@@ -342,7 +342,7 @@ define([
menu: new Common.UI.Menu({
cls: 'shifted-left',
items: [
- {template: _.template('')},
+ {template: _.template('')},
{template: _.template('')}
]
})
diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js
index 359cfc1ce..c0e829df6 100644
--- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js
+++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js
@@ -561,7 +561,7 @@ define([
menu : new Common.UI.Menu({
additionalAlign: this.menuAddAlign,
items: [
- { template: _.template('') },
+ { template: _.template('') },
{ template: _.template('') }
]
})
@@ -580,7 +580,7 @@ define([
menu : new Common.UI.Menu({
additionalAlign: this.menuAddAlign,
items: [
- { template: _.template('') },
+ { template: _.template('') },
{ template: _.template('') }
]
})
diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js
index 14add7356..4fab2e202 100644
--- a/apps/spreadsheeteditor/main/app/view/Statusbar.js
+++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js
@@ -305,7 +305,7 @@ define([
menuAlign: 'tl-tr',
cls: 'color-tab',
items: [
- { template: _.template('') },
+ { template: _.template('') },
{ template: _.template('') }
]
});
diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js
index 7fc5d01f7..89340de2c 100644
--- a/apps/spreadsheeteditor/main/app/view/Toolbar.js
+++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js
@@ -480,7 +480,7 @@ define([
lock : [_set.selImage, _set.editFormula, _set.selRangeEdit, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect],
menu : new Common.UI.Menu({
items: [
- { template: _.template('') },
+ { template: _.template('') },
{ template: _.template('') }
]
})
@@ -495,7 +495,7 @@ define([
lock : [_set.selImage, _set.editCell, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect],
menu : new Common.UI.Menu({
items: [
- { template: _.template('') },
+ { template: _.template('') },
{ template: _.template('') }
]
})
@@ -1843,7 +1843,7 @@ define([
menu : new Common.UI.Menu({
menuAlign : 'tl-tr',
items : [
- { template: _.template(''), stopPropagation: true },
+ { template: _.template(''), stopPropagation: true },
{ template: _.template(''), stopPropagation: true }
]
})