From c0fc0b9b4c3757c6856d870a1bcbf3768c09d4d4 Mon Sep 17 00:00:00 2001 From: nacho Date: Wed, 2 Jan 2019 07:33:35 -0700 Subject: fix request ids --- ncp-web/js/ncp.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'ncp-web') 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(); -- cgit v1.2.3