diff --git a/apps/documenteditor/main/app/view/TableOfContentsSettings.js b/apps/documenteditor/main/app/view/TableOfContentsSettings.js index 6ee1a5678..a647c7f55 100644 --- a/apps/documenteditor/main/app/view/TableOfContentsSettings.js +++ b/apps/documenteditor/main/app/view/TableOfContentsSettings.js @@ -67,7 +67,7 @@ define([ '
', '', '', - '
', + '
', '
', '
', '', @@ -112,7 +112,7 @@ define([ '
', '', '', - '', + '', '
', '', '', @@ -278,7 +278,7 @@ define([ step: 1, width: 85, defaultUnit : "", - value: 3, + value: this.endLevel, maxValue: 9, minValue: 1, allowDecimal: false, @@ -442,6 +442,14 @@ define([ this.spnLevels.setValue(new_end>0 ? new_end : '', true); this.spnLevels.setDisabled(disable_outlines || new_start>1 ); + } else { + for (var i=this.startLevel; i<=this.endLevel; i++) { + var rec = _.findWhere(styles, {headerLevel: i}); + if (rec) { + rec.checked = true; + rec.value = i; + } + } } this.stylesLevels.reset(styles); if (this.spnLevels.isDisabled()) { @@ -588,7 +596,7 @@ define([ properties.put_OutlineRange(-1, -1); else properties.put_OutlineRange(1, 9); - // this.api.SetDrawImagePlaceContents('tableofcontents-img', properties); + me.api.SetDrawImagePlaceContents('tableofcontents-img', properties); } });