diff --git a/domain-server/resources/web/css/style.css b/domain-server/resources/web/css/style.css index 51275da509..952a504b13 100644 --- a/domain-server/resources/web/css/style.css +++ b/domain-server/resources/web/css/style.css @@ -65,6 +65,10 @@ td.buttons { width: 30px; } +td.buttons.reorder-buttons { + width: 40px; +} + td .glyphicon { text-align: center; font-size: 12px; diff --git a/domain-server/resources/web/js/settings.js b/domain-server/resources/web/js/settings.js index 40c40eb4f7..044f846293 100644 --- a/domain-server/resources/web/js/settings.js +++ b/domain-server/resources/web/js/settings.js @@ -168,12 +168,20 @@ $(document).ready(function(){ if (sibling.hasClass(Settings.DATA_COL_CLASS)) { // set focus to next input - sibling.find('input').focus() - } else if (sibling.hasClass(Settings.ADD_DEL_BUTTONS_CLASS)) { - sibling.find('.' + Settings.ADD_ROW_BUTTON_CLASS).click() + sibling.find('input').focus(); + } else { - // set focus to the first input in the new row - $target.closest('table').find('tr.inputs input:first').focus() + // jump over the re-order row, if that's what we're on + if (sibling.hasClass(Settings.REORDER_BUTTONS_CLASS)) { + sibling = sibling.next(); + } + + if (sibling.hasClass(Settings.ADD_DEL_BUTTONS_CLASS)) { + sibling.find('.' + Settings.ADD_ROW_BUTTON_CLASS).click() + + // set focus to the first input in the new row + $target.closest('table').find('tr.inputs input:first').focus() + } } } else if ($target.is('input')) { @@ -767,7 +775,8 @@ $('body').on('click', '.save-button', function(e){ }); function makeTable(setting, keypath, setting_value, isLocked) { - var isArray = !_.has(setting, 'key') + var isArray = !_.has(setting, 'key'); + var isHash = !isArray; if (!isArray && setting.can_order) { setting.can_order = false; @@ -780,7 +789,8 @@ function makeTable(setting, keypath, setting_value, isLocked) { } html += "