',
'',
'',
@@ -112,7 +130,7 @@ define([
' | ',
'',
'',
- '',
+ '',
' | ',
'',
'',
@@ -177,6 +195,7 @@ define([
text: '',
lvlIndexes: []
};
+ this.spinners = [];
Common.UI.Window.prototype.initialize.call(this, this.options);
},
@@ -413,6 +432,7 @@ define([
this.cmbLevel = new Common.UI.ComboBox({
el : $window.find('#id-dlg-numbering-format-lvl'),
menuStyle : 'min-width: 100%;',
+ style : "width: 130px;",
editable : false,
cls : 'input-group-nr',
data : [],
@@ -423,7 +443,7 @@ define([
this.spnStart = new Common.UI.MetricSpinner({
el: $window.find('#id-dlg-numbering-spin-start'),
step: 1,
- width: 45,
+ width: 85,
defaultUnit : "",
value: 1,
maxValue: 16383,
@@ -470,6 +490,76 @@ define([
});
this.btnItalic.on('click', _.bind(this.onItalicClick, this));
+ this.spnAlign = new Common.UI.MetricSpinner({
+ el: $window.findById('#id-dlg-numbering-align-at'),
+ step: .1,
+ width: 85,
+ defaultUnit : "cm",
+ defaultValue : 0,
+ value: '0 cm',
+ maxValue: 55.87,
+ minValue: 0
+ });
+ this.spinners.push(this.spnAlign);
+ this.spnAlign.on('change', _.bind(function(field, newValue, oldValue, eOpts){
+ if (this._changedProps) {
+ this._changedProps.put_NumberPosition(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
+ }
+ if (this.api) {
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level, this.type==2);
+ }
+ }, this));
+
+ this.spnIndents = new Common.UI.MetricSpinner({
+ el: $window.findById('#id-dlg-numbering-indent'),
+ step: .1,
+ width: 85,
+ defaultUnit : "cm",
+ defaultValue : 0,
+ value: '0 cm',
+ maxValue: 55.87,
+ minValue: 0
+ });
+ this.spinners.push(this.spnIndents);
+ this.spnIndents.on('change', _.bind(function(field, newValue, oldValue, eOpts){
+ if (this._changedProps) {
+ this._changedProps.put_IndentSize(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
+ }
+ if (this.api) {
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level, this.type==2);
+ }
+ }, this));
+
+ this.cmbFollow = new Common.UI.ComboBox({
+ el : $window.find('#id-dlg-numbering-follow'),
+ menuStyle : 'min-width: 100%;',
+ editable : false,
+ cls : 'input-group-nr',
+ data : [
+ { value: Asc.c_oAscNumberingSuff.Tab, displayValue: this.textTab },
+ { value: Asc.c_oAscNumberingSuff.Space, displayValue: this.textSpace },
+ { value: Asc.c_oAscNumberingSuff.None, displayValue: this.txtNone }
+ ],
+ takeFocusOnClose: true
+ });
+ this.cmbFollow.on('selected', _.bind(function (combo, record) {
+ if (this._changedProps)
+ this._changedProps.put_Suff(record.value);
+ if (this.api) {
+ this.api.SetDrawImagePreviewBullet('bulleted-list-preview', this.props, this.level, this.type==2);
+ }
+ }, this));
+
+ this.chRestart = new Common.UI.CheckBox({
+ el: $window.find('#id-dlg-numbering-restart'),
+ labelText: this.txtRestart
+ });
+ this.chRestart.on('change', _.bind(function(field, newValue, oldValue, eOpts){
+ if (this._changedProps) {
+ this._changedProps.put_Restart(field.getValue()=='checked' ? -1 : 0);
+ }
+ }, this));
+
this.on('animate:after', _.bind(this.onAnimateAfter, this));
this.afterRender();
@@ -493,6 +583,7 @@ define([
this.cmbFonts.fillFonts(this.fontStore);
this.cmbFonts.selectRecord(this.fontStore.findWhere({name: this.fontName}));
+ this.updateMetricUnit();
this.updateThemeColors();
this._setDefaults(this.props);
var me = this;
@@ -505,6 +596,16 @@ define([
});
},
+ updateMetricUnit: function() {
+ if (this.spinners) {
+ for (var i=0; i0) {
if (format == Asc.c_oAscNumberingFormat.Bullet) {
if (!this.cmbFormat.store.findWhere({value: Asc.c_oAscNumberingFormat.Bullet, symbol: this.bulletProps.symbol, font: this.bulletProps.font}))
@@ -714,6 +820,7 @@ define([
this.cmbFonts.setDisabled(format == Asc.c_oAscNumberingFormat.Bullet);
this.btnBold.setDisabled(format == Asc.c_oAscNumberingFormat.Bullet);
this.btnItalic.setDisabled(format == Asc.c_oAscNumberingFormat.Bullet);
+ this.chRestart.setDisabled(this.level===0);
var arr = [];
var me = this;
@@ -950,7 +1057,13 @@ define([
txtStart: 'Start at',
txtFontName: 'Font',
textBold: 'Bold',
- textItalic: 'Italic'
+ textItalic: 'Italic',
+ textTab: 'Tab character',
+ textSpace: 'Space',
+ txtAlignAt: 'Align at',
+ txtIndent: 'Text Indent',
+ txtFollow: 'Follow number with',
+ txtRestart: 'Restart list'
}, DE.Views.ListSettingsDialog || {}))
});
\ No newline at end of file
|