[DE] Line Numbers
This commit is contained in:
parent
83aeabb623
commit
2bbd1e5937
|
@ -79,6 +79,11 @@
|
||||||
<div id="paragraphadv-checkbox-keep-next"></div>
|
<div id="paragraphadv-checkbox-keep-next"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="padding-small">
|
||||||
|
<div id="paragraphadv-checkbox-suppress-line-numbers"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -46,9 +46,9 @@ define([
|
||||||
|
|
||||||
DE.Views.LineNumbersDialog = Common.UI.Window.extend(_.extend({
|
DE.Views.LineNumbersDialog = Common.UI.Window.extend(_.extend({
|
||||||
options: {
|
options: {
|
||||||
width: 300,
|
width: 290,
|
||||||
header: true,
|
header: true,
|
||||||
style: 'min-width: 216px;',
|
style: 'min-width: 290px;',
|
||||||
cls: 'modal-dlg'
|
cls: 'modal-dlg'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -59,16 +59,16 @@ define([
|
||||||
|
|
||||||
this.template = [
|
this.template = [
|
||||||
'<div class="box" style="">',
|
'<div class="box" style="">',
|
||||||
'<div id="line-numbers-add-line-numbering"></div>',
|
'<div id="line-numbers-add-line-numbering" style="margin-bottom: 15px;"></div>',
|
||||||
'<div>',
|
'<div style="margin-bottom: 15px;">',
|
||||||
'<div style="display: inline-block;"><label>' + this.textStartAt + '</label><div id="line-numbers-start-at"></div></div>',
|
'<div style="display: inline-block; margin-right: 9px;"><label>' + this.textStartAt + '</label><div id="line-numbers-start-at"></div></div>',
|
||||||
'<div style="display: inline-block;"><label>' + this.textFromText + '</label><div id="line-numbers-from-text"></div></div>',
|
'<div style="display: inline-block; margin-right: 9px;"><label>' + this.textFromText + '</label><div id="line-numbers-from-text"></div></div>',
|
||||||
'<div style="display: inline-block;"><label>' + this.textCountBy + '</label><div id="line-numbers-count-by"></div></div>',
|
'<div style="display: inline-block;"><label>' + this.textCountBy + '</label><div id="line-numbers-count-by"></div></div>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div><label>' + this.textNumbering + '</label></div>',
|
'<div style="margin-bottom: 8px;"><label>' + this.textNumbering + '</label></div>',
|
||||||
'<div id="line-numbers-restart-each-page"></div>',
|
'<div id="line-numbers-restart-each-page" style="margin-bottom: 8px;"></div>',
|
||||||
'<div id="line-numbers-restart-each-section"></div>',
|
'<div id="line-numbers-restart-each-section" style="margin-bottom: 8px;"></div>',
|
||||||
'<div id="line-numbers-continuous"></div>',
|
'<div id="line-numbers-continuous" style="margin-bottom: 5px;"></div>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="footer center">',
|
'<div class="footer center">',
|
||||||
'<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px;">' + this.okButtonText + '</button>',
|
'<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px;">' + this.okButtonText + '</button>',
|
||||||
|
@ -90,7 +90,15 @@ define([
|
||||||
this.chAddLineNumbering = new Common.UI.CheckBox({
|
this.chAddLineNumbering = new Common.UI.CheckBox({
|
||||||
el: $('#line-numbers-add-line-numbering'),
|
el: $('#line-numbers-add-line-numbering'),
|
||||||
labelText: this.textAddLineNumbering
|
labelText: this.textAddLineNumbering
|
||||||
});
|
}).on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
||||||
|
var checked = field.getValue()!=='checked';
|
||||||
|
this.spnStartAt.setDisabled(checked);
|
||||||
|
this.spnFromText.setDisabled(checked);
|
||||||
|
this.spnCountBy.setDisabled(checked);
|
||||||
|
this.rbRestartEachPage.setDisabled(checked);
|
||||||
|
this.rbRestartEachSection.setDisabled(checked);
|
||||||
|
this.rbContinuous.setDisabled(checked);
|
||||||
|
}, this));
|
||||||
|
|
||||||
this.spnStartAt = new Common.UI.MetricSpinner({
|
this.spnStartAt = new Common.UI.MetricSpinner({
|
||||||
el: $('#line-numbers-start-at'),
|
el: $('#line-numbers-start-at'),
|
||||||
|
@ -107,9 +115,10 @@ define([
|
||||||
step: 0.1,
|
step: 0.1,
|
||||||
width: 80,
|
width: 80,
|
||||||
defaultUnit : 'cm',
|
defaultUnit : 'cm',
|
||||||
value: 0.4,
|
value: 'Auto',
|
||||||
maxValue: 55.87,
|
maxValue: 55.87,
|
||||||
minValue: 0
|
minValue: 0.1,
|
||||||
|
allowAuto: true
|
||||||
});
|
});
|
||||||
this.spinners.push(this.spnFromText);
|
this.spinners.push(this.spnFromText);
|
||||||
|
|
||||||
|
@ -147,6 +156,14 @@ define([
|
||||||
this.updateMetricUnit();
|
this.updateMetricUnit();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
afterRender: function() {
|
||||||
|
this._setDefaults();
|
||||||
|
},
|
||||||
|
|
||||||
|
_setDefaults: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
_handleInput: function(state) {
|
_handleInput: function(state) {
|
||||||
if (this.options.handler) {
|
if (this.options.handler) {
|
||||||
this.options.handler.call(this, this, state);
|
this.options.handler.call(this, this, state);
|
||||||
|
@ -185,7 +202,7 @@ define([
|
||||||
textAddLineNumbering: 'Add line numbering',
|
textAddLineNumbering: 'Add line numbering',
|
||||||
textStartAt: 'Start at',
|
textStartAt: 'Start at',
|
||||||
textFromText: 'From text',
|
textFromText: 'From text',
|
||||||
textCountBy: 'CountBy',
|
textCountBy: 'Count by',
|
||||||
textNumbering: 'Numbering',
|
textNumbering: 'Numbering',
|
||||||
textRestartEachPage: 'Restart Each Page',
|
textRestartEachPage: 'Restart Each Page',
|
||||||
textRestartEachSection: 'Restart Each Section',
|
textRestartEachSection: 'Restart Each Section',
|
||||||
|
|
|
@ -346,6 +346,11 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
}
|
}
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
|
this.chLineNumbers = new Common.UI.CheckBox({
|
||||||
|
el: $('#paragraphadv-checkbox-suppress-line-numbers'),
|
||||||
|
labelText: this.strSuppressLineNumbers
|
||||||
|
});
|
||||||
|
|
||||||
// Borders
|
// Borders
|
||||||
|
|
||||||
this.cmbBorderSize = new Common.UI.ComboBorderSize({
|
this.cmbBorderSize = new Common.UI.ComboBorderSize({
|
||||||
|
@ -1471,7 +1476,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
textLevel: 'Level',
|
textLevel: 'Level',
|
||||||
strIndentsOutlinelevel: 'Outline level',
|
strIndentsOutlinelevel: 'Outline level',
|
||||||
strIndent: 'Indents',
|
strIndent: 'Indents',
|
||||||
strSpacing: 'Spacing'
|
strSpacing: 'Spacing',
|
||||||
|
strSuppressLineNumbers: 'Suppress line numbers'
|
||||||
|
|
||||||
}, DE.Views.ParagraphSettingsAdvanced || {}));
|
}, DE.Views.ParagraphSettingsAdvanced || {}));
|
||||||
});
|
});
|
Loading…
Reference in a new issue