From 3e30398b9cf08d26480d0b89d197539ac181517a Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 10 Jan 2013 06:03:32 +0000 Subject: [PATCH] * fix a bug for can not copy module in bug and case. --- module/tree/js/browse.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/tree/js/browse.js b/module/tree/js/browse.js index afd649ea72..a392520bbd 100644 --- a/module/tree/js/browse.js +++ b/module/tree/js/browse.js @@ -1,7 +1,8 @@ function syncModule(rootID, type) { - if(type == 'story') moduleID = $('#productModule').val(); - if(type == 'task') moduleID = $('#projectModule').val(); + moduleID = type == 'task' ? $('#projectModule').val() : $('#productModule').val(); + type = type == 'task' ? 'task' : 'story'; + link = createLink('tree', 'ajaxGetSonModules', 'moduleID=' + moduleID + '&rootID=' + rootID + '&type=' + type); $.getJSON(link, function(modules) {