From 7c7928cae6e43bcfa9fdefc26bdcffb1ddedb45e Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Wed, 19 Jun 2013 03:17:02 +0000 Subject: [PATCH] * code for task#1383. --- module/testcase/js/create.js | 21 +++++++++++++++++++++ module/testcase/view/create.html.php | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/module/testcase/js/create.js b/module/testcase/js/create.js index 0d9f3eda69..f4226d70b3 100644 --- a/module/testcase/js/create.js +++ b/module/testcase/js/create.js @@ -14,8 +14,29 @@ function setPreview() $('#preview').attr('href', storyLink); } } + $(function() { $("#story").chosen({no_results_text: noResultsMatch}); $("#preview").colorbox({width:960, height:550, iframe:true, transition:'none', scrolling:true}); }) + +/** + * Set story field. + * + * @access public + * @return void + */ +function setStories() +{ + moduleID = $('#module').val(); + productID = $('#product').val(); + link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&moduleID=' + moduleID); + $.get(link, function(stories) + { + if(!stories) stories = ''; + $('#story').replaceWith(stories); + $('#story_chzn').remove(); + $("#story").chosen({no_results_text: ''}); + }); +} diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index 5f68ab2db4..4ac571a57e 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -19,7 +19,7 @@ testcase->lblProductAndModule;?> - +