diff options
Diffstat (limited to 'ncp-web')
-rw-r--r-- | ncp-web/js/ncp.js | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/ncp-web/js/ncp.js b/ncp-web/js/ncp.js index acff1dc4..84a6b2a3 100644 --- a/ncp-web/js/ncp.js +++ b/ncp-web/js/ncp.js @@ -179,7 +179,7 @@ $(function() set_sidebar_click_handlers(); - // Launch selected script + // Launch selected ncp_app $( '.config-button' ).on('click', function(e) { lock = true; @@ -193,21 +193,10 @@ $(function() if( item.getAttribute('type') == 'checkbox' ) item.value = item.checked ? 'yes' : 'no'; - cfg[item.name] = item.value; + var shortID = item.id.replace(selectedID + '-', ''); + cfg[shortID] = item.value; } ); - $( 'select', '#config-box' ).each( function(item) { - var select = { - 'id': item.name, - 'value': [] - }; - $("#" + item.id + '>option').each(function(option) { - select.value.push(option.selected ? "_" + option.value + "_" : "" + option.value); - }); - cfg[select.id] = select.value; - }); - - // reset box $('.details-box').fill(); $('.details-box').show(); |