diff --git a/module/product/js/browse.js b/module/product/js/browse.js index b17d351f08..d6c6c9404d 100644 --- a/module/product/js/browse.js +++ b/module/product/js/browse.js @@ -107,13 +107,13 @@ $(function() $('#batchUnlinkStory').click(function() { - var storyIdList = ''; - $("input[name^='storyIdList']:checked").each(function() + var storyIdList = []; + $("#productStoryForm input[name^='storyIdList']").each(function() { - storyIdList += $(this).val() + ','; + storyIdList.push($(this).val()); }); - $.get(createLink('projectstory', 'batchUnlinkStory', 'projectID=' + projectID + '&storyIdList=' + storyIdList), function(data) + $.get(createLink('projectstory', 'batchUnlinkStory', 'projectID=' + projectID + '&storyIdList=' + storyIdList.join(',')), function(data) { if(data) {