',
'
',
'
',
@@ -90,13 +92,28 @@ define([
'',
'',
'',
+ '<% if (type == 1) { %>',
+ '',
+ '',
+ '',
+ '<% } else { %>',
'',
'',
'',
+ '<% } %>',
' | ',
'
',
'',
'',
+ '<% if (type == 1) { %>',
+ '',
+ '',
+ '',
+ '<% } else { %>',
'',
' ',
' ',
@@ -110,6 +127,7 @@ define([
'',
' |
',
'
',
+ '<% } %>',
'',
'
',
'',
@@ -127,6 +145,7 @@ define([
this.api = options.api;
this.handler = options.handler;
this.props = options.props;
+ this.type = options.type || 0; // 0 - TOC, 1 - TOF
this.startLevel = 1;
this.endLevel = 3;
this._noApply = true;
@@ -145,17 +164,18 @@ define([
value: 'checked'
});
this.chPages.on('change', _.bind(function(field, newValue, oldValue, eOpts){
- var checked = (field.getValue()=='checked');
- this.chAlign.setDisabled(!checked);
- this.cmbLeader.setDisabled(!checked);
+ var checked = (field.getValue()=='checked'),
+ centered = (this.type==1) && (this.cmbStyles.getValue()==Asc.c_oAscTOFStylesType.Centered);
+ this.chAlign.setDisabled(!checked || centered);
+ this.cmbLeader.setDisabled(!checked || centered);
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
properties.put_ShowPageNumbers(checked);
- if (checked) {
+ if (checked && !centered) {
properties.put_RightAlignTab(this.chAlign.getValue() == 'checked');
properties.put_TabLeader(this.cmbLeader.getValue());
}
- this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
+ (this.type==1) ? this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', properties) : this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
this.scrollerY.update();
}
}, this));
@@ -174,7 +194,7 @@ define([
if (checked) {
properties.put_TabLeader(this.cmbLeader.getValue());
}
- this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
+ (this.type==1) ? this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', properties) : this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
this.scrollerY.update();
}
}, this));
@@ -197,7 +217,7 @@ define([
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
properties.put_TabLeader(record.value);
- this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
+ (this.type==1) ? this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', properties) : this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
this.scrollerY.update();
}
}, this));
@@ -211,121 +231,208 @@ define([
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
properties.put_Hyperlink(field.getValue()=='checked');
- this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
+ (this.type==1) ? this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', properties) : this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
this.scrollerY.update();
}
}, this));
- this.radioLevels = new Common.UI.RadioBox({
- el: $('#tableofcontents-radio-levels'),
- labelText: this.textRadioLevels,
- name: 'asc-radio-content-build',
- checked: true
- });
- this.radioLevels.on('change', _.bind(function(field, newValue, eOpts) {
- if (newValue) {
- this.levelsContainer.toggleClass('hidden', !newValue);
- this.stylesContainer.toggleClass('hidden', newValue);
- if (this._needUpdateOutlineLevels)
- this.synchronizeLevelsFromStyles();
- }
- }, this));
+ if (this.type==1) {
+ this.radioCaption = new Common.UI.RadioBox({
+ el: $('#tableofcontents-radio-caption'),
+ labelText: this.textRadioCaption,
+ name: 'asc-radio-content-tof-build',
+ checked: true
+ });
+ this.radioCaption.on('change', _.bind(function(field, newValue, eOpts) {
+ if (newValue) {
+ this.captionContainer.toggleClass('hidden', !newValue);
+ this.styleContainer.toggleClass('hidden', newValue);
+ this.changeCaption(this.cmbCaptions.getSelectedRecord());
+ this.disableButtons();
+ }
+ }, this));
- this.radioStyles = new Common.UI.RadioBox({
- el: $('#tableofcontents-radio-styles'),
- labelText: this.textRadioStyles,
- name: 'asc-radio-content-build'
- });
- this.radioStyles.on('change', _.bind(function(field, newValue, eOpts) {
- if (newValue) {
- this.stylesContainer.toggleClass('hidden', !newValue);
- this.levelsContainer.toggleClass('hidden', newValue);
- if (this._needUpdateStyles)
- this.synchronizeLevelsFromOutline();
- this.stylesList.scroller.update({alwaysVisibleY: true});
- setTimeout(function(){
- var rec = me.stylesLevels.findWhere({checked: true});
- if (rec)
- me.stylesList.scrollToRecord(rec);
- }, 10);
- }
- }, this));
+ this.radioStyle = new Common.UI.RadioBox({
+ el: $('#tableofcontents-radio-style'),
+ labelText: this.textRadioStyle,
+ name: 'asc-radio-content-tof-build'
+ });
+ this.radioStyle.on('change', _.bind(function(field, newValue, eOpts) {
+ if (newValue) {
+ this.styleContainer.toggleClass('hidden', !newValue);
+ this.captionContainer.toggleClass('hidden', newValue);
+ this.changeTOFStyle(this.cmbTOFStyles.getSelectedRecord());
+ this.disableButtons();
+ }
+ }, this));
+ this.cmbCaptions = new Common.UI.ComboBox({
+ el: $('#tableofcontents-combo-captions'),
+ cls: 'input-group-nr',
+ menuStyle: 'min-width: 100%;max-height: 233px;',
+ editable: false,
+ data: []
+ });
+ this.cmbCaptions.on('selected', _.bind(function(combo, record) {
+ this.changeCaption(record);
+ this.disableButtons();
+ }, this));
+
+ this.cmbTOFStyles = new Common.UI.ComboBox({
+ el: $('#tableofcontents-combo-tof-styles'),
+ cls: 'input-group-nr',
+ menuStyle: 'min-width: 100%;max-height: 233px;',
+ editable: false,
+ data: []
+ });
+ this.cmbTOFStyles.on('selected', _.bind(function(combo, record) {
+ this.changeTOFStyle(record);
+ }, this));
+
+ this.chFullCaption = new Common.UI.CheckBox({
+ el: $('#tableofcontents-chb-full-caption'),
+ labelText: this.strFullCaption,
+ value: 'checked'
+ });
+ this.chFullCaption.on('change', _.bind(function(field, newValue, oldValue, eOpts){
+ if (this.api && !this._noApply) {
+ var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
+ properties.put_IncludeLabelAndNumber(field.getValue()=='checked');
+ this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', properties);
+ this.scrollerY.update();
+ }
+ }, this));
+
+ this.captionContainer = $('#tableofcontents-tof-from-caption');
+ this.styleContainer = $('#tableofcontents-tof-from-style');
+ } else {
+ this.radioLevels = new Common.UI.RadioBox({
+ el: $('#tableofcontents-radio-levels'),
+ labelText: this.textRadioLevels,
+ name: 'asc-radio-content-build',
+ checked: true
+ });
+ this.radioLevels.on('change', _.bind(function(field, newValue, eOpts) {
+ if (newValue) {
+ this.levelsContainer.toggleClass('hidden', !newValue);
+ this.stylesContainer.toggleClass('hidden', newValue);
+ if (this._needUpdateOutlineLevels)
+ this.synchronizeLevelsFromStyles();
+ }
+ }, this));
+
+ this.radioStyles = new Common.UI.RadioBox({
+ el: $('#tableofcontents-radio-styles'),
+ labelText: this.textRadioStyles,
+ name: 'asc-radio-content-build'
+ });
+ this.radioStyles.on('change', _.bind(function(field, newValue, eOpts) {
+ if (newValue) {
+ this.stylesContainer.toggleClass('hidden', !newValue);
+ this.levelsContainer.toggleClass('hidden', newValue);
+ if (this._needUpdateStyles)
+ this.synchronizeLevelsFromOutline();
+ this.stylesList.scroller.update({alwaysVisibleY: true});
+ setTimeout(function(){
+ var rec = me.stylesLevels.findWhere({checked: true});
+ if (rec)
+ me.stylesList.scrollToRecord(rec);
+ }, 10);
+ }
+ }, this));
+ this.spnLevels = new Common.UI.CustomSpinner({
+ el: $('#tableofcontents-spin-levels'),
+ step: 1,
+ width: 85,
+ defaultUnit : "",
+ value: this.endLevel,
+ maxValue: 9,
+ minValue: 1,
+ allowDecimal: false,
+ maskExp: /[1-9]/
+ });
+ this.spnLevels.on('change', _.bind(function(field, newValue, oldValue, eOpts){
+ this._needUpdateStyles = true;
+ this.startLevel = 1;
+ this.endLevel = field.getNumberValue();
+
+ if (this.api && !this._noApply) {
+ var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
+ properties.clear_Styles();
+ properties.put_OutlineRange(this.startLevel, this.endLevel);
+ this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
+ this.scrollerY.update();
+ }
+ }, this));
+
+ this.stylesLevels = new Common.UI.DataViewStore();
+
+ if (this.stylesLevels) {
+ this.stylesList = new Common.UI.ListView({
+ el: $('#tableofcontents-styles-list', this.$window),
+ store: this.stylesLevels,
+ simpleAddMode: true,
+ showLast: false,
+ template: _.template([''].join('')),
+ itemTemplate: _.template([
+ '',
+ ' <%= name %> ',
+ ' ',
+ ' '
+ ].join(''))
+ });
+ this.stylesList.on('item:change', _.bind(this.onItemChange, this));
+ this.stylesList.on('item:add', _.bind(this.addEvents, this));
+ }
+
+ this.levelsContainer = $('#tableofcontents-from-levels');
+ this.stylesContainer = $('#tableofcontents-from-styles');
+ }
+
+ var arr = (this.type==1) ? [
+ { displayValue: this.txtCurrent, value: Asc.c_oAscTOFStylesType.Current },
+ { displayValue: this.txtSimple, value: Asc.c_oAscTOFStylesType.Simple },
+ { displayValue: this.txtOnline, value: Asc.c_oAscTOFStylesType.Web },
+ { displayValue: this.txtClassic, value: Asc.c_oAscTOFStylesType.Classic },
+ { displayValue: this.txtDistinctive, value: Asc.c_oAscTOFStylesType.Distinctive },
+ { displayValue: this.txtCentered, value: Asc.c_oAscTOFStylesType.Centered },
+ { displayValue: this.txtFormal, value: Asc.c_oAscTOFStylesType.Formal }
+ ] : [
+ { displayValue: this.txtCurrent, value: Asc.c_oAscTOCStylesType.Current },
+ { displayValue: this.txtSimple, value: Asc.c_oAscTOCStylesType.Simple },
+ { displayValue: this.txtOnline, value: Asc.c_oAscTOCStylesType.Web },
+ { displayValue: this.txtStandard, value: Asc.c_oAscTOCStylesType.Standard },
+ { displayValue: this.txtModern, value: Asc.c_oAscTOCStylesType.Modern },
+ { displayValue: this.txtClassic, value: Asc.c_oAscTOCStylesType.Classic }
+ ];
this.cmbStyles = new Common.UI.ComboBox({
el: $('#tableofcontents-combo-styles'),
cls: 'input-group-nr',
menuStyle: 'min-width: 95px;',
editable: false,
- data: [
- { displayValue: this.txtCurrent, value: Asc.c_oAscTOCStylesType.Current },
- { displayValue: this.txtSimple, value: Asc.c_oAscTOCStylesType.Simple },
- { displayValue: this.txtOnline, value: Asc.c_oAscTOCStylesType.Web },
- { displayValue: this.txtStandard, value: Asc.c_oAscTOCStylesType.Standard },
- { displayValue: this.txtModern, value: Asc.c_oAscTOCStylesType.Modern },
- { displayValue: this.txtClassic, value: Asc.c_oAscTOCStylesType.Classic }
- ]
+ data: arr
});
- this.cmbStyles.setValue(Asc.c_oAscTOCStylesType.Current);
+ this.cmbStyles.setValue(this.type==1 ? Asc.c_oAscTOFStylesType.Current : Asc.c_oAscTOCStylesType.Current);
this.cmbStyles.on('selected', _.bind(function(combo, record) {
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
properties.put_StylesType(record.value);
- this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
+ if (this.type==1) {
+ var checked = (record.value!==Asc.c_oAscTOFStylesType.Centered);
+ this.chAlign.setValue(checked, true);
+ this.chAlign.setDisabled(!checked);
+ this.cmbLeader.setDisabled(!checked);
+ properties.put_RightAlignTab(checked);
+ checked && properties.put_TabLeader(this.cmbLeader.getValue());
+ }
+ (this.type==1) ? this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', properties) : this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
this.scrollerY.update();
}
}, this));
- this.spnLevels = new Common.UI.CustomSpinner({
- el: $('#tableofcontents-spin-levels'),
- step: 1,
- width: 85,
- defaultUnit : "",
- value: this.endLevel,
- maxValue: 9,
- minValue: 1,
- allowDecimal: false,
- maskExp: /[1-9]/
- });
- this.spnLevels.on('change', _.bind(function(field, newValue, oldValue, eOpts){
- this._needUpdateStyles = true;
- this.startLevel = 1;
- this.endLevel = field.getNumberValue();
-
- if (this.api && !this._noApply) {
- var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
- properties.clear_Styles();
- properties.put_OutlineRange(this.startLevel, this.endLevel);
- this.api.SetDrawImagePlaceContents('tableofcontents-img', properties);
- this.scrollerY.update();
- }
- }, this));
-
- this.stylesLevels = new Common.UI.DataViewStore();
-
- if (this.stylesLevels) {
- this.stylesList = new Common.UI.ListView({
- el: $('#tableofcontents-styles-list', this.$window),
- store: this.stylesLevels,
- simpleAddMode: true,
- showLast: false,
- template: _.template([''].join('')),
- itemTemplate: _.template([
- '',
- ' <%= name %> ',
- ' ',
- ' '
- ].join(''))
- });
- this.stylesList.on('item:change', _.bind(this.onItemChange, this));
- this.stylesList.on('item:add', _.bind(this.addEvents, this));
- }
-
- this.levelsContainer = $('#tableofcontents-from-levels');
- this.stylesContainer = $('#tableofcontents-from-styles');
-
this.scrollerY = new Common.UI.Scroller({
el: this.$window.find('#tableofcontents-img').parent(),
minScrollbarLength : 20
@@ -333,6 +440,10 @@ define([
this.scrollerY.update();
this.scrollerY.scrollTop(0);
+ this.btnOk = new Common.UI.Button({
+ el: this.$window.find('.primary')
+ });
+
this.afterRender();
},
@@ -345,7 +456,7 @@ define([
},
close: function() {
- this.api.SetDrawImagePlaceContents(null);
+ (this.type==1) ? this.api.SetDrawImagePlaceTableOfFigures(null) : this.api.SetDrawImagePlaceContents(null);
this.scrollerY.update();
Common.Views.AdvancedSettingsWindow.prototype.close.apply(this);
},
@@ -353,24 +464,6 @@ define([
_setDefaults: function (props) {
this._noApply = true;
- var me = this,
- docStyles = this.api.asc_GetStylesArray(),
- styles = [],
- checkStyles = false;
- _.each(docStyles, function (style) {
- var name = style.get_Name(),
- level = me.api.asc_GetHeadingLevel(name);
- if (style.get_QFormat() || level>=0) {
- styles.push({
- name: name,
- allowSelected: false,
- checked: false,
- value: '',
- headerLevel: (level>=0) ? level+1 : -1 // -1 if is not header
- });
- }
- });
-
if (props) {
var value = props.get_Hyperlink();
this.chLinks.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true);
@@ -385,8 +478,55 @@ define([
value = props.get_TabLeader();
(value!==undefined) && this.cmbLeader.setValue(value);
}
+ } else {
+ (this.type==1) && (this.cmbStyles.getValue()==Asc.c_oAscTOFStylesType.Centered) && this.chAlign.setValue(false);
}
+ }
+ (this.type==1) ? this.fillTOFProps(props) : this.fillTOCProps(props);
+
+ // Show Pages is always true when window is opened
+ this._originalProps = (props) ? props : new Asc.CTableOfContentsPr();
+ if (!props) {
+ if (this.type==1) {
+ this._originalProps.put_Caption(this.textFigure);
+ this._originalProps.put_IncludeLabelAndNumber(this.chFullCaption.getValue() == 'checked');
+ } else {
+ this._originalProps.put_OutlineRange(this.startLevel, this.endLevel);
+ }
+ this._originalProps.put_Hyperlink(this.chLinks.getValue() == 'checked');
+ this._originalProps.put_ShowPageNumbers(this.chPages.getValue() == 'checked');
+ if (this.chPages.getValue() == 'checked') {
+ this._originalProps.put_RightAlignTab(this.chAlign.getValue() == 'checked');
+ this._originalProps.put_TabLeader(this.cmbLeader.getValue());
+ }
+ }
+
+ (this.type==1) ? this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', this._originalProps) : this.api.SetDrawImagePlaceContents('tableofcontents-img', this._originalProps);
+ this.scrollerY.update();
+
+ this._noApply = false;
+ },
+
+ fillTOCProps: function(props) {
+ var me = this,
+ docStyles = this.api.asc_GetStylesArray(),
+ styles = [],
+ checkStyles = false;
+ _.each(docStyles, function (style) {
+ var name = style.get_Name(),
+ level = me.api.asc_GetHeadingLevel(name);
+ if (style.get_QFormat() || level>=0) {
+ styles.push({
+ name: name,
+ allowSelected: false,
+ checked: false,
+ value: '',
+ headerLevel: (level>=0) ? level+1 : -1 // -1 if is not header
+ });
+ }
+ });
+ if (props) {
var start = props.get_OutlineStart(),
end = props.get_OutlineEnd(),
count = props.get_StylesCount();
@@ -483,23 +623,62 @@ define([
if (rec)
this.stylesList.scrollToRecord(rec);
}
+ },
- // Show Pages is always true when window is opened
- this._originalProps = (props) ? props : new Asc.CTableOfContentsPr();
- if (!props) {
- this._originalProps.put_OutlineRange(this.startLevel, this.endLevel);
- this._originalProps.put_Hyperlink(this.chLinks.getValue() == 'checked');
- this._originalProps.put_ShowPageNumbers(this.chPages.getValue() == 'checked');
- if (this.chPages.getValue() == 'checked') {
- this._originalProps.put_RightAlignTab(this.chAlign.getValue() == 'checked');
- this._originalProps.put_TabLeader(this.cmbLeader.getValue());
+ fillTOFProps: function(props) {
+ var me = this,
+ isCaption = true;
+ var arr = Common.Utils.InternalSettings.get("de-settings-captions");
+ if (arr==null || arr==undefined) {
+ arr = Common.localStorage.getItem("de-settings-captions") || '';
+ Common.Utils.InternalSettings.set("de-settings-captions", arr);
+ }
+ arr = arr ? JSON.parse(arr) : [];
+
+ // 0 - not removable
+ arr = arr.concat([{ value: this.textEquation, displayValue: this.textEquation },
+ { value: this.textFigure, displayValue: this.textFigure },
+ { value: this.textTable, displayValue: this.textTable }
+ ]);
+ arr.sort(function(a,b){
+ var sa = a.displayValue.toLowerCase(),
+ sb = b.displayValue.toLowerCase();
+ return sa>sb ? 1 : (sa0) && this.cmbCaptions.setValue(value ? value : this.textFigure);
+
+ arr = [];
+ _.each(this.api.asc_getAllUsedParagraphStyles(), function (style, index) {
+ var name = style.get_Name();
+ arr.push({
+ displayValue: name,
+ value: index
+ });
+ });
+ this.cmbTOFStyles.setData(arr);
+ value = undefined;
+ if (props) {
+ var count = props.get_StylesCount();
+ if (count>0) {
+ var rec = this.cmbTOFStyles.store.findWhere({displayValue: props.get_StyleName(0)});
+ rec && (value = rec.get('value'));
}
}
+ (arr.length>0) && this.cmbTOFStyles.setValue(value ? value : arr[0].value);
- this.api.SetDrawImagePlaceContents('tableofcontents-img', this._originalProps);
- this.scrollerY.update();
-
- this._noApply = false;
+ if (props) {
+ value = props.get_IncludeLabelAndNumber();
+ this.chFullCaption.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true);
+ }
+ !isCaption && this.radioStyle.setValue(true);
},
synchronizeLevelsFromOutline: function() {
@@ -574,15 +753,25 @@ define([
props.put_StylesType(this.cmbStyles.getValue());
props.clear_Styles();
- if (this._needUpdateOutlineLevels) {
- this.synchronizeLevelsFromStyles();
+ if (this.type==1) {
+ if (this.radioCaption.getValue()) {
+ props.put_Caption(this.cmbCaptions.getValue());
+ } else {
+ props.put_Caption(null);
+ var rec = this.cmbTOFStyles.getSelectedRecord();
+ rec && props.add_Style(rec.displayValue);
+ }
+ } else {
+ if (this._needUpdateOutlineLevels) {
+ this.synchronizeLevelsFromStyles();
+ }
+ if (!this._needUpdateStyles) // if this._needUpdateStyles==true - fill only OutlineRange
+ this.stylesLevels.each(function (style) {
+ if (style.get('checked'))
+ props.add_Style(style.get('name'), style.get('value'));
+ });
+ props.put_OutlineRange(this.startLevel, this.endLevel);
}
- if (!this._needUpdateStyles) // if this._needUpdateStyles==true - fill only OutlineRange
- this.stylesLevels.each(function (style) {
- if (style.get('checked'))
- props.add_Style(style.get('name'), style.get('value'));
- });
- props.put_OutlineRange(this.startLevel, this.endLevel);
return props;
},
@@ -633,6 +822,51 @@ define([
}, 10);
},
+ changeCaption: function(record) {
+ if (this.api && !this._noApply && record) {
+ var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
+ properties.put_Caption(record.value);
+ properties.clear_Styles();
+ this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', properties);
+ this.scrollerY.update();
+ }
+ },
+
+ changeTOFStyle: function(record) {
+ if (this.api && !this._noApply) {
+ var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr();
+ properties.put_Caption(null);
+ properties.clear_Styles();
+ properties.add_Style(record.displayValue);
+ this.api.SetDrawImagePlaceTableOfFigures('tableofcontents-img', properties);
+ this.scrollerY.update();
+ }
+ },
+
+ disableButtons: function() {
+ this.type && this.btnOk.setDisabled(this.radioCaption.getValue() && this.cmbCaptions.getValue()===null || this.radioStyle.getValue() && this.cmbTOFStyles.length<1);
+ },
+
+ onDlgBtnClick: function(event) {
+ this._handleInput(event.currentTarget.attributes['result'].value);
+ },
+
+ onPrimary: function() {
+ this._handleInput('ok');
+ return false;
+ },
+
+ _handleInput: function(state) {
+ if (this.handler) {
+ if (state == 'ok' && this.btnOk.isDisabled()) {
+ return;
+ }
+ this.handler.call(this, state, this.getSettings());
+ }
+
+ this.close();
+ },
+
textTitle: 'Table of Contents',
textLeader: 'Leader',
textBuildTable: 'Build table of contents from',
@@ -651,7 +885,18 @@ define([
txtStandard: 'Standard',
txtModern: 'Modern',
txtClassic: 'Classic',
- txtOnline: 'Online'
+ txtOnline: 'Online',
+ textTitleTOF: 'Table of Figures',
+ textBuildTableOF: 'Build table of figures from',
+ textRadioCaption: 'Caption',
+ textRadioStyle: 'Style',
+ strFullCaption: 'Include label and number',
+ textEquation: 'Equation',
+ textFigure: 'Figure',
+ textTable: 'Table',
+ txtDistinctive: 'Distinctive',
+ txtCentered: 'Centered',
+ txtFormal: 'Formal'
}, DE.Views.TableOfContentsSettings || {}))
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index f12db8c83..07cc75df4 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -1845,6 +1845,11 @@
"DE.Views.Links.textSwapNotes": "Swap Footnotes and Endnotes",
"DE.Views.Links.capBtnCrossRef": "Cross-reference",
"DE.Views.Links.tipCrossRef": "Insert cross-reference",
+ "DE.Views.Links.capBtnTOF": "Table of Figures",
+ "DE.Views.Links.tipTableFiguresUpdate": "Refresh table of figures",
+ "DE.Views.Links.tipTableFigures": "Insert table of figures",
+ "DE.Views.Links.confirmReplaceTOF": "Do you want to replace the selected table of figures?",
+ "DE.Views.Links.titleUpdateTOF": "Refresh Table of Figures",
"DE.Views.ListSettingsDialog.textAuto": "Automatic",
"DE.Views.ListSettingsDialog.textCenter": "Center",
"DE.Views.ListSettingsDialog.textLeft": "Left",
@@ -2178,6 +2183,17 @@
"DE.Views.TableOfContentsSettings.txtOnline": "Online",
"DE.Views.TableOfContentsSettings.txtSimple": "Simple",
"DE.Views.TableOfContentsSettings.txtStandard": "Standard",
+ "DE.Views.TableOfContentsSettings.textTitleTOF": "Table of Figures",
+ "DE.Views.TableOfContentsSettings.textBuildTableOF": "Build table of figures from",
+ "DE.Views.TableOfContentsSettings.textRadioCaption": "Caption",
+ "DE.Views.TableOfContentsSettings.textRadioStyle": "Style",
+ "DE.Views.TableOfContentsSettings.strFullCaption": "Include label and number",
+ "DE.Views.TableOfContentsSettings.textEquation": "Equation",
+ "DE.Views.TableOfContentsSettings.textFigure": "Figure",
+ "DE.Views.TableOfContentsSettings.textTable": "Table",
+ "DE.Views.TableOfContentsSettings.txtDistinctive": "Distinctive",
+ "DE.Views.TableOfContentsSettings.txtCentered": "Centered",
+ "DE.Views.TableOfContentsSettings.txtFormal": "Formal",
"DE.Views.TableSettings.deleteColumnText": "Delete Column",
"DE.Views.TableSettings.deleteRowText": "Delete Row",
"DE.Views.TableSettings.deleteTableText": "Delete Table",
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.25x/btn-contents.png b/apps/documenteditor/main/resources/img/toolbar/1.25x/btn-contents.png
new file mode 100644
index 000000000..58facd92d
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1.25x/btn-contents.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.25x/btn-update.png b/apps/documenteditor/main/resources/img/toolbar/1.25x/btn-update.png
new file mode 100644
index 000000000..fd47a2aaf
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1.25x/btn-update.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.5x/btn-contents.png b/apps/documenteditor/main/resources/img/toolbar/1.5x/btn-contents.png
new file mode 100644
index 000000000..739972e83
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1.5x/btn-contents.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.5x/btn-update.png b/apps/documenteditor/main/resources/img/toolbar/1.5x/btn-update.png
new file mode 100644
index 000000000..eb08de174
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1.5x/btn-update.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-contents.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-contents.png
new file mode 100644
index 000000000..473dde698
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-contents.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-update.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-update.png
new file mode 100644
index 000000000..9a59f7706
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-update.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1x/btn-contents.png b/apps/documenteditor/main/resources/img/toolbar/1x/btn-contents.png
new file mode 100644
index 000000000..848629378
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1x/btn-contents.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1x/btn-update.png b/apps/documenteditor/main/resources/img/toolbar/1x/btn-update.png
new file mode 100644
index 000000000..736222872
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1x/btn-update.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/2x/btn-contents.png b/apps/documenteditor/main/resources/img/toolbar/2x/btn-contents.png
new file mode 100644
index 000000000..d45fb5bba
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/2x/btn-contents.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/2x/btn-update.png b/apps/documenteditor/main/resources/img/toolbar/2x/btn-update.png
new file mode 100644
index 000000000..f7e5e17f7
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/2x/btn-update.png differ
|