* fix bug : ajdust module related.

This commit is contained in:
xia0ta0
2013-08-01 16:39:48 +08:00
parent 8ffd00eca6
commit cb6efc8eb3
3 changed files with 33 additions and 20 deletions
+20
View File
@@ -202,3 +202,23 @@ function loadProjectBuilds(projectID)
$('#resolvedBuildBox').load(link);
}
}
/**
* Set story field.
*
* @param moduleID $moduleID
* @param productID $productID
* @access public
* @return void
*/
function setStories(moduleID, productID)
{
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: ''});
});
}
-20
View File
@@ -40,26 +40,6 @@ function setAssignedTo(moduleID, productID)
});
}
/**
* Set story field.
*
* @param moduleID $moduleID
* @param productID $productID
* @access public
* @return void
*/
function setStories(moduleID, productID)
{
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: ''});
});
}
/* Save template. */
KindEditor.plugin('savetemplate', function(K)
{
+13
View File
@@ -41,3 +41,16 @@ function getList(module)
$('#taskListIdBox a').attr("href", link);
}
}
/**
* load stories of module.
*
* @access public
* @return void
*/
function loadModuleRelated()
{
moduleID = $('#module').val();
productID = $('#product').val();
setStories(moduleID, productID);
}