Merge branch 'master' of git@github.com:easysoft/zentaopms

This commit is contained in:
wwccss
2014-03-12 17:06:28 +08:00
106 changed files with 618 additions and 378 deletions
+10
View File
@@ -1,3 +1,13 @@
$(function() {
for(i=0; i<batchCreateNum; i++) $("#story" + i).chosen({no_results_text: noResultsMatch});
})
/* Copy story title as task title. */
function copyStoryTitle(num)
{
var storyTitle = $('#story' + num).find('option:selected').text();
startPosition = storyTitle.indexOf(':') + 1;
endPosition = storyTitle.lastIndexOf('[');
storyTitle = storyTitle.substr(startPosition, endPosition - startPosition);
$('#story' + num).parent().next().find('input:first').val(storyTitle);
}
+2 -1
View File
@@ -89,9 +89,10 @@ function setStories(moduleID, projectID)
$.get(link, function(stories)
{
var storyID = $('#story').val();
if(!stories) stories = '<select id="story" name="story"></select>';
if(!stories) stories = '<select id="story" name="story" class="select-1"></select>';
$('#story').replaceWith(stories);
$('#story').val(storyID);
setPreview();
$('#story_chzn').remove();
$("#story").chosen({no_results_text: ''});
});
-26
View File
@@ -66,31 +66,5 @@ function loadProjectMembers(projectID)
$('#assignedToIdBox').load(link);
}
/**
* load stories of module.
*
* @access public
* @return void
*/
function loadModuleRelated()
{
moduleID = $('#module').val();
projectID = $('#project').val();
setStories(moduleID, projectID);
}
/* Get select of stories.*/
function setStories(moduleID, projectID)
{
link = createLink('story', 'ajaxGetProjectStories', 'projectID=' + projectID + '&productID=0&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: ''});
});
}
/* empty function. */
function setPreview(){}