diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 6be815ed4..ac8636d69 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -1369,7 +1369,9 @@ define([ var store = picker.store; var arr = []; store.each(function(item){ - arr.push(item.get('id')); + var data = item.get('drawdata'); + data['divId'] = item.get('id'); + arr.push(data); }); if (this.api) { this.api.SetDrawImagePreviewBulletForMenu(arr, type); diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index c7deb133b..aa1f22b2c 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -2223,6 +2223,16 @@ define([ // set dataviews var _conf = this.mnuMarkersPicker.conf; + this._markersArr = [ + {type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x00B7), specialFont: 'Symbol'}, + {type: Asc.asc_PreviewBulletType.char, char: 'o', specialFont: 'Courier New'}, + {type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x00A7), specialFont: 'Wingdings'}, + {type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x0076), specialFont: 'Wingdings'}, + {type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x00D8), specialFont: 'Wingdings'}, + {type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x00FC), specialFont: 'Wingdings'}, + {type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x00A8), specialFont: 'Symbol'}, + {type: Asc.asc_PreviewBulletType.char, char: String.fromCharCode(0x2013), specialFont: 'Arial'} + ]; this.mnuMarkersPicker = new Common.UI.DataView({ el: $('#id-toolbar-menu-markers'), parentMenu: this.btnMarkers.menu, @@ -2230,15 +2240,15 @@ define([ restoreHeight: 144, delayRenderTips: true, store: new Common.UI.DataViewStore([ - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: -1}, skipRenderOnChange: true, tip: this.textNone}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 1}, skipRenderOnChange: true, tip: this.tipMarkersFRound}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 2}, skipRenderOnChange: true, tip: this.tipMarkersHRound}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 3}, skipRenderOnChange: true, tip: this.tipMarkersFSquare}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 4}, skipRenderOnChange: true, tip: this.tipMarkersStar}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 5}, skipRenderOnChange: true, tip: this.tipMarkersArrow}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 6}, skipRenderOnChange: true, tip: this.tipMarkersCheckmark}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 7}, skipRenderOnChange: true, tip: this.tipMarkersFRhombus}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 8}, skipRenderOnChange: true, tip: this.tipMarkersDash} + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: -1}, drawdata: {type: Asc.asc_PreviewBulletType.text, text: 'None'}, skipRenderOnChange: true, tip: this.textNone}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 1}, drawdata: me._markersArr[0], skipRenderOnChange: true, tip: this.tipMarkersFRound}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 2}, drawdata: me._markersArr[1], skipRenderOnChange: true, tip: this.tipMarkersHRound}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 3}, drawdata: me._markersArr[2], skipRenderOnChange: true, tip: this.tipMarkersFSquare}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 4}, drawdata: me._markersArr[3], skipRenderOnChange: true, tip: this.tipMarkersStar}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 5}, drawdata: me._markersArr[4], skipRenderOnChange: true, tip: this.tipMarkersArrow}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 6}, drawdata: me._markersArr[5], skipRenderOnChange: true, tip: this.tipMarkersCheckmark}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 7}, drawdata: me._markersArr[6], skipRenderOnChange: true, tip: this.tipMarkersFRhombus}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 8}, drawdata: me._markersArr[7], skipRenderOnChange: true, tip: this.tipMarkersDash} ]), itemTemplate: _.template('
') }); @@ -2247,21 +2257,21 @@ define([ _conf = this.mnuNumbersPicker.conf; var items = [ - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: -1}, skipRenderOnChange: true, tip: this.textNone}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 4}, skipRenderOnChange: true, tip: this.tipNumCapitalLetters}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 5}, skipRenderOnChange: true, tip: this.tipNumLettersParentheses}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 6}, skipRenderOnChange: true, tip: this.tipNumLettersPoints}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 1}, skipRenderOnChange: true, tip: this.tipNumNumbersPoint}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 2}, skipRenderOnChange: true, tip: this.tipNumNumbersParentheses}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 3}, skipRenderOnChange: true, tip: this.tipNumRoman}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 7}, skipRenderOnChange: true, tip: this.tipNumRomanSmall} + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: -1}, drawdata: {type: Asc.asc_PreviewBulletType.text, text: 'None'}, skipRenderOnChange: true, tip: this.textNone}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 4}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.UpperLetterDot_Left}, skipRenderOnChange: true, tip: this.tipNumCapitalLetters}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 5}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.LowerLetterBracket_Left}, skipRenderOnChange: true, tip: this.tipNumLettersParentheses}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 6}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.LowerLetterDot_Left}, skipRenderOnChange: true, tip: this.tipNumLettersPoints}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 1}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.DecimalDot_Right}, skipRenderOnChange: true, tip: this.tipNumNumbersPoint}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 2}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.DecimalBracket_Right}, skipRenderOnChange: true, tip: this.tipNumNumbersParentheses}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 3}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.UpperRomanDot_Right}, skipRenderOnChange: true, tip: this.tipNumRoman}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 7}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.LowerRomanDot_Right}, skipRenderOnChange: true, tip: this.tipNumRomanSmall} ]; if (Common.Locale.getDefaultLanguage() === 'ru') { items = items.concat([ - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 8}, skipRenderOnChange: true, tip: this.tipRusUpperPoints}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 9}, skipRenderOnChange: true, tip: this.tipRusUpperParentheses}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 10}, skipRenderOnChange: true, tip: this.tipRusLowerPoints}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 11}, skipRenderOnChange: true, tip: this.tipRusLowerParentheses} + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 8}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.UpperRussian_Dot_Left}, skipRenderOnChange: true, tip: this.tipRusUpperPoints}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 9}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.UpperRussian_Bracket_Left}, skipRenderOnChange: true, tip: this.tipRusUpperParentheses}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 10}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.LowerRussian_Dot_Left}, skipRenderOnChange: true, tip: this.tipRusLowerPoints}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 11}, drawdata: {type: Asc.asc_PreviewBulletType.number, numberingType: Asc.asc_oAscNumberingLevel.LowerRussian_Bracket_Left}, skipRenderOnChange: true, tip: this.tipRusLowerParentheses} ]); } this.mnuNumbersPicker = new Common.UI.DataView({ @@ -2284,10 +2294,10 @@ define([ restoreHeight: 176, delayRenderTips: true, store: new Common.UI.DataViewStore([ - {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: -1}, skipRenderOnChange: true, tip: this.textNone}, - {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 1}, skipRenderOnChange: true, tip: this.tipMultiLevelVarious}, - {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 2}, skipRenderOnChange: true, tip: this.tipMultiLevelNumbered}, - {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 3}, skipRenderOnChange: true, tip: this.tipMultiLevelSymbols} + {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: -1}, drawdata: {type: Asc.asc_PreviewBulletType.text, text: 'None'}, skipRenderOnChange: true, tip: this.textNone}, + {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 1}, drawdata: {type: Asc.asc_PreviewBulletType.multiLevel, numberingType: Asc.c_oAscMultiLevelNumbering.MultiLevel1}, skipRenderOnChange: true, tip: this.tipMultiLevelVarious}, + {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 2}, drawdata: {type: Asc.asc_PreviewBulletType.multiLevel, numberingType: Asc.c_oAscMultiLevelNumbering.MultiLevel2}, skipRenderOnChange: true, tip: this.tipMultiLevelNumbered}, + {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 3}, drawdata: {type: Asc.asc_PreviewBulletType.multiLevel, numberingType: Asc.c_oAscMultiLevelNumbering.MultiLevel3}, skipRenderOnChange: true, tip: this.tipMultiLevelSymbols} ]), itemTemplate: _.template('') });