diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditTable.js b/apps/presentationeditor/mobile/app/controller/edit/EditTable.js index 604d824592..f9025cca27 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditTable.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditTable.js @@ -153,6 +153,8 @@ define([ paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me)); paletteBorderColor && paletteBorderColor.on('select', _.bind(me.onBorderColor, me)); + $('.table-reorder a').single('click', _.bind(me.onReorder, me)); + me.initSettings(pageId); }, @@ -456,6 +458,21 @@ define([ $('#edit-table-bordersize .item-after').text(borderSizeTransform.sizeByIndex($target.val()) + ' ' + _metricText); }, + onReorder: function (e) { + var $target = $(e.currentTarget), + type = $target.data('type'); + + if ('all-up' == type) { + this.api.shapes_bringToFront(); + } else if ('all-down' == type) { + this.api.shapes_bringToBack(); + } else if ('move-up' == type) { + this.api.shapes_bringForward(); + } else if ('move-down' == type) { + this.api.shapes_bringBackward(); + } + }, + // API handlers onApiFocusObject: function (objects) { diff --git a/apps/presentationeditor/mobile/app/template/EditTable.template b/apps/presentationeditor/mobile/app/template/EditTable.template index bb71820f5a..2761c2a5ae 100644 --- a/apps/presentationeditor/mobile/app/template/EditTable.template +++ b/apps/presentationeditor/mobile/app/template/EditTable.template @@ -45,6 +45,15 @@ +
  • + +
    +
    +
    <%= scope.textReorder %>
    +
    +
    +
    +
  • <%= scope.textCellMargins %>
    @@ -292,4 +301,63 @@ - \ 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 2984e483c6..e1f2f1b4b5 100644 --- a/apps/presentationeditor/mobile/app/view/edit/EditTable.js +++ b/apps/presentationeditor/mobile/app/view/edit/EditTable.js @@ -73,6 +73,7 @@ define([ $('#edit-table-style-options').single('click', _.bind(me.showTableStyleOptions, me)); $('#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)); me.initControls(); me.renderStyles(); @@ -206,6 +207,10 @@ define([ this.showPage('#edit-table-style-options-view'); }, + showReorder: function () { + this.showPage('#edit-table-reorder'); + }, + textRemoveTable: 'Remove Table', textTableOptions: 'Table Options', textStyle: 'Style', @@ -222,7 +227,12 @@ define([ textBandedRow: 'Banded Row', textFirstColumn: 'First Column', textLastColumn: 'Last Column', - textBandedColumn: 'Banded Column' + textBandedColumn: 'Banded Column', + textReorder: 'Reorder', + textToForeground: 'Bring to Foreground', + textToBackground: 'Send to Background', + textForward: 'Move Forward', + textBackward: 'Move Backward' } })(), 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 bb7b6a7824..3528df051c 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -363,6 +363,11 @@ "PE.Views.EditTable.textFirstColumn": "First Column", "PE.Views.EditTable.textLastColumn": "Last Column", "PE.Views.EditTable.textBandedColumn": "Banded Column", + "PE.Views.EditTable.textReorder": "Reorder", + "PE.Views.EditTable.textToForeground": "Bring to Foreground", + "PE.Views.EditTable.textToBackground": "Send to Background", + "PE.Views.EditTable.textForward": "Move Forward", + "PE.Views.EditTable.textBackward": "Move Backward", "PE.Controllers.EditText.textFonts": "Fonts", "PE.Controllers.EditText.textAuto": "Auto",