commit
cd2fa4362e
|
@ -116,13 +116,12 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function() {
|
getFocusedComponents: function() {
|
||||||
Common.UI.Window.prototype.show.apply(this, arguments);
|
return [this.inputPwd, this.repeatPwd];
|
||||||
|
},
|
||||||
|
|
||||||
var me = this;
|
getDefaultFocusableComponent: function () {
|
||||||
setTimeout(function(){
|
return this.inputPwd;
|
||||||
me.inputPwd.cmpEl.find('input').focus();
|
|
||||||
}, 500);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onPrimary: function(event) {
|
onPrimary: function(event) {
|
||||||
|
|
|
@ -1092,7 +1092,7 @@ define([
|
||||||
var range = props.getRange(),
|
var range = props.getRange(),
|
||||||
isvalid = (!_.isEmpty(range)) ? me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, props.getInRows(), props.getType()) : Asc.c_oAscError.ID.No;
|
isvalid = (!_.isEmpty(range)) ? me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, props.getInRows(), props.getType()) : Asc.c_oAscError.ID.No;
|
||||||
if (isvalid == Asc.c_oAscError.ID.No) {
|
if (isvalid == Asc.c_oAscError.ID.No) {
|
||||||
(ischartedit) ? me.api.asc_editChartDrawingObject(props) : me.api.asc_addChartDrawingObject(props);
|
!ischartedit && me.api.asc_addChartDrawingObject(props);
|
||||||
} else {
|
} else {
|
||||||
var msg = me.txtInvalidRange;
|
var msg = me.txtInvalidRange;
|
||||||
switch (isvalid) {
|
switch (isvalid) {
|
||||||
|
|
|
@ -260,6 +260,12 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
this.chVertHide = [];
|
this.chVertHide = [];
|
||||||
this.btnVFormat = [];
|
this.btnVFormat = [];
|
||||||
|
|
||||||
|
this._arrVertTitle = [
|
||||||
|
{value: Asc.c_oAscChartVertAxisLabelShowSettings.none, displayValue: me.textNone},
|
||||||
|
{value: Asc.c_oAscChartVertAxisLabelShowSettings.rotated, displayValue: me.textRotated},
|
||||||
|
{value: Asc.c_oAscChartVertAxisLabelShowSettings.horizontal, displayValue: me.textHorizontal}
|
||||||
|
];
|
||||||
|
|
||||||
var addControlsV = function(i) {
|
var addControlsV = function(i) {
|
||||||
me.chVertHide[i] = new Common.UI.CheckBox({
|
me.chVertHide[i] = new Common.UI.CheckBox({
|
||||||
el: $('#chart-dlg-chk-vert-hide-' + i),
|
el: $('#chart-dlg-chk-vert-hide-' + i),
|
||||||
|
@ -274,11 +280,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
menuStyle: 'min-width: 140px;',
|
menuStyle: 'min-width: 140px;',
|
||||||
editable: false,
|
editable: false,
|
||||||
cls: 'input-group-nr',
|
cls: 'input-group-nr',
|
||||||
data: [
|
data: me._arrVertTitle,
|
||||||
{value: Asc.c_oAscChartVertAxisLabelShowSettings.none, displayValue: me.textNone},
|
|
||||||
{value: Asc.c_oAscChartVertAxisLabelShowSettings.rotated, displayValue: me.textRotated},
|
|
||||||
{value: Asc.c_oAscChartVertAxisLabelShowSettings.horizontal, displayValue: me.textHorizontal}
|
|
||||||
],
|
|
||||||
takeFocusOnClose: true
|
takeFocusOnClose: true
|
||||||
}).on('selected', _.bind(function (combo, record) {
|
}).on('selected', _.bind(function (combo, record) {
|
||||||
if (me.currentAxisProps[i])
|
if (me.currentAxisProps[i])
|
||||||
|
@ -535,6 +537,11 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
this.chHorHide = [];
|
this.chHorHide = [];
|
||||||
this.btnHFormat = [];
|
this.btnHFormat = [];
|
||||||
|
|
||||||
|
this._arrHorTitle = [
|
||||||
|
{value: Asc.c_oAscChartHorAxisLabelShowSettings.none, displayValue: me.textNone},
|
||||||
|
{value: Asc.c_oAscChartHorAxisLabelShowSettings.noOverlay, displayValue: me.textNoOverlay}
|
||||||
|
];
|
||||||
|
|
||||||
var addControlsH = function(i) {
|
var addControlsH = function(i) {
|
||||||
me.chHorHide[i] = new Common.UI.CheckBox({
|
me.chHorHide[i] = new Common.UI.CheckBox({
|
||||||
el: $('#chart-dlg-chk-hor-hide-' + i),
|
el: $('#chart-dlg-chk-hor-hide-' + i),
|
||||||
|
@ -549,10 +556,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
menuStyle: 'min-width: 140px;',
|
menuStyle: 'min-width: 140px;',
|
||||||
editable: false,
|
editable: false,
|
||||||
cls: 'input-group-nr',
|
cls: 'input-group-nr',
|
||||||
data: [
|
data: me._arrHorTitle,
|
||||||
{value: Asc.c_oAscChartHorAxisLabelShowSettings.none, displayValue: me.textNone},
|
|
||||||
{value: Asc.c_oAscChartHorAxisLabelShowSettings.noOverlay, displayValue: me.textNoOverlay}
|
|
||||||
],
|
|
||||||
takeFocusOnClose: true
|
takeFocusOnClose: true
|
||||||
}).on('selected', _.bind(function (combo, record) {
|
}).on('selected', _.bind(function (combo, record) {
|
||||||
if (me.currentAxisProps[i])
|
if (me.currentAxisProps[i])
|
||||||
|
@ -1192,14 +1196,14 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
},
|
},
|
||||||
|
|
||||||
onVCategoryClick: function(index) {
|
onVCategoryClick: function(index) {
|
||||||
(this.vertAxisProps[index].getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.vertAxisProps[index], index) : this.fillHProps(this.vertAxisProps[index], index);
|
(this.vertAxisProps[index].getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.vertAxisProps[index], index) : this.fillHProps(this.vertAxisProps[index], index, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
onHCategoryClick: function(index) {
|
onHCategoryClick: function(index) {
|
||||||
(this.horAxisProps[index].getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.horAxisProps[index], index) : this.fillHProps(this.horAxisProps[index], index);
|
(this.horAxisProps[index].getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.horAxisProps[index], index, true) : this.fillHProps(this.horAxisProps[index], index);
|
||||||
},
|
},
|
||||||
|
|
||||||
fillVProps: function(props, index) {
|
fillVProps: function(props, index, hor) {
|
||||||
if (props.getAxisType() !== Asc.c_oAscAxisType.val) return;
|
if (props.getAxisType() !== Asc.c_oAscAxisType.val) return;
|
||||||
if (this._originalAxisVValues==undefined)
|
if (this._originalAxisVValues==undefined)
|
||||||
this._originalAxisVValues = [];
|
this._originalAxisVValues = [];
|
||||||
|
@ -1213,6 +1217,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
|
|
||||||
this.chVertHide[index].setValue(!props.getShow());
|
this.chVertHide[index].setValue(!props.getShow());
|
||||||
this.cmbVertGrid[index].setValue(props.getGridlines());
|
this.cmbVertGrid[index].setValue(props.getGridlines());
|
||||||
|
|
||||||
|
|
||||||
|
this.cmbVertTitle[index].setData(hor ? this._arrHorTitle : this._arrVertTitle);
|
||||||
this.cmbVertTitle[index].setValue(props.getLabel());
|
this.cmbVertTitle[index].setValue(props.getLabel());
|
||||||
|
|
||||||
this.cmbMinType[index].setValue(props.getMinValRule());
|
this.cmbMinType[index].setValue(props.getMinValRule());
|
||||||
|
@ -1250,7 +1257,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
this.currentAxisProps[index] = props;
|
this.currentAxisProps[index] = props;
|
||||||
},
|
},
|
||||||
|
|
||||||
fillHProps: function(props, index) {
|
fillHProps: function(props, index, vert) {
|
||||||
if (props.getAxisType() !== Asc.c_oAscAxisType.cat) return;
|
if (props.getAxisType() !== Asc.c_oAscAxisType.cat) return;
|
||||||
if (this._originalAxisHValues==undefined)
|
if (this._originalAxisHValues==undefined)
|
||||||
this._originalAxisHValues = [];
|
this._originalAxisHValues = [];
|
||||||
|
@ -1264,6 +1271,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
|
|
||||||
this.chHorHide[index].setValue(!props.getShow());
|
this.chHorHide[index].setValue(!props.getShow());
|
||||||
this.cmbHorGrid[index].setValue(props.getGridlines());
|
this.cmbHorGrid[index].setValue(props.getGridlines());
|
||||||
|
|
||||||
|
this.cmbHorTitle[index].setData(vert ? this._arrVertTitle : this._arrHorTitle);
|
||||||
this.cmbHorTitle[index].setValue(props.getLabel());
|
this.cmbHorTitle[index].setValue(props.getLabel());
|
||||||
|
|
||||||
var value = props.getCrossesRule();
|
var value = props.getCrossesRule();
|
||||||
|
|
Loading…
Reference in a new issue