* fix bug for assignedTo field when create bug.

This commit is contained in:
wyd621
2013-09-29 01:16:33 +00:00
parent 548b2d9a12
commit 656c46e636
4 changed files with 21 additions and 14 deletions
+8 -7
View File
@@ -291,13 +291,14 @@ class bug extends control
{
$bug = $this->bug->getById($bugID);
extract((array)$bug);
$projectID = $bug->project;
$moduleID = $bug->module;
$taskID = $bug->task;
$storyID = $bug->story;
$buildID = $bug->openedBuild;
$severity = $bug->severity;
$type = $bug->type;
$projectID = $bug->project;
$moduleID = $bug->module;
$taskID = $bug->task;
$storyID = $bug->story;
$buildID = $bug->openedBuild;
$severity = $bug->severity;
$type = $bug->type;
$assignedTo = $bug->assignedTo;
}
/* If projectID is setted, get builds and stories of this project. */
+5 -3
View File
@@ -5,13 +5,15 @@ $(function()
if(typeof page == 'undefined') page = '';
if(page == 'create')
{
productID = $('#product').val();
productID = $('#product').val();
moduleID = $('#module').val();
assignedto = $('#assignedTo').val();
changeProductConfirmed = true;
oldStoryID = 0;
oldProjectID = 0;
oldOpenedBuild = '';
oldTaskID = 0;
setAssignedTo(0,productID);
if(!assignedto)setAssignedTo(moduleID, productID);
notice();
}
@@ -202,7 +204,7 @@ 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>';
if(!stories) stories = '<select id="story" name="story" class="select-3"></select>';
$('#story').replaceWith(stories);
$('#story_chzn').remove();
$("#story").chosen({no_results_text: ''});
+1 -1
View File
@@ -805,7 +805,7 @@ class story extends control
$moduleID = $this->tree->getAllChildID($moduleID);
}
$stories = $this->story->getProductStoryPairs($productID, $moduleID);
$select = html::select('story', $stories, $storyID, "class=''");
$select = html::select('story', $stories, $storyID, "class='select-3'");
/* If only need options, remove select wrap. */
if($onlyOption == 'true') die(substr($select, strpos($select, '>') + 1, -10));
+7 -3
View File
@@ -842,10 +842,14 @@ function setModal4List(colorboxClass, replaceID, callback)
$('#tmpDiv').replaceWith($('#tmpDiv').html());
setModal4List(colorboxClass, replaceID, callback);
$('.colored').colorize();
try{$('.colored').colorize();}catch(err){}
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
$(".date").datePicker({createButton:true, startDate:startDate})
.dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_RIGHT)
try
{
$(".date").datePicker({createButton:true, startDate:startDate})
.dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_RIGHT)
}
catch(err){}
if(typeof(callback) == 'function') callback();
$.cookie('selfClose', 0);
});