* code for task#1383.

This commit is contained in:
zhujinyong
2013-06-19 03:17:02 +00:00
parent 5c50476f75
commit 7c7928cae6
2 changed files with 22 additions and 1 deletions
+21
View File
@@ -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 = '<select id="story" name="story"></select>';
$('#story').replaceWith(stories);
$('#story_chzn').remove();
$("#story").chosen({no_results_text: ''});
});
}
+1 -1
View File
@@ -19,7 +19,7 @@
<th class='rowhead'><?php echo $lang->testcase->lblProductAndModule;?></th>
<td>
<?php echo html::select('product', $products, $productID, "onchange=loadAll(this.value); class='select-3'");?>
<span id='moduleIdBox'><?php echo html::select('module', $moduleOptionMenu, $currentModuleID);?></span>
<span id='moduleIdBox'><?php echo html::select('module', $moduleOptionMenu, $currentModuleID, "onchange=setStories();");?></span>
</td>
</tr>
<tr>