Removed cell content aligment options from table editor context menu.

pull/2714/head
Moritz Pfeiffer 2016-06-10 09:17:07 +02:00 zatwierdzone przez Matt Westcott
rodzic 06bfa43782
commit 6c9d202057
4 zmienionych plików z 16 dodań i 2 usunięć

Wyświetl plik

@ -11,6 +11,7 @@ Changelog
* `FieldRowPanel` now creates equal-width columns automatically if `col*` classnames are not specified (Chris Rogers)
* Form builder now validates against multiple fields with the same name (Richard McMillan)
* Fix: Email templates and document uploader now support custom `STATICFILES_STORAGE` (Jonny Scholes)
* Fix: Removed alignment options (deprecated in HTML and not rendered by Wagtail) from `TableBlock` context menu (Moritz Pfeiffer)
1.5.2 (08.06.2016)

Wyświetl plik

@ -26,6 +26,7 @@ Bug fixes
~~~~~~~~~
* Email templates and document uploader now support custom `STATICFILES_STORAGE` (Jonny Scholes)
* Removed alignment options (deprecated in HTML and not rendered by Wagtail) from `TableBlock` context menu (Moritz Pfeiffer)
Upgrade considerations

Wyświetl plik

@ -35,7 +35,7 @@ function initTable(id, tableOptions) {
var parentDiv = $('.widget-table_input').parent();
parentDiv.find('.field-content').width(width);
parentDiv.find('.fieldname-table .field-content .field-content').width('80%');
};
}
try {
dataForForm = $.parseJSON(hiddenStreamInput.val());
@ -108,6 +108,19 @@ function initTable(id, tableOptions) {
finalOptions.afterCreateRow = structureEvent;
finalOptions.afterRemoveCol = structureEvent;
finalOptions.afterRemoveRow = structureEvent;
finalOptions.contextMenu = [
'row_above',
'row_below',
'---------',
'col_left',
'col_right',
'---------',
'remove_row',
'remove_col',
'---------',
'undo',
'redo'
];
hot = new Handsontable(document.getElementById(containerId), finalOptions);
hot.render(); // Call to render removes 'null' literals from empty cells

Wyświetl plik

@ -21,4 +21,3 @@
<br/>
<div id="{{ attrs.id }}-handsontable-container"></div>
{{ original_field_html }}