summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
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
commit8a2fb2cb21fbc7c12990e6fd2ccd7494e8609fd4 (patch)
tree4c044215144579a85b86a2efae0fffb364912547 /static
parent9b0cc8a5f0aaef6e875facc58e336654639becc6 (diff)
downloadIshtar-8a2fb2cb21fbc7c12990e6fd2ccd7494e8609fd4.tar.bz2
Ishtar-8a2fb2cb21fbc7c12990e6fd2ccd7494e8609fd4.zip
Correct javascript for the current item management (refs #54)
Diffstat (limited to 'static')
-rw-r--r--static/js/ishtar.js17
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(){