[DE] Update footnotes settings.
This commit is contained in:
parent
a2c03c3ea0
commit
6faa69ff4d
|
@ -1996,7 +1996,17 @@ define([
|
|||
if (item.value == 'ins_footnote')
|
||||
this.api.asc_AddFootnote();
|
||||
else if (item.value == 'delele')
|
||||
this.api.deleteFootnotes();
|
||||
Common.UI.warning({
|
||||
msg: this.confirmDeleteFootnotes,
|
||||
buttons: ['yes', 'no'],
|
||||
primary: 'yes',
|
||||
callback: _.bind(function(btn) {
|
||||
if (btn == 'yes') {
|
||||
this.api.deleteFootnotes();
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||
}, this)
|
||||
});
|
||||
else if (item.value == 'settings') {
|
||||
var me = this;
|
||||
(new DE.Views.NoteSettingsDialog({
|
||||
|
@ -3067,7 +3077,8 @@ define([
|
|||
confirmAddFontName: 'The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the device fonts, the saved font will be used when it is available.<br>Do you want to continue?',
|
||||
notcriticalErrorTitle: 'Warning',
|
||||
txtMarginsW: 'Left and right margins are too high for a given page wight',
|
||||
txtMarginsH: 'Top and bottom margins are too high for a given page height'
|
||||
txtMarginsH: 'Top and bottom margins are too high for a given page height',
|
||||
confirmDeleteFootnotes: 'Do you want to delete all footnotes?'
|
||||
|
||||
}, DE.Controllers.Toolbar || {}));
|
||||
});
|
|
@ -50,7 +50,7 @@ define([
|
|||
DE.Views.NoteSettingsDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({
|
||||
options: {
|
||||
contentWidth: 300,
|
||||
height: 335
|
||||
height: 380
|
||||
},
|
||||
|
||||
initialize : function(options) {
|
||||
|
@ -79,7 +79,7 @@ define([
|
|||
'</tr>',
|
||||
'<tr>',
|
||||
'<td colspan=2>',
|
||||
'<div class="separator horizontal padding-large text-only"></div>',
|
||||
'<div class="padding-large text-only"></div>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
|
@ -99,14 +99,20 @@ define([
|
|||
'</td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td colspan=2 class="padding-large">',
|
||||
'<td colspan=2 class="padding-small">',
|
||||
'<label class="input-label">', me.textNumbering, '</label>',
|
||||
'<div id="note-settings-combo-numbering" class="input-group-nr" style="width:140px;"></div>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td colspan=2 class="padding-large">',
|
||||
'<label class="input-label">', me.textCustom, '</label>',
|
||||
'<div id="note-settings-txt-custom"></div>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td colspan=2>',
|
||||
'<div class="separator horizontal padding-large text-only"></div>',
|
||||
'<div class="padding-large text-only"></div>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
|
@ -212,6 +218,18 @@ define([
|
|||
});
|
||||
this.cmbNumbering.setValue(Asc.c_oAscFootnoteRestart.section_footnote_RestartContinuous);
|
||||
|
||||
this.txtCustom = new Common.UI.InputField({
|
||||
el : $('#note-settings-txt-custom'),
|
||||
allowBlank : true,
|
||||
validateOnChange: true,
|
||||
validateOnBlur: false,
|
||||
style : 'width: 100px; vertical-align: middle;',
|
||||
value : ''
|
||||
}).on ('changing', function (input, value) {
|
||||
me.cmbFormat.setDisabled(value.length>0);
|
||||
me.spnStart.setDisabled(value.length>0);
|
||||
});
|
||||
|
||||
this.cmbApply = new Common.UI.ComboBox({
|
||||
el: $('#note-settings-combo-apply'),
|
||||
cls: 'input-group-nr',
|
||||
|
@ -253,6 +271,11 @@ define([
|
|||
this.cmbNumbering.setValue(val);
|
||||
|
||||
/*
|
||||
val = props.get_Custom();
|
||||
this.txtCustom.setValue(val);
|
||||
this.cmbFormat.setDisabled(!_.isEmpty(val));
|
||||
this.spnStart.setDisabled(!_.isEmpty(val));
|
||||
|
||||
val = props.get_ApplyTo();
|
||||
this.cmbApply.setValue(val);
|
||||
*/
|
||||
|
@ -265,13 +288,17 @@ define([
|
|||
props.put_Pos(this.cmbFootnote.getValue());
|
||||
props.put_NumRestart(this.cmbNumbering.getValue());
|
||||
|
||||
var val = this.cmbFormat.getValue();
|
||||
|
||||
props.put_NumFormat(val);
|
||||
// if (val==1)
|
||||
var val = this.txtCustom.getValue();
|
||||
if (_.isEmpty(val)) {
|
||||
val = this.cmbFormat.getValue();
|
||||
props.put_NumFormat(val);
|
||||
// if (val==1)
|
||||
props.put_NumStart(this.spnStart.getNumberValue());
|
||||
// else
|
||||
// props.put_NumStart(this.txtStart.getValue());
|
||||
// else
|
||||
// props.put_NumStart(this.txtStart.getValue());
|
||||
} else {
|
||||
// props.set_Custom(val);
|
||||
}
|
||||
|
||||
// props.put_ApplyTo(this.cmbApply.getValue());
|
||||
|
||||
|
@ -368,7 +395,8 @@ define([
|
|||
textSection: 'Current section',
|
||||
textApply: 'Apply',
|
||||
textInsert: 'Insert',
|
||||
textCancel: 'Cancel'
|
||||
textCancel: 'Cancel',
|
||||
textCustom: 'Custom Mark'
|
||||
|
||||
}, DE.Views.NoteSettingsDialog || {}))
|
||||
});
|
|
@ -1298,7 +1298,6 @@ define([
|
|||
new Common.UI.Menu({
|
||||
items: [
|
||||
{ caption: this.mniInsFootnote, value: 'ins_footnote' },
|
||||
{ caption: this.mniDelFootnote, value: 'delele' },
|
||||
{ caption: '--' },
|
||||
this.mnuGotoFootnote = new Common.UI.MenuItem({
|
||||
template: _.template([
|
||||
|
@ -1314,6 +1313,7 @@ define([
|
|||
stopPropagation: true
|
||||
}),
|
||||
{ caption: '--' },
|
||||
{ caption: this.mniDelFootnote, value: 'delele' },
|
||||
{ caption: this.mniNoteSettings, value: 'settings' }
|
||||
]
|
||||
})
|
||||
|
|
|
@ -302,6 +302,7 @@
|
|||
"DE.Controllers.Statusbar.textTrackChanges": "The document is opened with the Track Changes mode enabled",
|
||||
"DE.Controllers.Statusbar.zoomText": "Zoom {0}%",
|
||||
"DE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
|
||||
"DE.Controllers.Toolbar.confirmDeleteFootnotes": "Do you want to delete all footnotes?",
|
||||
"DE.Controllers.Toolbar.notcriticalErrorTitle": "Warning",
|
||||
"DE.Controllers.Toolbar.textAccent": "Accents",
|
||||
"DE.Controllers.Toolbar.textBracket": "Brackets",
|
||||
|
@ -1133,6 +1134,7 @@
|
|||
"DE.Views.NoteSettingsDialog.textApply": "Apply",
|
||||
"DE.Views.NoteSettingsDialog.textInsert": "Insert",
|
||||
"DE.Views.NoteSettingsDialog.textCancel": "Cancel",
|
||||
"DE.Views.NoteSettingsDialog.textCustom": "Custom Mark",
|
||||
"DE.Views.PageMarginsDialog.cancelButtonText": "Cancel",
|
||||
"DE.Views.PageMarginsDialog.notcriticalErrorTitle": "Warning",
|
||||
"DE.Views.PageMarginsDialog.okButtonText": "Ok",
|
||||
|
|
Loading…
Reference in a new issue