[DE] Fix Paragraph - Advanced Settings (Bug 40580)
This commit is contained in:
parent
34eee2f1b5
commit
c370141f8c
|
@ -46,8 +46,8 @@ var c_paragraphLinerule = {
|
||||||
LINERULE_EXACT: 2
|
LINERULE_EXACT: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
var c_paragraphSpecian = {
|
var c_paragraphSpecial = {
|
||||||
NONE_SPECIAN: 0,
|
NONE_SPECIAL: 0,
|
||||||
FIRST_LINE: 1,
|
FIRST_LINE: 1,
|
||||||
HANGING: 2
|
HANGING: 2
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,12 +21,12 @@
|
||||||
<div id="paragraphadv-spin-indent-right"></div>
|
<div id="paragraphadv-spin-indent-right"></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="padding-large" style="padding-right: 5px;">
|
<td class="padding-large" style="padding-right: 5px;">
|
||||||
<label class="input-label"><%= scope.strIndentsSpecian %></label>
|
<label class="input-label"><%= scope.strIndentsSpecial %></label>
|
||||||
<div id="paragraphadv-spin-specian"></div>
|
<div id="paragraphadv-spin-special"></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="padding-large">
|
<td class="padding-large">
|
||||||
<label class="input-label"><%= scope.strIndentsSpecianBy %></label>
|
<label class="input-label"><%= scope.strIndentsSpecialBy %></label>
|
||||||
<div id="paragraphadv-spin-specian-by"></div>
|
<div id="paragraphadv-spin-special-by"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -47,14 +47,14 @@
|
||||||
<div id="paragraphadv-spin-line-height"></div>
|
<div id="paragraphadv-spin-line-height"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="text-only">
|
||||||
<td colspan=4 class="padding-large">
|
<td colspan=4 class="padding-large">
|
||||||
<div id="paragraphadv-checkbox-add-interval"></div>
|
<div id="paragraphadv-checkbox-add-interval"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=4 class="padding-large">
|
<td colspan=4 class="padding-large">
|
||||||
<div style="border: 1px solid #cbcbcb; width: 360px;">
|
<div style="border: 1px solid #cbcbcb; width: 355px;">
|
||||||
<div id="paragraphadv-indent-preview" style="height: 94px; position: relative;"></div>
|
<div id="paragraphadv-indent-preview" style="height: 94px; position: relative;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -103,12 +103,12 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
{displayValue: this.textExact, defaultValue: 5, value: c_paragraphLinerule.LINERULE_EXACT, minValue: 0.03, step: 0.01, defaultUnit: 'cm'}
|
{displayValue: this.textExact, defaultValue: 5, value: c_paragraphLinerule.LINERULE_EXACT, minValue: 0.03, step: 0.01, defaultUnit: 'cm'}
|
||||||
];
|
];
|
||||||
|
|
||||||
this._arrSpecian = [
|
this._arrSpecial = [
|
||||||
{displayValue: this.textNoneSpecian, value: c_paragraphSpecian.NONE_SPECIAN, defaultValue: 0},
|
{displayValue: this.textNoneSpecial, value: c_paragraphSpecial.NONE_SPECIAL, defaultValue: 0},
|
||||||
{displayValue: this.textFirstLine, value: c_paragraphSpecian.FIRST_LINE, defaultValue: 27},
|
{displayValue: this.textFirstLine, value: c_paragraphSpecial.FIRST_LINE, defaultValue: 12.7},
|
||||||
{displayValue: this.textHanging, value: c_paragraphSpecian.HANGING, defaultValue: 27}
|
{displayValue: this.textHanging, value: c_paragraphSpecial.HANGING, defaultValue: 12.7}
|
||||||
];
|
];
|
||||||
this.CurSpecian = undefined;
|
this.CurSpecial = undefined;
|
||||||
|
|
||||||
this._arrTextAlignment = [
|
this._arrTextAlignment = [
|
||||||
{displayValue: this.textLeft, value: c_paragraphTextAlignment.LEFT},
|
{displayValue: this.textLeft, value: c_paragraphTextAlignment.LEFT},
|
||||||
|
@ -244,19 +244,19 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
labelText: this.strSomeParagraphSpace
|
labelText: this.strSomeParagraphSpace
|
||||||
});
|
});
|
||||||
|
|
||||||
this.cmbSpecian = new Common.UI.ComboBox({
|
this.cmbSpecial = new Common.UI.ComboBox({
|
||||||
el: $('#paragraphadv-spin-specian'),
|
el: $('#paragraphadv-spin-special'),
|
||||||
cls: 'input-group-nr',
|
cls: 'input-group-nr',
|
||||||
editable: false,
|
editable: false,
|
||||||
data: this._arrSpecian,
|
data: this._arrSpecial,
|
||||||
style: 'width: 85px;',
|
style: 'width: 85px;',
|
||||||
menuStyle : 'min-width: 85px;'
|
menuStyle : 'min-width: 85px;'
|
||||||
});
|
});
|
||||||
this.cmbSpecian.setValue('');
|
this.cmbSpecial.setValue('');
|
||||||
this.cmbSpecian.on('selected', _.bind(this.onSpecianSelect, this));
|
this.cmbSpecial.on('selected', _.bind(this.onSpecialSelect, this));
|
||||||
|
|
||||||
this.numSpecianBy = new Common.UI.MetricSpinner({
|
this.numSpecialBy = new Common.UI.MetricSpinner({
|
||||||
el: $('#paragraphadv-spin-specian-by'),
|
el: $('#paragraphadv-spin-special-by'),
|
||||||
step: .1,
|
step: .1,
|
||||||
width: 85,
|
width: 85,
|
||||||
defaultUnit : "cm",
|
defaultUnit : "cm",
|
||||||
|
@ -265,8 +265,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
maxValue: 55.87,
|
maxValue: 55.87,
|
||||||
minValue: 0
|
minValue: 0
|
||||||
});
|
});
|
||||||
this.spinners.push(this.numSpecianBy);
|
this.spinners.push(this.numSpecialBy);
|
||||||
this.numSpecianBy.on('change', _.bind(this.onFirstLineChange, this));
|
this.numSpecialBy.on('change', _.bind(this.onFirstLineChange, this));
|
||||||
|
|
||||||
this.cmbTextAlignment = new Common.UI.ComboBox({
|
this.cmbTextAlignment = new Common.UI.ComboBox({
|
||||||
el: $('#paragraphadv-spin-text-alignment'),
|
el: $('#paragraphadv-spin-text-alignment'),
|
||||||
|
@ -773,11 +773,11 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
|
|
||||||
this.chAddInterval.setValue((props.asc_getContextualSpacing() !== null && props.asc_getContextualSpacing() !== undefined) ? props.asc_getContextualSpacing() : 'indeterminate', true);
|
this.chAddInterval.setValue((props.asc_getContextualSpacing() !== null && props.asc_getContextualSpacing() !== undefined) ? props.asc_getContextualSpacing() : 'indeterminate', true);
|
||||||
|
|
||||||
if(this.CurSpecian === undefined) {
|
if(this.CurSpecial === undefined) {
|
||||||
this.CurSpecian = (props.asc_getInd().get_FirstLine() === 0) ? c_paragraphSpecian.NONE_SPECIAN : ((props.asc_getInd().get_FirstLine() > 0) ? c_paragraphSpecian.FIRST_LINE : c_paragraphSpecian.HANGING);
|
this.CurSpecial = (props.asc_getInd().get_FirstLine() === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((props.asc_getInd().get_FirstLine() > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING);
|
||||||
}
|
}
|
||||||
this.cmbSpecian.setValue(this.CurSpecian);
|
this.cmbSpecial.setValue(this.CurSpecial);
|
||||||
this.numSpecianBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true);
|
this.numSpecialBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true);
|
||||||
|
|
||||||
this.cmbTextAlignment.setValue((props.asc_getJc() !== undefined && props.asc_getJc() !== null) ? props.asc_getJc() : c_paragraphTextAlignment.LEFT, true);
|
this.cmbTextAlignment.setValue((props.asc_getJc() !== undefined && props.asc_getJc() !== null) ? props.asc_getJc() : c_paragraphTextAlignment.LEFT, true);
|
||||||
|
|
||||||
|
@ -1328,8 +1328,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
|
|
||||||
hideTextOnlySettings: function(value) {
|
hideTextOnlySettings: function(value) {
|
||||||
this.TextOnlySettings.toggleClass('hidden', value==true);
|
this.TextOnlySettings.toggleClass('hidden', value==true);
|
||||||
this.btnsCategory[1].setVisible(!value); // Borders
|
this.btnsCategory[2].setVisible(!value); // Borders
|
||||||
this.btnsCategory[4].setVisible(!value); // Paddings
|
this.btnsCategory[5].setVisible(!value); // Paddings
|
||||||
},
|
},
|
||||||
|
|
||||||
onLineRuleSelect: function(combo, record) {
|
onLineRuleSelect: function(combo, record) {
|
||||||
|
@ -1364,20 +1364,20 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
this.Spacing.Line = (this.cmbLineRule.getValue()==c_paragraphLinerule.LINERULE_AUTO) ? field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue());
|
this.Spacing.Line = (this.cmbLineRule.getValue()==c_paragraphLinerule.LINERULE_AUTO) ? field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue());
|
||||||
},
|
},
|
||||||
|
|
||||||
onSpecianSelect: function(combo, record) {
|
onSpecialSelect: function(combo, record) {
|
||||||
this.CurSpecian = record.value;
|
this.CurSpecial = record.value;
|
||||||
if (this.CurSpecian === c_paragraphSpecian.NONE_SPECIAN) {
|
if (this.CurSpecial === c_paragraphSpecial.NONE_SPECIAL) {
|
||||||
this.numSpecianBy.setValue(0, true);
|
this.numSpecialBy.setValue(0, true);
|
||||||
}
|
}
|
||||||
if (this._changedProps) {
|
if (this._changedProps) {
|
||||||
if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined)
|
if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined)
|
||||||
this._changedProps.put_Ind(new Asc.asc_CParagraphInd());
|
this._changedProps.put_Ind(new Asc.asc_CParagraphInd());
|
||||||
var value = Common.Utils.Metric.fnRecalcToMM(this.numSpecianBy.getNumberValue());
|
var value = Common.Utils.Metric.fnRecalcToMM(this.numSpecialBy.getNumberValue());
|
||||||
if (value === 0) {
|
if (value === 0) {
|
||||||
this.numSpecianBy.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrSpecian[record.value].defaultValue));
|
this.numSpecialBy.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrSpecial[record.value].defaultValue), true);
|
||||||
value = this._arrSpecian[record.value].defaultValue;
|
value = this._arrSpecial[record.value].defaultValue;
|
||||||
}
|
}
|
||||||
if (this.CurSpecian === c_paragraphSpecian.HANGING) {
|
if (this.CurSpecial === c_paragraphSpecial.HANGING) {
|
||||||
value = -value;
|
value = -value;
|
||||||
}
|
}
|
||||||
this._changedProps.get_Ind().put_FirstLine(value);
|
this._changedProps.get_Ind().put_FirstLine(value);
|
||||||
|
@ -1389,14 +1389,14 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined)
|
if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined)
|
||||||
this._changedProps.put_Ind(new Asc.asc_CParagraphInd());
|
this._changedProps.put_Ind(new Asc.asc_CParagraphInd());
|
||||||
var value = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue());
|
var value = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue());
|
||||||
if (this.CurSpecian === c_paragraphSpecian.HANGING) {
|
if (this.CurSpecial === c_paragraphSpecial.HANGING) {
|
||||||
value = -value;
|
value = -value;
|
||||||
} else if (this.CurSpecian === c_paragraphSpecian.NONE_SPECIAN && value > 0 ) {
|
} else if (this.CurSpecial === c_paragraphSpecial.NONE_SPECIAL && value > 0 ) {
|
||||||
this.CurSpecian = c_paragraphSpecian.FIRST_LINE;
|
this.CurSpecial = c_paragraphSpecial.FIRST_LINE;
|
||||||
this.cmbSpecian.setValue(c_paragraphSpecian.FIRST_LINE);
|
this.cmbSpecial.setValue(c_paragraphSpecial.FIRST_LINE);
|
||||||
} else if (value === 0) {
|
} else if (value === 0) {
|
||||||
this.CurSpecian = c_paragraphSpecian.NONE_SPECIAN;
|
this.CurSpecial = c_paragraphSpecial.NONE_SPECIAL;
|
||||||
this.cmbSpecian.setValue(c_paragraphSpecian.NONE_SPECIAN);
|
this.cmbSpecial.setValue(c_paragraphSpecial.NONE_SPECIAL);
|
||||||
}
|
}
|
||||||
this._changedProps.get_Ind().put_FirstLine(value);
|
this._changedProps.get_Ind().put_FirstLine(value);
|
||||||
}
|
}
|
||||||
|
@ -1472,11 +1472,11 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
textAtLeast: 'At least',
|
textAtLeast: 'At least',
|
||||||
textExact: 'Exactly',
|
textExact: 'Exactly',
|
||||||
strSomeParagraphSpace: 'Don\'t add interval between paragraphs of the same style',
|
strSomeParagraphSpace: 'Don\'t add interval between paragraphs of the same style',
|
||||||
strIndentsSpecian: 'Special',
|
strIndentsSpecial: 'Special',
|
||||||
textNoneSpecian: '(none)',
|
textNoneSpecial: '(none)',
|
||||||
textFirstLine: 'First line',
|
textFirstLine: 'First line',
|
||||||
textHanging: 'Hanging',
|
textHanging: 'Hanging',
|
||||||
strIndentsSpecianBy: 'By',
|
strIndentsSpecialBy: 'By',
|
||||||
textCentered: 'Centered',
|
textCentered: 'Centered',
|
||||||
textJustified: 'Justified',
|
textJustified: 'Justified',
|
||||||
textBodyText: 'BodyText',
|
textBodyText: 'BodyText',
|
||||||
|
|
|
@ -1764,11 +1764,11 @@
|
||||||
"DE.Views.ParagraphSettingsAdvanced.textAtLeast": "At least",
|
"DE.Views.ParagraphSettingsAdvanced.textAtLeast": "At least",
|
||||||
"DE.Views.ParagraphSettingsAdvanced.textExact": "Exactly",
|
"DE.Views.ParagraphSettingsAdvanced.textExact": "Exactly",
|
||||||
"DE.Views.ParagraphSettingsAdvanced.strSomeParagraphSpace": "Don't add interval between paragraphs of the same style",
|
"DE.Views.ParagraphSettingsAdvanced.strSomeParagraphSpace": "Don't add interval between paragraphs of the same style",
|
||||||
"DE.Views.ParagraphSettingsAdvanced.strIndentsSpecian": "Special",
|
"DE.Views.ParagraphSettingsAdvanced.strIndentsSpecial": "Special",
|
||||||
"DE.Views.ParagraphSettingsAdvanced.textNoneSpecian": "(none)",
|
"DE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(none)",
|
||||||
"DE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line",
|
"DE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line",
|
||||||
"DE.Views.ParagraphSettingsAdvanced.textHanging": "Hanging",
|
"DE.Views.ParagraphSettingsAdvanced.textHanging": "Hanging",
|
||||||
"DE.Views.ParagraphSettingsAdvanced.strIndentsSpecianBy": "By",
|
"DE.Views.ParagraphSettingsAdvanced.strIndentsSpecialBy": "By",
|
||||||
"DE.Views.ParagraphSettingsAdvanced.textCentered": "Centered",
|
"DE.Views.ParagraphSettingsAdvanced.textCentered": "Centered",
|
||||||
"DE.Views.ParagraphSettingsAdvanced.textJustified": "Justified",
|
"DE.Views.ParagraphSettingsAdvanced.textJustified": "Justified",
|
||||||
"DE.Views.ParagraphSettingsAdvanced.textBodyText": "BodyText",
|
"DE.Views.ParagraphSettingsAdvanced.textBodyText": "BodyText",
|
||||||
|
|
Loading…
Reference in a new issue