* finish the feature of bug openedbuild.

This commit is contained in:
wangchunsheng
2010-03-03 02:25:47 +00:00
parent 714fbc9ab3
commit dbade1e8db
6 changed files with 78 additions and 42 deletions
+22 -16
View File
@@ -23,8 +23,9 @@
*/
?>
<?php include '../../common/header.html.php';?>
<?php include '../../common/autocomplete.html.php';?>
<style>
#project, #product, #story, #openedBuild {width:245px}
#project, #product, #story{width:245px}
#severity, #browser {width: 113px}
</style>
<script language='Javascript'>
@@ -103,73 +104,78 @@ function loadProjectBuilds(projectID)
link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&varName=openedBuild');
$('#buildBox').load(link);
}
var userList = "<?php echo join(',', array_keys($users));?>".split(',');
$(function() {
$("#mailto").autocomplete(userList, { multiple: true, mustMatch: true});
})
</script>
<div class='yui-doc3'>
</script>
<div class='yui-d0'>
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table align='center' class='table-1'>
<table class='table-1'>
<caption><?php echo $lang->bug->create;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->bug->lblProductAndModule;?></th>
<td class='a-left'>
<td>
<?php echo html::select('product', $products, $productID, "onchange=loadAll(this.value); class='select-2'");?>
<span id='moduleIdBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, 'class=select-3');?></span>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->lblProjectAndTask;?></th>
<td class='a-left'>
<td>
<span id='projectIdBox'><?php echo html::select('project', $projects, $projectID, 'onchange=loadProjectRelated(this.value)');?></span>
<span id='taskIdBox'></span>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->lblStory;?></th>
<td class='a-left'>
<td>
<span id='storyIdBox'><?php echo html::select('story', $stories, $storyID);?></span>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->openedBuild;?></th>
<td class='a-left'>
<span id='buildBox'><?php echo html::select('openedBuild', $builds, $buildID);?></span>
<td>
<span id='buildBox'><?php echo html::select('openedBuild[]', $builds, $buildID, 'size=4 multiple=multiple class=select-3');?></span>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->lblTypeAndSeverity;?></th>
<td class='a-left'>
<td>
<?php echo html::select('type', (array)$lang->bug->typeList, 'codeerror', 'class=select-2');?>
<?php echo html::select('severity', (array)$lang->bug->severityList, '', 'class=select-2');?>
</td>
</tr>
<tr>
<th class='rowhead'><nobr><?php echo $lang->bug->lblSystemBrowserAndHardware;?></nobr></th>
<td class='a-left'>
<td>
<?php echo html::select('os', (array)$lang->bug->osList, '', 'class=select-2');?>
<?php echo html::select('browser', (array)$lang->bug->browserList, '', 'class=select-2');?>
</td>
</tr>
<tr>
<th class='rowhead'><nobr><?php echo $lang->bug->lblAssignedTo;?></nobr></th>
<td class='a-left'> <?php echo html::select('assignedTo', $users, '', 'class=select-3');?></td>
<td> <?php echo html::select('assignedTo', $users, '', 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><nobr><?php echo $lang->bug->lblMailto;?></nobr></th>
<td class='a-left'> <?php echo html::select('mailto[]', $users, '', 'class=select-3 size=5 multiple=multiple');?> </td>
<td> <?php echo html::input('mailto', '', 'class=text-1');?> </td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->title;?></th>
<td class='a-left'><input type='text' name='title' class='text-1' value='<?php echo $title;?>' /></td>
<td><?php echo html::input('title', '', "class='text-1'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->steps;?></th>
<td class='a-left'><textarea name='steps' class='area-1' rows='6'><?php echo $steps;?></textarea></td>
<td><textarea name='steps' class='area-1' rows='6'><?php echo $steps;?></textarea></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->files;?></th>
<td class='a-left'><?php echo $this->fetch('file', 'buildform');?></td>
<td><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<td colspan='2'>
<td colspan='2' class='a-center'>
<?php echo html::submitButton() . html::resetButton() . html::hidden('case', $caseID);?>
</td>
</tr>
+10 -3
View File
@@ -23,7 +23,10 @@
*/
?>
<?php include '../../common/header.html.php';?>
<style>#product, #module, #project, #story, #task, #openedBuild, #resolvedBuild{width:245px}</style>
<?php include '../../common/autocomplete.html.php';?>
<style>
#product, #module, #project, #story, #task, #resolvedBuild{width:245px}
</style>
<script language='Javascript'>
changeProductConfirmed = false;
changeProjectConfirmed = false;
@@ -133,6 +136,10 @@ function setDuplicate(resolution)
$('#duplicateBugBox').hide();
}
}
var userList = "<?php echo join(',', array_keys($users));?>".split(',');
$(function() {
$("#mailto").autocomplete(userList, { multiple: true, mustMatch: true});
})
</script>
<form method='post' target='hiddenwin' enctype='multipart/form-data'>
<div class='yui-d0'>
@@ -244,7 +251,7 @@ function setDuplicate(resolution)
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->openedBuild;?></td>
<td><span id='openedBuildBox'><?php echo html::select('openedBuild', $builds, $bug->openedBuild, 'class=select-3');?></span></td>
<td><span id='openedBuildBox'><?php echo html::select('openedBuild[]', $openedBuilds, $bug->openedBuild, 'size=4 multiple=multiple class=select-3');?></span></td>
</tr>
<tr>
<td width='40%' class='rowhead'><?php echo $lang->bug->resolvedBy;?></td>
@@ -256,7 +263,7 @@ function setDuplicate(resolution)
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->resolvedBuild;?></td>
<td><span id='resolvedBuildBox'><?php echo html::select('resolvedBuild', $builds, $bug->resolvedBuild, 'class=select-3');?></span></td>
<td><span id='resolvedBuildBox'><?php echo html::select('resolvedBuild', $resolvedBuilds, $bug->resolvedBuild, 'class=select-3');?></span></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->resolution;?></td>
+14 -2
View File
@@ -122,7 +122,19 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->openedBuild;?></th>
<td><?php if(isset($builds[$bug->openedBuild])) echo $builds[$bug->openedBuild]; else echo $bug->openedBuild;?></td>
<td>
<?php
if($bug->openedBuild)
{
$openedBuilds = explode(',', $bug->openedBuild);
foreach($openedBuilds as $openedBuild) isset($builds[$openedBuild]) ? print($builds[$openedBuild] . '<br />') : print($openedBuild . '<br />');
}
else
{
echo $bug->openedBuild;
}
?>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->lblResolved;?></th>
@@ -174,7 +186,7 @@
<table class='table-1 a-left fixed'>
<tr>
<td class='rowhead w-p20'><?php echo $lang->bug->mailto;?></td>
<td><?php $mailto = explode(',', $bug->mailto); foreach($mailto as $account) echo ' ' . $users[$account]; ?></td>
<td><?php $mailto = explode(',', str_replace(' ', '', $bug->mailto)); foreach($mailto as $account) echo ' ' . $users[$account]; ?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->linkBug;?></td>