[SSE] Added data and location ranges for sparklines.

This commit is contained in:
Julia Radzhabova 2016-11-30 17:08:26 +03:00
parent 2600efb38c
commit 2d7f7737b7
2 changed files with 37 additions and 31 deletions

View file

@ -335,35 +335,35 @@
<!--<div id="spark-dlg-radio-single" style="display: block;"></div>-->
<!--</div>-->
<table cols="2" style="width: 100%;">
<!--<tr>-->
<!--<td colspan=2 >-->
<!--<label class="header"><%= scope.textDataRange %></label>-->
<!--</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td class="padding-small" width="200">-->
<!--<div id="spark-dlg-txt-range" class="input-row" style="margin-right: 10px;"></div>-->
<!--</td>-->
<!--<td class="padding-small" style="text-align: right;">-->
<!--<button type="button" class="btn btn-text-default" id="spark-dlg-btn-data" style="min-width: 100px;"><%= scope.textSelectData %></button>-->
<!--</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td colspan=2 >-->
<!--<label class="header"><%= scope.textLocationRange %></label>-->
<!--</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td class="padding-large" width="200">-->
<!--<div id="spark-dlg-txt-location" class="input-row" style="margin-right: 10px;"></div>-->
<!--</td>-->
<!--<td class="padding-large" style="text-align: right;">-->
<!--<button type="button" class="btn btn-text-default" id="spark-dlg-btn-location-data" style="min-width: 100px;"><%= scope.textSelectData %></button>-->
<!--</td>-->
<!--</tr>-->
<!--<tr>-->
<!--<td colspan=2 class="padding-large"></td>-->
<!--</tr>-->
<tr>
<td colspan=2 >
<label class="header"><%= scope.textDataRange %></label>
</td>
</tr>
<tr>
<td class="padding-small" width="200">
<div id="spark-dlg-txt-range" class="input-row" style="margin-right: 10px;"></div>
</td>
<td class="padding-small" style="text-align: right;">
<button type="button" class="btn btn-text-default" id="spark-dlg-btn-data" style="min-width: 100px;"><%= scope.textSelectData %></button>
</td>
</tr>
<tr>
<td colspan=2 >
<label class="header"><%= scope.textLocationRange %></label>
</td>
</tr>
<tr>
<td class="padding-large" width="200">
<div id="spark-dlg-txt-location" class="input-row" style="margin-right: 10px;"></div>
</td>
<td class="padding-large" style="text-align: right;">
<button type="button" class="btn btn-text-default" id="spark-dlg-btn-location-data" style="min-width: 100px;"><%= scope.textSelectData %></button>
</td>
</tr>
<tr>
<td colspan=2 class="padding-large"></td>
</tr>
<tr>
<td colspan=2 class="padding-small">
<label class="header"><%= scope.textEmptyCells %></label>

View file

@ -840,7 +840,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
labelText: this.textSingle,
name: 'asc-radio-sparkline'
});
*/
this.txtSparkDataRange = new Common.UI.InputField({
el : $('#spark-dlg-txt-range'),
name : 'range',
@ -868,7 +868,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
el: $('#spark-dlg-btn-data')
});
// this.btnSelectLocationData.on('click', _.bind(this.onSelectData, this));
*/
this._arrEmptyCells = [
{ value: Asc.c_oAscEDispBlanksAs.Gap, displayValue: this.textGaps },
@ -1373,6 +1373,12 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this.spnSparkMinValue.setValue((props.asc_getManualMin() !== null) ? props.asc_getManualMin() : '', true);
this.spnSparkMaxValue.setValue((props.asc_getManualMax() !== null) ? props.asc_getManualMax() : '', true);
var value = props.asc_getDataRanges();
if (value && value.length==2) {
this.txtSparkDataRange.setValue((value[0]) ? value[0] : '');
this.txtSparkDataLocation.setValue((value[1]) ? value[1] : '');
}
this._changedProps = new Asc.sparklineGroup();
this._noApply = false;
}