If trying to edit labels I get a blank screen with two save buttons... No labels at all, but funny buzz-data in JS. See (beautified) HTML-output:
<div id="navpage-content" class="container-fluid">
<div class="row">
<div class="col-xs-12">
<h1 class="page-header">
<strong>Edit labels</strong>
</h1>
</div>
</div>
<form action="/~irata/hotel/bolt/labels/save" method="POST" enctype="multipart/form-data">
<button class="btn btn-primary" disabled="disabled" id="save-button" type="submit">
<i class='fa fa-save'></i> Save
</button>
<div id="hot-grid" style='margin: 12px 0;'></div>
<input type="hidden" name="columns" value="["Label","EN","DE"]">
<input type="hidden" name="labels" id="gridfield-labels" value="">
<button class="btn btn-primary" disabled="disabled" id="save-button-bottom" type="submit">
<i class='fa fa-save'></i> Save
</button>
</form>
<script>
jQuery(document).ready(function($) {
var data = [["badger","badger","Dachs "],["bear","bear","B\u00e4r "],["beaver","beaver","Biber "],["buffalo","buffalo","B\u00fcffel "],["cat","cat","Katze "],["chamois","chamois","Gams , Gemse "],["cow","cow","Rind , Kuh "],["deer (red)","deer (red)","Hirsch "],["dog","dog","Hund "],["donkey","donkey","Esel "],["elephant","elephant","Elefant "],["ermine","ermine","Hermelin "],["ferret","ferret","Frettchen"],["fox","fox","Fuchs "],["goat","goat","Ziege "],["guinea pig","guinea pig","Meerschweinchen "],["hamster","hamster","Hamster "],["hare","hare","Hase "],["hedgehog","hedgehog","Needles "],["horse","horse","Pferd "],["ibex","ibex","Steinbock "],["lynx","lynx","Luchs "],["marmot","marmot","Murmeltier "],["marten","marten","Marder "],["mole","mole","Maulwurf "],["mouse","mouse","Maus"],["otter","otter","Otter "],["pig","pig","Schwein "],["rabbit","rabbit","Kaninchen "],["rat","rat","Ratte "],["sheep","sheep","Schaf "],["shrew","shrew","Spitzmaus "],["squirrel","squirrel","H\u00f6rnchen "],["vole","vole","Schermaus "],["weasel","weasel","Wiesel "],["wild boar","wild boar","Wildschwein "],["wildcat","wildcat","Wildkatze "],["wolf","wolf","Wolf "]];
var container = document.getElementById('hot-grid');
var hot = new Handsontable(container,
{
autoColumnSize: true,
minSpareRows: 1,
width: '100%',
minCols: 3,
data: data,
colHeaders: [ 'Label', 'EN', 'DE' ],
columnSorting: true,
sortIndicator: true,
rowHeaders: false,
manualRowMove: true,
contextMenu: true,
manualColumnResize: true,
afterRender: updateData,
afterColumnSort: updateData,
afterRowMove: updateData
});
function updateData(changes, source) {
if(hot){
var data = this.getData(0, 0, hot.countRows() - 1, hot.countCols() - 1); // Because #989
data = data.filter(function(row) {
return !_.isEmpty(_.without(row, null));
});
jQuery('#gridfield-labels').val(JSON.stringify(data));
$('#save-button, #save-button-bottom').removeAttr('disabled');
}
}
});
</script>
</div>