* finish task #6414.
This commit is contained in:
@@ -11,7 +11,7 @@ $(document).ready(function()
|
||||
{
|
||||
var index = id.substring(5);
|
||||
var moduleID = $('#module' + index).val();
|
||||
var branch = $('#branch' + index).val();
|
||||
var branch = $('#branch' + index).length > 0 ? $('#branch' + index).val() : 0;
|
||||
if(moduleID == 'ditto')
|
||||
{
|
||||
for(var i = index - 1; i >=0; i--)
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
$(document).on('change', '.moduleChange', function()
|
||||
$(document).on('mouseup', '[id^=story].chosen-with-drop', function()
|
||||
{
|
||||
var moduleID = $(this).val();
|
||||
if(typeof(moduleID) == 'undefined') moduleID = 0;
|
||||
var id = $(this).attr('id');
|
||||
var index = id.substring(6);
|
||||
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID='+ '' + '&onlyOption=true&status=noclosed');
|
||||
$('#story' + index).load(link, function(){$(this).trigger("chosen:updated");});
|
||||
})
|
||||
|
||||
$(document).on('change', '.storyChange', function()
|
||||
{
|
||||
var storyID = $(this).val();
|
||||
if(typeof(storyID) == 'undefined') storyID = 0;
|
||||
var link = createLink('testcase', 'ajaxGetStoryModule', 'storyID=' + storyID);
|
||||
var id = $(this).attr('id');
|
||||
var index = id.substring(5);
|
||||
$.get(link, function(json)
|
||||
{
|
||||
var obj = JSON.parse(json);
|
||||
$("#module" + index).val(obj.moduleID);
|
||||
$('#module' + index).trigger("chosen:updated");
|
||||
})
|
||||
})
|
||||
var select = $(this).prev('select');
|
||||
var id = $(select).attr('id');
|
||||
var index = id.substring(5);
|
||||
var moduleID = $('#module' + index).val();
|
||||
var branch = $('#branch' + index).length > 0 ? $('#branch' + index).val() : 0;
|
||||
if(moduleID == 'ditto')
|
||||
{
|
||||
for(var i = index - 1; i >=0; i--)
|
||||
{
|
||||
if($('#module' + i).val() != 'ditto')
|
||||
{
|
||||
moduleID = $('#module' + i).val();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID='+ ($(select).val() || '0') + '&onlyOption=true&status=noclosed&limit=0&type=null');
|
||||
var $story = $('#story' + index);
|
||||
if($story.data('loadLink') !== link)
|
||||
{
|
||||
$story.load(link, function(){$story.data('loadLink', link).trigger("chosen:updated");});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user