diff --git a/apps/documenteditor/mobile/app/template/EditParagraph.template b/apps/documenteditor/mobile/app/template/EditParagraph.template index 5abd3fcf1..b655baa3b 100644 --- a/apps/documenteditor/mobile/app/template/EditParagraph.template +++ b/apps/documenteditor/mobile/app/template/EditParagraph.template @@ -184,4 +184,20 @@ + + + +
+ +
+
+ +
+
\ No newline at end of file diff --git a/apps/documenteditor/mobile/app/view/edit/EditParagraph.js b/apps/documenteditor/mobile/app/view/edit/EditParagraph.js index dde7c7158..b1b163da7 100644 --- a/apps/documenteditor/mobile/app/view/edit/EditParagraph.js +++ b/apps/documenteditor/mobile/app/view/edit/EditParagraph.js @@ -150,6 +150,24 @@ define([ el: $('.page[data-page=edit-paragraph-color] .page-content'), transparent: true }); + this.paletteBackgroundColor.on('customcolor', function () { + me.showCustomColor(); + }); + var template = _.template(['
', + '', + '
'].join('')); + $('.page[data-page=edit-paragraph-color] .page-content').append(template({scope: this})); + $('#edit-paragraph-add-custom-color').single('click', _.bind(this.showCustomColor, this)); Common.Utils.addScrollIfNeed('.page[data-page=edit-paragraph-color]', '.page[data-page=edit-paragraph-color] .page-content'); this.fireEvent('page:show', [this, '#edit-paragraph-color']); @@ -160,6 +178,23 @@ define([ Common.Utils.addScrollIfNeed('.page[data-page=edit-paragraph-advanced]', '.page[data-page=edit-paragraph-advanced] .page-content'); }, + showCustomColor: function () { + var me = this, + selector = '#edit-paragraph-custom-color-view'; + me.showPage(selector, true); + + me.customColorPicker = new Common.UI.HsbColorPicker({ + el: $('.page[data-page=edit-paragraph-custom-color] .page-content'), + color: me.paletteBackgroundColor.currentColor + }); + me.customColorPicker.on('addcustomcolor', function (colorPicker, color) { + me.paletteBackgroundColor.addNewDynamicColor(colorPicker, color); + DE.getController('EditContainer').rootView.router.back(); + }); + + me.fireEvent('page:show', [me, selector]); + }, + textBackground: 'Background', textAdvSettings: 'Advanced settings', textPrgStyles: 'Paragraph styles', @@ -174,7 +209,9 @@ define([ textPageBreak: 'Page Break Before', textOrphan: 'Orphan Control', textKeepLines: 'Keep Lines Together', - textKeepNext: 'Keep with Next' + textKeepNext: 'Keep with Next', + textAddCustomColor: 'Add Custom Color', + textCustomColor: 'Custom Color' } })(), DE.Views.EditParagraph || {})) }); \ No newline at end of file