Merge pull request #714 from ONLYOFFICE/feature/sse-cell-indent
Feature/sse cell indent
This commit is contained in:
commit
b905e53fdf
|
@ -109,6 +109,16 @@
|
||||||
<div class="separator horizontal"></div>
|
<div class="separator horizontal"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan=2 class="">
|
||||||
|
<label class="header"><%= scope.textIndent %></label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="padding-large" colspan=2>
|
||||||
|
<div id="cell-spin-indent" style="display: inline-block;"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 class="padding-small">
|
<td colspan=2 class="padding-small">
|
||||||
<label class="header"><%= scope.textOrientation %></label>
|
<label class="header"><%= scope.textOrientation %></label>
|
||||||
|
|
|
@ -73,6 +73,7 @@ define([
|
||||||
DisabledControls: true,
|
DisabledControls: true,
|
||||||
DisabledFillPanels: false,
|
DisabledFillPanels: false,
|
||||||
CellAngle: undefined,
|
CellAngle: undefined,
|
||||||
|
CellIndent: undefined,
|
||||||
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
|
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
|
||||||
CellColor: 'transparent',
|
CellColor: 'transparent',
|
||||||
FillType: Asc.c_oAscFill.FILL_TYPE_NOFILL,
|
FillType: Asc.c_oAscFill.FILL_TYPE_NOFILL,
|
||||||
|
@ -147,7 +148,11 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onAngleChange: function(field, newValue, oldValue, eOpts) {
|
onAngleChange: function(field, newValue, oldValue, eOpts) {
|
||||||
this.api && this.api.asc_setCellAngle(field.getNumberValue());
|
this.api && (newValue!==oldValue) && this.api.asc_setCellAngle(field.getNumberValue());
|
||||||
|
},
|
||||||
|
|
||||||
|
onIndentChange: function(field, newValue, oldValue, eOpts) {
|
||||||
|
this.api && (newValue!==oldValue) && this.api.asc_setCellIndent(field.getNumberValue());
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
|
@ -429,6 +434,21 @@ define([
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.btnBackColor);
|
this.lockedControls.push(this.btnBackColor);
|
||||||
|
|
||||||
|
this.spnIndent = new Common.UI.MetricSpinner({
|
||||||
|
el: $('#cell-spin-indent'),
|
||||||
|
step: 1,
|
||||||
|
width: 60,
|
||||||
|
defaultUnit : "",
|
||||||
|
value: '0',
|
||||||
|
allowDecimal: false,
|
||||||
|
maxValue: 250,
|
||||||
|
minValue: 0,
|
||||||
|
disabled: this._locked
|
||||||
|
});
|
||||||
|
this.lockedControls.push(this.spnIndent);
|
||||||
|
this.spnIndent.on('change', _.bind(this.onIndentChange, this));
|
||||||
|
this.spnIndent.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);});
|
||||||
|
|
||||||
this.spnAngle = new Common.UI.MetricSpinner({
|
this.spnAngle = new Common.UI.MetricSpinner({
|
||||||
el: $('#cell-spin-angle'),
|
el: $('#cell-spin-angle'),
|
||||||
step: 1,
|
step: 1,
|
||||||
|
@ -518,6 +538,12 @@ define([
|
||||||
this._state.CellAngle = value;
|
this._state.CellAngle = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
value = xfs.asc_getIndent();
|
||||||
|
if (Math.abs(this._state.CellIndent - value) > 0.1 || (this._state.CellIndent === undefined) && (this._state.CellIndent !== value)) {
|
||||||
|
this.spnIndent.setValue((value !== null) ? value : '', true);
|
||||||
|
this._state.CellIndent = value;
|
||||||
|
}
|
||||||
|
|
||||||
value = xfs.asc_getWrapText();
|
value = xfs.asc_getWrapText();
|
||||||
if ( this._state.Wrap!==value ) {
|
if ( this._state.Wrap!==value ) {
|
||||||
this.chWrap.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true);
|
this.chWrap.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true);
|
||||||
|
@ -1319,7 +1345,8 @@ define([
|
||||||
textGradientColor: 'Color',
|
textGradientColor: 'Color',
|
||||||
textPosition: 'Position',
|
textPosition: 'Position',
|
||||||
tipAddGradientPoint: 'Add gradient point',
|
tipAddGradientPoint: 'Add gradient point',
|
||||||
tipRemoveGradientPoint: 'Remove gradient point'
|
tipRemoveGradientPoint: 'Remove gradient point',
|
||||||
|
textIndent: 'Indent'
|
||||||
|
|
||||||
}, SSE.Views.CellSettings || {}));
|
}, SSE.Views.CellSettings || {}));
|
||||||
});
|
});
|
|
@ -1370,6 +1370,7 @@
|
||||||
"SSE.Views.CellSettings.tipRemoveGradientPoint": "Remove gradient point",
|
"SSE.Views.CellSettings.tipRemoveGradientPoint": "Remove gradient point",
|
||||||
"SSE.Views.CellSettings.tipRight": "Set outer right border only",
|
"SSE.Views.CellSettings.tipRight": "Set outer right border only",
|
||||||
"SSE.Views.CellSettings.tipTop": "Set outer top border only",
|
"SSE.Views.CellSettings.tipTop": "Set outer top border only",
|
||||||
|
"SSE.Views.CellSettings.textIndent": "Indent",
|
||||||
"SSE.Views.ChartDataDialog.errorInFormula": "There's an error in formula you entered.",
|
"SSE.Views.ChartDataDialog.errorInFormula": "There's an error in formula you entered.",
|
||||||
"SSE.Views.ChartDataDialog.errorInvalidReference": "The reference is not valid. Reference must be to an open worksheet.",
|
"SSE.Views.ChartDataDialog.errorInvalidReference": "The reference is not valid. Reference must be to an open worksheet.",
|
||||||
"SSE.Views.ChartDataDialog.errorMaxPoints": "The maximum number of points in series per chart is 4096.",
|
"SSE.Views.ChartDataDialog.errorMaxPoints": "The maximum number of points in series per chart is 4096.",
|
||||||
|
|
Loading…
Reference in a new issue