From eea4416d3947c4065b429556f02b1dd935427a56 Mon Sep 17 00:00:00 2001 From: Sam Mousa Date: Thu, 17 Dec 2015 14:35:43 +0000 Subject: [PATCH] Dev Improved navigation --- protected/views/labels/update.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/protected/views/labels/update.php b/protected/views/labels/update.php index e85c4df7821..666b5ef5f2b 100644 --- a/protected/views/labels/update.php +++ b/protected/views/labels/update.php @@ -78,8 +78,8 @@ function defaultValueRenderer(instance, td, row, col, prop, value, cellPropertie } if (cellProperties.readOnly === true) { - console.log('setting'); - td.style.background = '#555'; + td.style.setProperty('background-color','#eee', 'important'); + td.style.setProperty('pointer-events','none'); } Handsontable.renderers.TextRenderer.apply(this, args); } @@ -191,6 +191,20 @@ function defaultValueRenderer(instance, td, row, col, prop, value, cellPropertie "hsep1": "---------", remove_row: {}, } + }, + tabMoves: function(e) { + if (!e.shiftKey && hot1.getSelected()[1] == (hot1.countCols() - 2) + || (e.shiftKey && hot1.getSelected()[1] == 0) + ) { + return { + row: 1, + col: -hot1.countCols() + 2 + }; + } + return { + row: 0, + col: 1 + }; } @@ -213,7 +227,8 @@ function createColumns() { result.push({ data: '', width: '300px', - readOnly: true + readOnly: true, + }); console.log(result);