Show current color scheme
This commit is contained in:
parent
6c39a8dbfa
commit
61ed3059e2
|
@ -310,6 +310,7 @@ define([
|
||||||
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, this));
|
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, this));
|
||||||
toolbar.mnuPageSize.on('item:click', _.bind(this.onPageSizeClick, this));
|
toolbar.mnuPageSize.on('item:click', _.bind(this.onPageSizeClick, this));
|
||||||
toolbar.mnuColorSchema.on('item:click', _.bind(this.onColorSchemaClick, this));
|
toolbar.mnuColorSchema.on('item:click', _.bind(this.onColorSchemaClick, this));
|
||||||
|
toolbar.mnuColorSchema.on('show:after', _.bind(this.onColorSchemaShow, this));
|
||||||
toolbar.btnMailRecepients.on('click', _.bind(this.onSelectRecepientsClick, this));
|
toolbar.btnMailRecepients.on('click', _.bind(this.onSelectRecepientsClick, this));
|
||||||
toolbar.mnuInsertChartPicker.on('item:click', _.bind(this.onSelectChart, this));
|
toolbar.mnuInsertChartPicker.on('item:click', _.bind(this.onSelectChart, this));
|
||||||
toolbar.mnuPageNumberPosPicker.on('item:click', _.bind(this.onInsertPageNumberClick, this));
|
toolbar.mnuPageNumberPosPicker.on('item:click', _.bind(this.onInsertPageNumberClick, this));
|
||||||
|
@ -1591,6 +1592,14 @@ define([
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onColorSchemaShow: function(menu) {
|
||||||
|
if (this.api) {
|
||||||
|
var value = this.api.asc_GetCurrentColorSchemeName();
|
||||||
|
var item = _.find(menu.items, function(item) { return item.value == value; });
|
||||||
|
(item) ? item.setChecked(true) : menu.clearAll();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onDropCapSelect: function(menu, item) {
|
onDropCapSelect: function(menu, item) {
|
||||||
if (_.isUndefined(item.value))
|
if (_.isUndefined(item.value))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2103,7 +2103,9 @@ define([
|
||||||
cls: 'color-schemas-menu',
|
cls: 'color-schemas-menu',
|
||||||
colors: schemecolors,
|
colors: schemecolors,
|
||||||
caption: (index < 21) ? (me.SchemeNames[index] || schema.get_name()) : schema.get_name(),
|
caption: (index < 21) ? (me.SchemeNames[index] || schema.get_name()) : schema.get_name(),
|
||||||
value: index
|
value: index,
|
||||||
|
checkable: true,
|
||||||
|
toggleGroup: 'menuSchema'
|
||||||
});
|
});
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
|
@ -84,6 +84,18 @@
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.checked {
|
||||||
|
&:before {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
&, &:hover, &:focus {
|
||||||
|
background-color: @primary;
|
||||||
|
color: @dropdown-link-active-color;
|
||||||
|
span.color {
|
||||||
|
border-color: rgba(255,255,255,0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// page number position
|
// page number position
|
||||||
.menu-pageposition {
|
.menu-pageposition {
|
||||||
|
|
|
@ -307,6 +307,7 @@ define([
|
||||||
toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this));
|
toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this));
|
||||||
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, this));
|
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, this));
|
||||||
toolbar.btnColorSchemas.menu.on('item:click', _.bind(this.onColorSchemaClick, this));
|
toolbar.btnColorSchemas.menu.on('item:click', _.bind(this.onColorSchemaClick, this));
|
||||||
|
toolbar.btnColorSchemas.menu.on('show:after', _.bind(this.onColorSchemaShow, this));
|
||||||
toolbar.btnSlideSize.menu.on('item:click', _.bind(this.onSlideSize, this));
|
toolbar.btnSlideSize.menu.on('item:click', _.bind(this.onSlideSize, this));
|
||||||
toolbar.mnuInsertChartPicker.on('item:click', _.bind(this.onSelectChart, this));
|
toolbar.mnuInsertChartPicker.on('item:click', _.bind(this.onSelectChart, this));
|
||||||
toolbar.listTheme.on('click', _.bind(this.onListThemeSelect, this));
|
toolbar.listTheme.on('click', _.bind(this.onListThemeSelect, this));
|
||||||
|
@ -1531,6 +1532,14 @@ define([
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onColorSchemaShow: function(menu) {
|
||||||
|
if (this.api) {
|
||||||
|
var value = this.api.asc_GetCurrentColorSchemeName();
|
||||||
|
var item = _.find(menu.items, function(item) { return item.value == value; });
|
||||||
|
(item) ? item.setChecked(true) : menu.clearAll();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onSlideSize: function(menu, item) {
|
onSlideSize: function(menu, item) {
|
||||||
if (item.value !== 'advanced') {
|
if (item.value !== 'advanced') {
|
||||||
var portrait = (this.currentPageSize.height > this.currentPageSize.width);
|
var portrait = (this.currentPageSize.height > this.currentPageSize.width);
|
||||||
|
|
|
@ -1324,7 +1324,9 @@ define([
|
||||||
cls: 'color-schemas-menu',
|
cls: 'color-schemas-menu',
|
||||||
colors: schemecolors,
|
colors: schemecolors,
|
||||||
caption: (index < 21) ? (me.schemeNames[index] || schema.get_name()) : schema.get_name(),
|
caption: (index < 21) ? (me.schemeNames[index] || schema.get_name()) : schema.get_name(),
|
||||||
value: index
|
value: index,
|
||||||
|
checkable: true,
|
||||||
|
toggleGroup: 'menuSchema'
|
||||||
});
|
});
|
||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,18 @@
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.checked {
|
||||||
|
&:before {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
&, &:hover, &:focus {
|
||||||
|
background-color: @primary;
|
||||||
|
color: @dropdown-link-active-color;
|
||||||
|
span.color {
|
||||||
|
border-color: rgba(255,255,255,0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// menu zoom
|
// menu zoom
|
||||||
|
|
|
@ -332,6 +332,7 @@ define([
|
||||||
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, this));
|
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, this));
|
||||||
toolbar.btnDeleteCell.menu.on('item:click', _.bind(this.onCellDeleteMenu, this));
|
toolbar.btnDeleteCell.menu.on('item:click', _.bind(this.onCellDeleteMenu, this));
|
||||||
toolbar.btnColorSchemas.menu.on('item:click', _.bind(this.onColorSchemaClick, this));
|
toolbar.btnColorSchemas.menu.on('item:click', _.bind(this.onColorSchemaClick, this));
|
||||||
|
toolbar.btnColorSchemas.menu.on('show:after', _.bind(this.onColorSchemaShow, this));
|
||||||
toolbar.cmbFontName.on('selected', _.bind(this.onFontNameSelect, this));
|
toolbar.cmbFontName.on('selected', _.bind(this.onFontNameSelect, this));
|
||||||
toolbar.cmbFontName.on('show:after', _.bind(this.onComboOpen, this, true));
|
toolbar.cmbFontName.on('show:after', _.bind(this.onComboOpen, this, true));
|
||||||
toolbar.cmbFontName.on('hide:after', _.bind(this.onHideMenus, this));
|
toolbar.cmbFontName.on('hide:after', _.bind(this.onHideMenus, this));
|
||||||
|
@ -1340,6 +1341,14 @@ define([
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onColorSchemaShow: function(menu) {
|
||||||
|
if (this.api) {
|
||||||
|
var value = this.api.asc_GetCurrentColorSchemeName();
|
||||||
|
var item = _.find(menu.items, function(item) { return item.value == value; });
|
||||||
|
(item) ? item.setChecked(true) : menu.clearAll();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onComboBlur: function() {
|
onComboBlur: function() {
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||||
},
|
},
|
||||||
|
|
|
@ -1957,7 +1957,9 @@ define([
|
||||||
cls : 'color-schemas-menu',
|
cls : 'color-schemas-menu',
|
||||||
colors : schemecolors,
|
colors : schemecolors,
|
||||||
caption : (index < 21) ? (me.SchemeNames[index] || schema.get_name()) : schema.get_name(),
|
caption : (index < 21) ? (me.SchemeNames[index] || schema.get_name()) : schema.get_name(),
|
||||||
value : index
|
value : index,
|
||||||
|
checkable: true,
|
||||||
|
toggleGroup: 'menuSchema'
|
||||||
});
|
});
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
|
@ -59,6 +59,18 @@
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.checked {
|
||||||
|
&:before {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
&, &:hover, &:focus {
|
||||||
|
background-color: @primary;
|
||||||
|
color: @dropdown-link-active-color;
|
||||||
|
span.color {
|
||||||
|
border-color: rgba(255,255,255,0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// menu zoom
|
// menu zoom
|
||||||
|
|
Loading…
Reference in a new issue