diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-01-18 08:25:42 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-01-18 08:25:42 +0100 |
commit | a3011f4ced56fb79dcc6e03e3510bfedbb2dea6e (patch) | |
tree | 4c044215144579a85b86a2efae0fffb364912547 /static | |
parent | fde6c6d36aebbbafb0ae9ce296ebea1b5ee810a0 (diff) | |
download | Ishtar-a3011f4ced56fb79dcc6e03e3510bfedbb2dea6e.tar.bz2 Ishtar-a3011f4ced56fb79dcc6e03e3510bfedbb2dea6e.zip |
Correct javascript for the current item management (refs #54)
Diffstat (limited to 'static')
-rw-r--r-- | static/js/ishtar.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/static/js/ishtar.js b/static/js/ishtar.js index 653525a07..c1aa2f569 100644 --- a/static/js/ishtar.js +++ b/static/js/ishtar.js @@ -2,13 +2,16 @@ $(document).ready(function(){ $("#main_menu ul ul").hide(); $("#main_menu ul ul .selected").parent().show(); var items = new Array('file', 'operation'); - for (idx in items){ - $("#current_" + items[idx]).change(function(){ - $.post('/' + url_path + 'update-current-item/', - {item:items[idx], value:$("#current_" + items[idx]).val()} - ); - }); - } + $("#current_file").change(function(){ + $.post('/' + url_path + 'update-current-item/', + {item:'file', value:$("#current_file").val()} + ); + }); + $("#current_operation").change(function(){ + $.post('/' + url_path + 'update-current-item/', + {item:'operation', value:$("#current_operation").val()} + ); + }); }); $("#main_menu ul li").live('click', function(){ |