[PE mobile] Added table reordering.
This commit is contained in:
parent
7e897bc188
commit
174d5fd5eb
|
@ -153,6 +153,8 @@ define([
|
||||||
paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me));
|
paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me));
|
||||||
paletteBorderColor && paletteBorderColor.on('select', _.bind(me.onBorderColor, me));
|
paletteBorderColor && paletteBorderColor.on('select', _.bind(me.onBorderColor, me));
|
||||||
|
|
||||||
|
$('.table-reorder a').single('click', _.bind(me.onReorder, me));
|
||||||
|
|
||||||
me.initSettings(pageId);
|
me.initSettings(pageId);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -456,6 +458,21 @@ define([
|
||||||
$('#edit-table-bordersize .item-after').text(borderSizeTransform.sizeByIndex($target.val()) + ' ' + _metricText);
|
$('#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
|
// API handlers
|
||||||
|
|
||||||
onApiFocusObject: function (objects) {
|
onApiFocusObject: function (objects) {
|
||||||
|
|
|
@ -45,6 +45,15 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a id="table-reorder" class="item-link">
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textReorder %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-block-title"><%= scope.textCellMargins %></div>
|
<div class="content-block-title"><%= scope.textCellMargins %></div>
|
||||||
|
@ -293,3 +302,62 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Reorder view -->
|
||||||
|
<div id="edit-table-reorder">
|
||||||
|
<div class="navbar">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
|
||||||
|
<div class="center sliding"><%= scope.textReorder %></div>
|
||||||
|
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="page table-reorder">
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="list-block">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a data-type="all-up" class="item-link no-indicator">
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-media"><i class="icon icon-move-foreground"></i></div>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textToForeground %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a data-type="all-down" class="item-link no-indicator">
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-media"><i class="icon icon-move-background"></i></div>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textToBackground %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a data-type="move-up" class="item-link no-indicator">
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-media"><i class="icon icon-move-forward"></i></div>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textForward %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a data-type="move-down" class="item-link no-indicator">
|
||||||
|
<div data-type="move-down" class="item-content">
|
||||||
|
<div class="item-media"><i class="icon icon-move-backward"></i></div>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textBackward %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -73,6 +73,7 @@ define([
|
||||||
$('#edit-table-style-options').single('click', _.bind(me.showTableStyleOptions, me));
|
$('#edit-table-style-options').single('click', _.bind(me.showTableStyleOptions, me));
|
||||||
$('#edit-table-bordercolor').single('click', _.bind(me.showBorderColor, me));
|
$('#edit-table-bordercolor').single('click', _.bind(me.showBorderColor, me));
|
||||||
$('.edit-table-style .categories a').single('click', _.bind(me.showStyleCategory, me));
|
$('.edit-table-style .categories a').single('click', _.bind(me.showStyleCategory, me));
|
||||||
|
$('#table-reorder').single('click', _.bind(me.showReorder, me));
|
||||||
|
|
||||||
me.initControls();
|
me.initControls();
|
||||||
me.renderStyles();
|
me.renderStyles();
|
||||||
|
@ -206,6 +207,10 @@ define([
|
||||||
this.showPage('#edit-table-style-options-view');
|
this.showPage('#edit-table-style-options-view');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
showReorder: function () {
|
||||||
|
this.showPage('#edit-table-reorder');
|
||||||
|
},
|
||||||
|
|
||||||
textRemoveTable: 'Remove Table',
|
textRemoveTable: 'Remove Table',
|
||||||
textTableOptions: 'Table Options',
|
textTableOptions: 'Table Options',
|
||||||
textStyle: 'Style',
|
textStyle: 'Style',
|
||||||
|
@ -222,7 +227,12 @@ define([
|
||||||
textBandedRow: 'Banded Row',
|
textBandedRow: 'Banded Row',
|
||||||
textFirstColumn: 'First Column',
|
textFirstColumn: 'First Column',
|
||||||
textLastColumn: 'Last 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 || {}))
|
})(), PE.Views.EditTable || {}))
|
||||||
});
|
});
|
|
@ -363,6 +363,11 @@
|
||||||
"PE.Views.EditTable.textFirstColumn": "First Column",
|
"PE.Views.EditTable.textFirstColumn": "First Column",
|
||||||
"PE.Views.EditTable.textLastColumn": "Last Column",
|
"PE.Views.EditTable.textLastColumn": "Last Column",
|
||||||
"PE.Views.EditTable.textBandedColumn": "Banded 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.textFonts": "Fonts",
|
||||||
"PE.Controllers.EditText.textAuto": "Auto",
|
"PE.Controllers.EditText.textAuto": "Auto",
|
||||||
|
|
Loading…
Reference in a new issue