diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditChart.js b/apps/presentationeditor/mobile/app/controller/edit/EditChart.js index a7a32355a3..1344f97ed4 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditChart.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditChart.js @@ -120,6 +120,7 @@ define([ $('.chart-reorder a').single('click', _.bind(me.onReorder, me)); $('.chart-replace li').single('click', _.buffered(me.onReplace, 100, me)); + $('.chart-align a').single('click', _.bind(me.onAlign, me)); $('#edit-chart-bordersize input').single('change touchend', _.buffered(me.onBorderSize, 100, me)); $('#edit-chart-bordersize input').single('input', _.bind(me.onBorderSizeChanging, me)); @@ -263,6 +264,29 @@ define([ } }, + onAlign: function (e) { + var $target = $(e.currentTarget), + type = $target.data('type'); + + if ('align-left' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_LEFT); + } else if ('align-center' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_CENTER); + } else if ('align-right' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_RIGHT); + } else if ('align-top' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_TOP); + } else if ('align-middle' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_MIDDLE); + }else if ('align-bottom' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_BOTTOM); + }else if ('distrib-hor' == type) { + this.api.DistributeHorizontally(); + }else if ('distrib-vert' == type) { + this.api.DistributeVertically(); + } + }, + onBorderSize: function (e) { var me = this, $target = $(e.currentTarget), diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditImage.js b/apps/presentationeditor/mobile/app/controller/edit/EditImage.js index 48aba5b04d..02ac3475c5 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditImage.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditImage.js @@ -99,6 +99,7 @@ define([ $('.edit-image-url-link .button, .edit-image-url-link .list-button').single('click', _.bind(me.onReplaceByUrl, me)); $('.image-reorder a').single('click', _.bind(me.onReorder, me)); + $('.image-align a').single('click', _.bind(me.onAlign, me)); // me.initSettings(pageId); }, @@ -177,6 +178,29 @@ define([ } }, + onAlign: function (e) { + var $target = $(e.currentTarget), + type = $target.data('type'); + + if ('align-left' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_LEFT); + } else if ('align-center' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_CENTER); + } else if ('align-right' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_RIGHT); + } else if ('align-top' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_TOP); + } else if ('align-middle' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_MIDDLE); + }else if ('align-bottom' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_BOTTOM); + }else if ('distrib-hor' == type) { + this.api.DistributeHorizontally(); + }else if ('distrib-vert' == type) { + this.api.DistributeVertically(); + } + }, + // API handlers onApiFocusObject: function (objects) { diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditShape.js b/apps/presentationeditor/mobile/app/controller/edit/EditShape.js index b1f56f0c42..4338ae1b75 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditShape.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditShape.js @@ -118,6 +118,7 @@ define([ $('.shape-reorder a').single('click', _.bind(me.onReorder, me)); $('.shape-replace li').single('click', _.buffered(me.onReplace, 100, me)); + $('.shape-align a').single('click', _.bind(me.onAlign, me)); $('#edit-shape-bordersize input').single('change touchend', _.buffered(me.onBorderSize, 100, me)); $('#edit-shape-bordersize input').single('input', _.bind(me.onBorderSizeChanging, me)); @@ -230,6 +231,29 @@ define([ } }, + onAlign: function (e) { + var $target = $(e.currentTarget), + type = $target.data('type'); + + if ('align-left' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_LEFT); + } else if ('align-center' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_CENTER); + } else if ('align-right' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_RIGHT); + } else if ('align-top' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_TOP); + } else if ('align-middle' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_MIDDLE); + }else if ('align-bottom' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_BOTTOM); + }else if ('distrib-hor' == type) { + this.api.DistributeHorizontally(); + }else if ('distrib-vert' == type) { + this.api.DistributeVertically(); + } + }, + onReplace: function (e) { var $target = $(e.currentTarget), type = $target.data('type'); diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditTable.js b/apps/presentationeditor/mobile/app/controller/edit/EditTable.js index f9025cca27..06369e5c8a 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditTable.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditTable.js @@ -154,6 +154,7 @@ define([ paletteBorderColor && paletteBorderColor.on('select', _.bind(me.onBorderColor, me)); $('.table-reorder a').single('click', _.bind(me.onReorder, me)); + $('.table-align a').single('click', _.bind(me.onAlign, me)); me.initSettings(pageId); }, @@ -473,6 +474,29 @@ define([ } }, + onAlign: function (e) { + var $target = $(e.currentTarget), + type = $target.data('type'); + + if ('align-left' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_LEFT); + } else if ('align-center' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_CENTER); + } else if ('align-right' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_RIGHT); + } else if ('align-top' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_TOP); + } else if ('align-middle' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_MIDDLE); + }else if ('align-bottom' == type) { + this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_BOTTOM); + }else if ('distrib-hor' == type) { + this.api.DistributeHorizontally(); + }else if ('distrib-vert' == type) { + this.api.DistributeVertically(); + } + }, + // API handlers onApiFocusObject: function (objects) { diff --git a/apps/presentationeditor/mobile/app/template/EditChart.template b/apps/presentationeditor/mobile/app/template/EditChart.template index 91f5eb7d47..0f391e9262 100644 --- a/apps/presentationeditor/mobile/app/template/EditChart.template +++ b/apps/presentationeditor/mobile/app/template/EditChart.template @@ -20,6 +20,15 @@ +
  • + +
    +
    +
    <%= scope.textAlign %>
    +
    +
    +
    +
  • @@ -189,4 +198,107 @@
    - \ No newline at end of file + + + +
    + +
    + +
    +
    diff --git a/apps/presentationeditor/mobile/app/template/EditImage.template b/apps/presentationeditor/mobile/app/template/EditImage.template index 9cfa34d849..c06328b880 100644 --- a/apps/presentationeditor/mobile/app/template/EditImage.template +++ b/apps/presentationeditor/mobile/app/template/EditImage.template @@ -20,6 +20,15 @@ +
  • + +
    +
    +
    <%= scope.textAlign %>
    +
    +
    +
    +
  • @@ -181,4 +190,107 @@
    - \ No newline at end of file + + + +
    + +
    + +
    +
    diff --git a/apps/presentationeditor/mobile/app/template/EditShape.template b/apps/presentationeditor/mobile/app/template/EditShape.template index 578db05142..011cc93476 100644 --- a/apps/presentationeditor/mobile/app/template/EditShape.template +++ b/apps/presentationeditor/mobile/app/template/EditShape.template @@ -29,6 +29,15 @@ +
  • + +
    +
    +
    <%= scope.textAlign %>
    +
    +
    +
    +
  • @@ -225,4 +234,107 @@
    - \ No newline at end of file + + + +
    + +
    + +
    +
    diff --git a/apps/presentationeditor/mobile/app/template/EditTable.template b/apps/presentationeditor/mobile/app/template/EditTable.template index 2761c2a5ae..f714159da8 100644 --- a/apps/presentationeditor/mobile/app/template/EditTable.template +++ b/apps/presentationeditor/mobile/app/template/EditTable.template @@ -54,6 +54,15 @@ +
  • + +
    +
    +
    <%= scope.textAlign %>
    +
    +
    +
    +
  • <%= scope.textCellMargins %>
    @@ -361,3 +370,106 @@ + + +
    + +
    + +
    +
    diff --git a/apps/presentationeditor/mobile/app/view/edit/EditChart.js b/apps/presentationeditor/mobile/app/view/edit/EditChart.js index 518eb1102d..9f1bb95308 100644 --- a/apps/presentationeditor/mobile/app/view/edit/EditChart.js +++ b/apps/presentationeditor/mobile/app/view/edit/EditChart.js @@ -103,6 +103,7 @@ define([ $('#edit-chart-bordercolor').single('click', _.bind(me.showBorderColor, me)); $('.edit-chart-style .categories a').single('click', _.bind(me.showStyleCategory, me)); + $('#chart-align').single('click', _.bind(me.showAlign, me)); me.initControls(); me.renderStyles(); @@ -237,6 +238,10 @@ define([ this.fireEvent('page:show', [this, selector]); }, + showAlign: function () { + this.showPage('#edit-chart-align'); + }, + textStyle: 'Style', textReorder: 'Reorder', textRemoveChart: 'Remove Chart', @@ -249,7 +254,16 @@ define([ textFill: 'Fill', textBorder: 'Border', textSize: 'Size', - textColor: 'Color' + textColor: 'Color', + textAlign: 'Align', + textAlignLeft: 'Align Left', + textAlignRight: 'Align Right', + textAlignCenter: 'Align Center', + textAlignTop: 'Align Top', + textAlignBottom: 'Align Bottom', + textAlignMiddle: 'Align Middle', + txtDistribHor: 'Distribute Horizontally', + txtDistribVert: 'Distribute Vertically' } })(), PE.Views.EditChart || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/mobile/app/view/edit/EditImage.js b/apps/presentationeditor/mobile/app/view/edit/EditImage.js index e520174cd2..1670ccbfb2 100644 --- a/apps/presentationeditor/mobile/app/view/edit/EditImage.js +++ b/apps/presentationeditor/mobile/app/view/edit/EditImage.js @@ -70,6 +70,7 @@ define([ $('#image-replace').single('click', _.bind(me.showReplace, me)); $('#image-reorder').single('click', _.bind(me.showReorder, me)); $('#edit-image-url').single('click', _.bind(me.showEditUrl, me)); + $('#image-align').single('click', _.bind(me.showAlign, me)); me.initControls(); }, @@ -146,6 +147,10 @@ define([ }, 1000); }, + showAlign: function () { + this.showPage('#edit-image-align'); + }, + textReplace: 'Replace', textReorder: 'Reorder', textDefault: 'Default Size', @@ -160,7 +165,16 @@ define([ textLinkSettings: 'Link Settings', textAddress: 'Address', textImageURL: 'Image URL', - textReplaceImg: 'Replace Image' + textReplaceImg: 'Replace Image', + textAlign: 'Align', + textAlignLeft: 'Align Left', + textAlignRight: 'Align Right', + textAlignCenter: 'Align Center', + textAlignTop: 'Align Top', + textAlignBottom: 'Align Bottom', + textAlignMiddle: 'Align Middle', + txtDistribHor: 'Distribute Horizontally', + txtDistribVert: 'Distribute Vertically' } })(), PE.Views.EditImage || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/mobile/app/view/edit/EditShape.js b/apps/presentationeditor/mobile/app/view/edit/EditShape.js index 3f34fada38..69354edadf 100644 --- a/apps/presentationeditor/mobile/app/view/edit/EditShape.js +++ b/apps/presentationeditor/mobile/app/view/edit/EditShape.js @@ -70,6 +70,7 @@ define([ $('#shape-style').single('click', _.bind(me.showStyle, me)); $('#shape-replace').single('click', _.bind(me.showReplace, me)); $('#shape-reorder').single('click', _.bind(me.showReorder, me)); + $('#shape-align').single('click', _.bind(me.showAlign, me)); $('#edit-shape-bordercolor').single('click', _.bind(me.showBorderColor, me)); $('.edit-shape-style .categories a').single('click', _.bind(me.showStyleCategory, me)); @@ -157,6 +158,10 @@ define([ this.showPage('#edit-shape-reorder'); }, + showAlign: function () { + this.showPage('#edit-shape-align'); + }, + showBorderColor: function () { var selector = '#edit-shape-border-color-view'; this.showPage(selector, true); @@ -182,7 +187,16 @@ define([ textEffects: 'Effects', textSize: 'Size', textColor: 'Color', - textOpacity: 'Opacity' + textOpacity: 'Opacity', + textAlign: 'Align', + textAlignLeft: 'Align Left', + textAlignRight: 'Align Right', + textAlignCenter: 'Align Center', + textAlignTop: 'Align Top', + textAlignBottom: 'Align Bottom', + textAlignMiddle: 'Align Middle', + txtDistribHor: 'Distribute Horizontally', + txtDistribVert: 'Distribute Vertically' } })(), PE.Views.EditShape || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/mobile/app/view/edit/EditTable.js b/apps/presentationeditor/mobile/app/view/edit/EditTable.js index e1f2f1b4b5..7b51379260 100644 --- a/apps/presentationeditor/mobile/app/view/edit/EditTable.js +++ b/apps/presentationeditor/mobile/app/view/edit/EditTable.js @@ -74,6 +74,7 @@ define([ $('#edit-table-bordercolor').single('click', _.bind(me.showBorderColor, me)); $('.edit-table-style .categories a').single('click', _.bind(me.showStyleCategory, me)); $('#table-reorder').single('click', _.bind(me.showReorder, me)); + $('#table-align').single('click', _.bind(me.showAlign, me)); me.initControls(); me.renderStyles(); @@ -211,6 +212,10 @@ define([ this.showPage('#edit-table-reorder'); }, + showAlign: function () { + this.showPage('#edit-table-align'); + }, + textRemoveTable: 'Remove Table', textTableOptions: 'Table Options', textStyle: 'Style', @@ -232,7 +237,16 @@ define([ textToForeground: 'Bring to Foreground', textToBackground: 'Send to Background', textForward: 'Move Forward', - textBackward: 'Move Backward' + textBackward: 'Move Backward', + textAlign: 'Align', + textAlignLeft: 'Align Left', + textAlignRight: 'Align Right', + textAlignCenter: 'Align Center', + textAlignTop: 'Align Top', + textAlignBottom: 'Align Bottom', + textAlignMiddle: 'Align Middle', + txtDistribHor: 'Distribute Horizontally', + txtDistribVert: 'Distribute Vertically' } })(), PE.Views.EditTable || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index 3528df051c..417e326bac 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -230,6 +230,15 @@ "PE.Views.EditChart.textBorder": "Border", "PE.Views.EditChart.textSize": "Size", "PE.Views.EditChart.textColor": "Color", + "PE.Views.EditChart.textAlign": "Align", + "PE.Views.EditChart.textAlignLeft": "Align Left", + "PE.Views.EditChart.textAlignRight": "Align Right", + "PE.Views.EditChart.textAlignCenter": "Align Center", + "PE.Views.EditChart.textAlignTop": "Align Top", + "PE.Views.EditChart.textAlignBottom": "Align Bottom", + "PE.Views.EditChart.textAlignMiddle": "Align Middle", + "PE.Views.EditChart.txtDistribHor": "Distribute Horizontally", + "PE.Views.EditChart.txtDistribVert": "Distribute Vertically", "PE.Controllers.EditContainer.textSettings": "Settings", "PE.Controllers.EditContainer.textText": "Text", @@ -257,6 +266,15 @@ "PE.Views.EditImage.textAddress": "Address", "PE.Views.EditImage.textImageURL": "Image URL", "PE.Views.EditImage.textReplaceImg": "Replace Image", + "PE.Views.EditImage.textAlign": "Align", + "PE.Views.EditImage.textAlignLeft": "Align Left", + "PE.Views.EditImage.textAlignRight": "Align Right", + "PE.Views.EditImage.textAlignCenter": "Align Center", + "PE.Views.EditImage.textAlignTop": "Align Top", + "PE.Views.EditImage.textAlignBottom": "Align Bottom", + "PE.Views.EditImage.textAlignMiddle": "Align Middle", + "PE.Views.EditImage.txtDistribHor": "Distribute Horizontally", + "PE.Views.EditImage.txtDistribVert": "Distribute Vertically", "PE.Controllers.EditLink.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'", "PE.Controllers.EditLink.textDefault": "Selected text", @@ -298,6 +316,15 @@ "PE.Views.EditShape.textSize": "Size", "PE.Views.EditShape.textColor": "Color", "PE.Views.EditShape.textOpacity": "Opacity", + "PE.Views.EditShape.textAlign": "Align", + "PE.Views.EditShape.textAlignLeft": "Align Left", + "PE.Views.EditShape.textAlignRight": "Align Right", + "PE.Views.EditShape.textAlignCenter": "Align Center", + "PE.Views.EditShape.textAlignTop": "Align Top", + "PE.Views.EditShape.textAlignBottom": "Align Bottom", + "PE.Views.EditShape.textAlignMiddle": "Align Middle", + "PE.Views.EditShape.txtDistribHor": "Distribute Horizontally", + "PE.Views.EditShape.txtDistribVert": "Distribute Vertically", "PE.Controllers.EditSlide.textSec": "s", "PE.Views.EditSlide.textTheme": "Theme", @@ -368,6 +395,15 @@ "PE.Views.EditTable.textToBackground": "Send to Background", "PE.Views.EditTable.textForward": "Move Forward", "PE.Views.EditTable.textBackward": "Move Backward", + "PE.Views.EditTable.textAlign": "Align", + "PE.Views.EditTable.textAlignLeft": "Align Left", + "PE.Views.EditTable.textAlignRight": "Align Right", + "PE.Views.EditTable.textAlignCenter": "Align Center", + "PE.Views.EditTable.textAlignTop": "Align Top", + "PE.Views.EditTable.textAlignBottom": "Align Bottom", + "PE.Views.EditTable.textAlignMiddle": "Align Middle", + "PE.Views.EditTable.txtDistribHor": "Distribute Horizontally", + "PE.Views.EditTable.txtDistribVert": "Distribute Vertically", "PE.Controllers.EditText.textFonts": "Fonts", "PE.Controllers.EditText.textAuto": "Auto",