[SSE] Change control for Number Format.

This commit is contained in:
Julia Radzhabova 2017-01-12 17:14:51 +03:00
parent 54c8d379ac
commit 56fbd1e085
3 changed files with 245 additions and 214 deletions

View file

@ -101,7 +101,9 @@ define([
namedrange_locked: false, namedrange_locked: false,
fontsize: undefined, fontsize: undefined,
multiselect: false, multiselect: false,
sparklines_disabled: false sparklines_disabled: false,
numformattype: undefined,
langId: 0x0409
}; };
var checkInsertAutoshape = function(e, action) { var checkInsertAutoshape = function(e, action) {
@ -252,19 +254,14 @@ define([
if (toolbar.mnuZoomOut) toolbar.mnuZoomOut.on('click', _.bind(this.onZoomOutClick, this)); if (toolbar.mnuZoomOut) toolbar.mnuZoomOut.on('click', _.bind(this.onZoomOutClick, this));
if (toolbar.btnShowMode.rendered) toolbar.btnShowMode.menu.on('item:click', _.bind(this.onHideMenu, this)); if (toolbar.btnShowMode.rendered) toolbar.btnShowMode.menu.on('item:click', _.bind(this.onHideMenu, this));
toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this)); toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this));
if (toolbar.btnNumberFormat.rendered) toolbar.btnNumberFormat.menu.on('item:click', _.bind(this.onNumberFormatMenu, this)); toolbar.cmbNumberFormat.on('selected', _.bind(this.onNumberFormatSelect, this));
toolbar.cmbNumberFormat.on('show:before', _.bind(this.onNumberFormatOpenBefore, this, true));
toolbar.btnCurrencyStyle.menu.on('item:click', _.bind(this.onNumberFormatMenu, this)); toolbar.btnCurrencyStyle.menu.on('item:click', _.bind(this.onNumberFormatMenu, this));
if (toolbar.mnuitemCompactToolbar) toolbar.mnuitemCompactToolbar.on('toggle', _.bind(this.onChangeViewMode, this)); if (toolbar.mnuitemCompactToolbar) toolbar.mnuitemCompactToolbar.on('toggle', _.bind(this.onChangeViewMode, this));
$('#id-toolbar-menu-new-fontcolor').on('click', _.bind(this.onNewTextColor, this)); $('#id-toolbar-menu-new-fontcolor').on('click', _.bind(this.onNewTextColor, this));
$('#id-toolbar-menu-new-paracolor').on('click', _.bind(this.onNewBackColor, this)); $('#id-toolbar-menu-new-paracolor').on('click', _.bind(this.onNewBackColor, this));
$('#id-toolbar-menu-new-bordercolor').on('click', _.bind(this.onNewBorderColor, this)); $('#id-toolbar-menu-new-bordercolor').on('click', _.bind(this.onNewBorderColor, this));
_.each(toolbar.btnNumberFormat.menu.items, function(item) {
if (item.menu) {
item.menu.on('item:click', _.bind(me.onNumberFormatMenu, me));
}
});
this.onSetupCopyStyleButton(); this.onSetupCopyStyleButton();
}, },
@ -885,6 +882,26 @@ define([
Common.component.Analytics.trackEvent('ToolBar', 'Number Format'); Common.component.Analytics.trackEvent('ToolBar', 'Number Format');
}, },
onNumberFormatSelect: function(combo, record) {
if (this.api)
this.api.asc_setCellFormat(record.format);
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Number Format');
},
onNumberFormatOpenBefore: function(combo) {
if (this.api) {
var me = this,
info = me.api.asc_getCellInfo();
me.toolbar.numFormatData.forEach( function(item, index) {
item.exampleval = me.api.asc_getLocaleExample2(item.format, info.asc_getText(), me._state.langId);
});
me.toolbar.cmbNumberFormat.setData(me.toolbar.numFormatData);
me.toolbar.cmbNumberFormat.setValue(me._state.numformattype, me.toolbar.txtCustom);
}
},
onDecrement: function(btn) { onDecrement: function(btn) {
if (this.api) if (this.api)
this.api.asc_decreaseCellDigitNumbers(); this.api.asc_decreaseCellDigitNumbers();
@ -1459,7 +1476,7 @@ define([
var toolbar = this.toolbar; var toolbar = this.toolbar;
if (toolbar.mode.isEditDiagram || toolbar.mode.isEditMailMerge) { if (toolbar.mode.isEditDiagram || toolbar.mode.isEditMailMerge) {
is_cell_edited = (state == Asc.c_oAscCellEditorState.editStart); is_cell_edited = (state == Asc.c_oAscCellEditorState.editStart);
toolbar.lockToolbar(SSE.enumLock.editCell, state == Asc.c_oAscCellEditorState.editStart, {array: [toolbar.btnDecDecimal,toolbar.btnIncDecimal,toolbar.btnNumberFormat]}); toolbar.lockToolbar(SSE.enumLock.editCell, state == Asc.c_oAscCellEditorState.editStart, {array: [toolbar.btnDecDecimal,toolbar.btnIncDecimal,toolbar.cmbNumberFormat]});
} else } else
if (state == Asc.c_oAscCellEditorState.editStart || state == Asc.c_oAscCellEditorState.editEnd) { if (state == Asc.c_oAscCellEditorState.editStart || state == Asc.c_oAscCellEditorState.editEnd) {
toolbar.lockToolbar(SSE.enumLock.editCell, state == Asc.c_oAscCellEditorState.editStart, { toolbar.lockToolbar(SSE.enumLock.editCell, state == Asc.c_oAscCellEditorState.editStart, {
@ -1871,12 +1888,11 @@ define([
toolbar.lockToolbar(SSE.enumLock.multiselect, this._state.multiselect, { array: [toolbar.btnTableTemplate, toolbar.btnInsertHyperlink]}); toolbar.lockToolbar(SSE.enumLock.multiselect, this._state.multiselect, { array: [toolbar.btnTableTemplate, toolbar.btnInsertHyperlink]});
} }
fontparam = toolbar.numFormatTypes[info.asc_getNumFormatType()]; val = info.asc_getNumFormatType();
if (this._state.numformattype !== val) {
if (!fontparam) toolbar.cmbNumberFormat.setValue(val, toolbar.txtCustom);
fontparam = toolbar.numFormatTypes[1]; this._state.numformattype = val;
}
toolbar.btnNumberFormat.setCaption(fontparam);
val = info.asc_getAngle(); val = info.asc_getAngle();
if (this._state.angle !== val) { if (this._state.angle !== val) {
@ -2544,6 +2560,12 @@ define([
for (var i=0; i<Math.min(4,formulas.length); i++) { for (var i=0; i<Math.min(4,formulas.length); i++) {
formulas[i].setCaption(this.api.asc_getFormulaLocaleName(formulas[i].value)); formulas[i].setCaption(this.api.asc_getFormulaLocaleName(formulas[i].value));
} }
var value = Common.localStorage.getItem("sse-settings-reg-settings");
if (value!==null)
this._state.langId = parseInt(value);
else
this._state.langId = ((this.toolbar.mode.lang) ? parseInt(Common.util.LanguageInfo.getLocalLanguageCode(this.toolbar.mode.lang)) : 0x0409);
}, },
textEmptyImgUrl : 'You need to specify image URL.', textEmptyImgUrl : 'You need to specify image URL.',

View file

@ -22,7 +22,7 @@
<div class="toolbar-row"> <div class="toolbar-row">
<span class="btn-placeholder split" id="id-toolbar-diagram-placeholder-btn-digit-dec"></span> <span class="btn-placeholder split" id="id-toolbar-diagram-placeholder-btn-digit-dec"></span>
<span class="btn-placeholder split" id="id-toolbar-diagram-placeholder-btn-digit-inc"></span> <span class="btn-placeholder split" id="id-toolbar-diagram-placeholder-btn-digit-inc"></span>
<span class="btn-placeholder border" id="id-toolbar-diagram-placeholder-btn-format" style="width: 84px; margin-left: 10px;"></span> <span class="btn-placeholder" id="id-toolbar-diagram-placeholder-btn-format" style="width: 84px; margin-left: 10px; vertical-align: middle;"></span>
</div> </div>
</div> </div>
<div class="separator short"></div> <div class="separator short"></div>
@ -124,7 +124,7 @@
<div class="toolbar-group"> <div class="toolbar-group">
<div class="toolbar-row"> <div class="toolbar-row">
<span class="btn-placeholder split" id="id-toolbar-short-placeholder-btn-filter"></span> <span class="btn-placeholder split" id="id-toolbar-short-placeholder-btn-filter"></span>
<span class="btn-placeholder border" id="id-toolbar-short-placeholder-btn-format" style="width: 84px; margin-left: 7px;"></span> <span class="btn-placeholder" id="id-toolbar-short-placeholder-btn-format" style="width: 84px; margin-left: 7px; vertical-align: middle;"></span>
</div> </div>
</div> </div>
<div class="separator short"></div> <div class="separator short"></div>
@ -249,7 +249,7 @@
<div class="separator long"></div> <div class="separator long"></div>
<div class="toolbar-group"> <div class="toolbar-group">
<div class="toolbar-row"> <div class="toolbar-row">
<span class="btn-placeholder border" id="id-toolbar-full-placeholder-btn-format" style="width: 100%;"></span> <span class="btn-placeholder" id="id-toolbar-full-placeholder-btn-format" style="width: 100%"></span>
</div> </div>
<div class="toolbar-row"> <div class="toolbar-row">
<span class="btn-placeholder split" id="id-toolbar-full-placeholder-btn-percents"></span> <span class="btn-placeholder split" id="id-toolbar-full-placeholder-btn-percents"></span>

View file

@ -124,19 +124,18 @@ define([
Text : '@' Text : '@'
}; };
me.numFormatTypes = {}; me.numFormatData = [
me.numFormatTypes[Asc.c_oAscNumFormatType.General] = me.txtGeneral; { value: Asc.c_oAscNumFormatType.General, format: this.ascFormatOptions.General, displayValue: this.txtGeneral, exampleval: '100' },
me.numFormatTypes[Asc.c_oAscNumFormatType.Custom] = me.txtCustom; { value: Asc.c_oAscNumFormatType.Number, format: this.ascFormatOptions.Number, displayValue: this.txtNumber, exampleval: '100,00' },
me.numFormatTypes[Asc.c_oAscNumFormatType.Text] = me.txtText; { value: Asc.c_oAscNumFormatType.Scientific,format: this.ascFormatOptions.Scientific, displayValue: this.txtScientific, exampleval: '1,00E+02' },
me.numFormatTypes[Asc.c_oAscNumFormatType.Number] = me.txtNumber; { value: Asc.c_oAscNumFormatType.Accounting,format: this.ascFormatOptions.Accounting, displayValue: this.txtAccounting, exampleval: '100,00 $' },
me.numFormatTypes[Asc.c_oAscNumFormatType.Integer] = me.txtInteger; { value: Asc.c_oAscNumFormatType.Currency, format: this.ascFormatOptions.Currency, displayValue: this.txtCurrency, exampleval: '100,00 $' },
me.numFormatTypes[Asc.c_oAscNumFormatType.Scientific] = me.txtScientific; { value: Asc.c_oAscNumFormatType.Date, format: 'MM-dd-yyyy', displayValue: this.txtDate, exampleval: '04-09-1900' },
me.numFormatTypes[Asc.c_oAscNumFormatType.Currency] = me.txtCurrency; { value: Asc.c_oAscNumFormatType.Time, format: 'HH:MM:ss', displayValue: this.txtTime, exampleval: '00:00:00' },
me.numFormatTypes[Asc.c_oAscNumFormatType.Accounting] = me.txtAccounting; { value: Asc.c_oAscNumFormatType.Percent, format: this.ascFormatOptions.Percentage, displayValue: this.txtPercentage, exampleval: '100,00%' },
me.numFormatTypes[Asc.c_oAscNumFormatType.Date] = me.txtDate; { value: Asc.c_oAscNumFormatType.Fraction, format: this.ascFormatOptions.Fraction, displayValue: this.txtFraction, exampleval: '100' },
me.numFormatTypes[Asc.c_oAscNumFormatType.Time] = me.txtTime; { value: Asc.c_oAscNumFormatType.Text, format: this.ascFormatOptions.Text, displayValue: this.txtText, exampleval: '100' }
me.numFormatTypes[Asc.c_oAscNumFormatType.Percent] = me.txtPercentage; ];
me.numFormatTypes[Asc.c_oAscNumFormatType.Fraction] = me.txtFraction;
function dummyCmp() { function dummyCmp() {
return { return {
@ -651,13 +650,24 @@ define([
} }
}); });
me.btnNumberFormat = new Common.UI.Button({ var formatTemplate =
id : 'id-toolbar-btn-num-format', _.template([
cls : 'btn-toolbar btn-text-value', '<% _.each(items, function(item) { %>',
caption : me.txtGeneral, '<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">',
style : 'width: 100%;', '<div style="position: relative;"><div style="position: absolute; left: 0; width: 100px;"><%= scope.getDisplayValue(item) %></div>',
'<div style="display: inline-block; width: 100%; max-width: 300px; overflow: hidden; text-overflow: ellipsis; text-align: right; vertical-align: bottom; padding-left: 100px; color: silver;"><%= item.exampleval ? item.exampleval : "" %></div>',
'</div></a></li>',
'<% }); %>'
].join(''));
me.cmbNumberFormat = new Common.UI.ComboBox({
cls : 'input-group-nr',
menuStyle : 'min-width: 180px;',
hint : me.tipNumFormat,
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRange, _set.lostConnect, _set.coAuth], lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRange, _set.lostConnect, _set.coAuth],
menu : true itemsTemplate: formatTemplate,
editable : false,
data : me.numFormatData
}); });
me.btnPercentStyle = new Common.UI.Button({ me.btnPercentStyle = new Common.UI.Button({
@ -1080,7 +1090,7 @@ define([
me.btnMerge, me.btnInsertFormula, me.btnNamedRange, me.btnIncDecimal, me.btnInsertShape, me.btnInsertEquation, me.btnMerge, me.btnInsertFormula, me.btnNamedRange, me.btnIncDecimal, me.btnInsertShape, me.btnInsertEquation,
me.btnInsertText, me.btnSortUp, me.btnSortDown, me.btnSetAutofilter, me.btnClearAutofilter, me.btnTableTemplate, me.btnInsertText, me.btnSortUp, me.btnSortDown, me.btnSetAutofilter, me.btnClearAutofilter, me.btnTableTemplate,
me.btnPercentStyle, me.btnCurrencyStyle, me.btnDecDecimal, me.btnAddCell, me.btnDeleteCell, me.btnPercentStyle, me.btnCurrencyStyle, me.btnDecDecimal, me.btnAddCell, me.btnDeleteCell,
me.btnNumberFormat, me.btnBorders, me.btnInsertImage, me.btnInsertHyperlink, me.cmbNumberFormat, me.btnBorders, me.btnInsertImage, me.btnInsertHyperlink,
me.btnInsertChart, me.btnColorSchemas, me.btnInsertChart, me.btnColorSchemas,
me.btnAutofilter, me.btnCopy, me.btnPaste, me.btnSettings, me.listStyles, me.btnPrint, me.btnShowMode, me.btnAutofilter, me.btnCopy, me.btnPaste, me.btnSettings, me.listStyles, me.btnPrint, me.btnShowMode,
/*me.btnSave, */me.btnClearStyle, me.btnCopyStyle /*me.btnSave, */me.btnClearStyle, me.btnCopyStyle
@ -1097,7 +1107,7 @@ define([
me.btnInsertImage, me.btnInsertText, me.btnInsertShape, me.btnInsertEquation, me.btnIncFontSize, me.btnDecFontSize, me.btnInsertImage, me.btnInsertText, me.btnInsertShape, me.btnInsertEquation, me.btnIncFontSize, me.btnDecFontSize,
me.btnBold, me.btnItalic, me.btnUnderline, me.btnTextColor, me.btnBackColor, me.btnBold, me.btnItalic, me.btnUnderline, me.btnTextColor, me.btnBackColor,
me.btnInsertHyperlink, me.btnBorders, me.btnTextOrient, me.btnPercentStyle, me.btnCurrencyStyle, me.btnColorSchemas, me.btnInsertHyperlink, me.btnBorders, me.btnTextOrient, me.btnPercentStyle, me.btnCurrencyStyle, me.btnColorSchemas,
me.btnSettings, me.btnInsertFormula, me.btnNamedRange, me.btnDecDecimal, me.btnIncDecimal, me.btnNumberFormat, me.btnWrap, me.btnSettings, me.btnInsertFormula, me.btnNamedRange, me.btnDecDecimal, me.btnIncDecimal, me.cmbNumberFormat, me.btnWrap,
me.btnInsertChart, me.btnMerge, me.btnAddCell, me.btnDeleteCell, me.btnShowMode, me.btnPrint, me.btnInsertChart, me.btnMerge, me.btnAddCell, me.btnDeleteCell, me.btnShowMode, me.btnPrint,
me.btnAutofilter, me.btnSortUp, me.btnSortDown, me.btnTableTemplate, me.btnSetAutofilter, me.btnClearAutofilter, me.btnAutofilter, me.btnSortUp, me.btnSortDown, me.btnTableTemplate, me.btnSetAutofilter, me.btnClearAutofilter,
me.btnSave, me.btnClearStyle, me.btnCopyStyle, me.btnCopy, me.btnPaste]; me.btnSave, me.btnClearStyle, me.btnCopyStyle, me.btnCopy, me.btnPaste];
@ -1229,7 +1239,7 @@ define([
replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-setfilter', this.btnSetAutofilter); replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-setfilter', this.btnSetAutofilter);
replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-clear-filter', this.btnClearAutofilter); replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-clear-filter', this.btnClearAutofilter);
replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-table-tpl', this.btnTableTemplate); replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-table-tpl', this.btnTableTemplate);
replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-format', this.btnNumberFormat); replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-format', this.cmbNumberFormat);
replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-percents', this.btnPercentStyle); replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-percents', this.btnPercentStyle);
replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-currency', this.btnCurrencyStyle); replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-currency', this.btnCurrencyStyle);
replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-digit-dec', this.btnDecDecimal); replacePlacholder('#id-toolbar-' + mode + '-placeholder-btn-digit-dec', this.btnDecDecimal);
@ -1295,7 +1305,6 @@ define([
this.btnClearAutofilter.updateHint(this.txtClearFilter); this.btnClearAutofilter.updateHint(this.txtClearFilter);
this.btnSearch.updateHint(this.txtSearch); this.btnSearch.updateHint(this.txtSearch);
this.btnTableTemplate.updateHint(this.txtTableTemplate); this.btnTableTemplate.updateHint(this.txtTableTemplate);
this.btnNumberFormat.updateHint(this.tipNumFormat);
this.btnPercentStyle.updateHint(this.tipDigStylePercent); this.btnPercentStyle.updateHint(this.tipDigStylePercent);
this.btnCurrencyStyle.updateHint(this.tipDigStyleAccounting); this.btnCurrencyStyle.updateHint(this.tipDigStyleAccounting);
this.btnDecDecimal.updateHint(this.tipDecDecimal); this.btnDecDecimal.updateHint(this.tipDecDecimal);
@ -1520,179 +1529,179 @@ define([
}); });
} }
var formatTemplate = _.template('<a id="<%= id %>" style="white-space: normal;" tabindex="-1" type="menuitem"><%= caption %><span style="float: right; color: silver;"><%= options.tplval ? options.tplval : options.value %></span></a>'); // var formatTemplate = _.template('<a id="<%= id %>" style="white-space: normal;" tabindex="-1" type="menuitem"><%= caption %><span style="float: right; color: silver;"><%= options.tplval ? options.tplval : options.value %></span></a>');
this.btnNumberFormat.setMenu( new Common.UI.Menu({ // this.btnNumberFormat.setMenu( new Common.UI.Menu({
style: 'margin-left: -1px;', // style: 'margin-left: -1px;',
items: [ // items: [
{ // {
caption : this.txtGeneral, // caption : this.txtGeneral,
value : this.ascFormatOptions.General // value : this.ascFormatOptions.General
}, // },
{ // {
caption : this.txtNumber, // caption : this.txtNumber,
value : this.ascFormatOptions.Number // value : this.ascFormatOptions.Number
}, // },
{ // {
caption : this.txtInteger, // caption : this.txtInteger,
value : '#0' // value : '#0'
}, // },
{ // {
caption : this.txtScientific, // caption : this.txtScientific,
value : this.ascFormatOptions.Scientific // value : this.ascFormatOptions.Scientific
}, // },
{ // {
caption : this.txtAccounting, // caption : this.txtAccounting,
menu : new Common.UI.Menu({ // menu : new Common.UI.Menu({
style: 'min-width: 120px;', // style: 'min-width: 120px;',
menuAlign: 'tl-tr', // menuAlign: 'tl-tr',
items : [ // items : [
{ // {
caption : this.txtDollar, // caption : this.txtDollar,
value : this.ascFormatOptions.Accounting // value : this.ascFormatOptions.Accounting
}, // },
{ // {
caption : this.txtEuro, // caption : this.txtEuro,
value : '_(€* #,##0.00_);_(€* (#,##0.00);_(€* "-"??_);_(@_)' // value : '_(€* #,##0.00_);_(€* (#,##0.00);_(€* "-"??_);_(@_)'
}, // },
{ // {
caption : this.txtPound, // caption : this.txtPound,
value : '_(£* #,##0.00_);_(£* (#,##0.00);_(£* "-"??_);_(@_)' // value : '_(£* #,##0.00_);_(£* (#,##0.00);_(£* "-"??_);_(@_)'
}, // },
{ // {
caption : this.txtRouble, // caption : this.txtRouble,
value : '_-* #,##0.00[$р.-419]_-;-* #,##0.00[$р.-419]_-;_-* "-"??[$р.-419]_-;_-@_-' // value : '_-* #,##0.00[$р.-419]_-;-* #,##0.00[$р.-419]_-;_-* "-"??[$р.-419]_-;_-@_-'
}, // },
{ // {
caption : this.txtYen, // caption : this.txtYen,
value : '_(¥* #,##0.00_);_(¥* (#,##0.00);_(¥* "-"??_);_(@_)' // value : '_(¥* #,##0.00_);_(¥* (#,##0.00);_(¥* "-"??_);_(@_)'
} // }
] // ]
}) // })
}, // },
{ // {
caption : this.txtCurrency, // caption : this.txtCurrency,
menu : new Common.UI.Menu({ // menu : new Common.UI.Menu({
style: 'min-width: 120px;', // style: 'min-width: 120px;',
menuAlign: 'tl-tr', // menuAlign: 'tl-tr',
items : [ // items : [
{ // {
caption : this.txtDollar, // caption : this.txtDollar,
value : this.ascFormatOptions.Currency // value : this.ascFormatOptions.Currency
}, // },
{ // {
caption : this.txtEuro, // caption : this.txtEuro,
value : '€#,##0.00' // value : '€#,##0.00'
}, // },
{ // {
caption : this.txtPound, // caption : this.txtPound,
value : '£#,##0.00' // value : '£#,##0.00'
}, // },
{ // {
caption : this.txtRouble, // caption : this.txtRouble,
value : '#,##0.00"р."' // value : '#,##0.00"р."'
}, // },
{ // {
caption : this.txtYen, // caption : this.txtYen,
value : '¥#,##0.00' // value : '¥#,##0.00'
} // }
] // ]
}) // })
}, // },
{ // {
caption : this.txtDate, // caption : this.txtDate,
menu : new Common.UI.Menu({ // menu : new Common.UI.Menu({
style: 'min-width: 200px;', // style: 'min-width: 200px;',
menuAlign: 'tl-tr', // menuAlign: 'tl-tr',
items: [ // items: [
{ // {
caption : '07-24-88', // caption : '07-24-88',
value : 'MM-dd-yy', // value : 'MM-dd-yy',
template: formatTemplate // template: formatTemplate
}, // },
{ // {
caption : '07-24-1988', // caption : '07-24-1988',
value : 'MM-dd-yyyy', // value : 'MM-dd-yyyy',
template: formatTemplate // template: formatTemplate
}, // },
{ // {
caption : '24-07-88', // caption : '24-07-88',
value : 'dd-MM-yy', // value : 'dd-MM-yy',
template: formatTemplate // template: formatTemplate
}, // },
{ // {
caption : '24-07-1988', // caption : '24-07-1988',
value : 'dd-MM-yyyy', // value : 'dd-MM-yyyy',
template: formatTemplate // template: formatTemplate
}, // },
{ // {
caption : '24-Jul-1988', // caption : '24-Jul-1988',
value : 'dd-MMM-yyyy', // value : 'dd-MMM-yyyy',
template: formatTemplate // template: formatTemplate
}, // },
{ // {
caption : '24-Jul', // caption : '24-Jul',
value : 'dd-MMM', // value : 'dd-MMM',
template: formatTemplate // template: formatTemplate
}, // },
{ // {
caption : 'Jul-88', // caption : 'Jul-88',
value : 'MMM-yy', // value : 'MMM-yy',
template: formatTemplate // template: formatTemplate
} // }
] // ]
}) // })
}, // },
{ // {
caption : this.txtTime, // caption : this.txtTime,
menu : new Common.UI.Menu({ // menu : new Common.UI.Menu({
style: 'min-width: 200px;', // style: 'min-width: 200px;',
menuAlign: 'tl-tr', // menuAlign: 'tl-tr',
showSeparator : false, // showSeparator : false,
items: [ // items: [
{ // {
caption : '10:56', // caption : '10:56',
value : 'HH:mm', // value : 'HH:mm',
template: formatTemplate // template: formatTemplate
}, // },
{ // {
caption : '21:56:00', // caption : '21:56:00',
value : 'HH:MM:ss', // value : 'HH:MM:ss',
template: formatTemplate // template: formatTemplate
}, // },
{ // {
caption : '05:56 AM', // caption : '05:56 AM',
tplval : 'hh:mm tt', // tplval : 'hh:mm tt',
value : 'hh:mm AM/PM', // value : 'hh:mm AM/PM',
template: formatTemplate // template: formatTemplate
}, // },
{ // {
caption : '05:56:00 AM', // caption : '05:56:00 AM',
tplval : 'hh:mm:ss tt', // tplval : 'hh:mm:ss tt',
value : 'hh:mm:ss AM/PM', // value : 'hh:mm:ss AM/PM',
template: formatTemplate // template: formatTemplate
}, // },
{ // {
caption : '38:56:00', // caption : '38:56:00',
value : '[h]:mm:ss', // value : '[h]:mm:ss',
template: formatTemplate // template: formatTemplate
} // }
] // ]
}) // })
}, // },
{ // {
caption : this.txtPercentage, // caption : this.txtPercentage,
value : this.ascFormatOptions.Percentage // value : this.ascFormatOptions.Percentage
}, // },
{ // {
caption : this.txtFraction, // caption : this.txtFraction,
value : this.ascFormatOptions.Fraction // value : this.ascFormatOptions.Fraction
}, // },
{ // {
caption : this.txtText, // caption : this.txtText,
value : this.ascFormatOptions.Text // value : this.ascFormatOptions.Text
} // }
] // ]
})); // }));
this.mnuInsertChartPicker = new Common.UI.DataView({ this.mnuInsertChartPicker = new Common.UI.DataView({
el: $('#id-toolbar-menu-insertchart'), el: $('#id-toolbar-menu-insertchart'),