* code for task #1802.
This commit is contained in:
@@ -1 +1,2 @@
|
||||
ALTER TABLE `zt_project` DROP `goal`;
|
||||
ALTER TABLE `zt_build` ADD `packageType` varchar(10) COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'path' AFTER `scmPath`;
|
||||
|
||||
@@ -1,4 +1,22 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("a.preview").colorbox({width:1000, height:550, iframe:true, transition:'none', scrolling:true});
|
||||
if(typeof(packageType) != 'undefined')
|
||||
{
|
||||
var hiddenDom = packageType == 'filePath' ? 'fileform' : 'filePath';
|
||||
$('#' + hiddenDom).parents('tr').addClass('hidden');
|
||||
}
|
||||
$("input[name='packageType']").bind('click', function()
|
||||
{
|
||||
if($(this).val() == 'path')
|
||||
{
|
||||
$('#filePath').parents('tr').removeClass('hidden');
|
||||
$('#fileform').parents('tr').addClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#filePath').parents('tr').addClass('hidden');
|
||||
$('#fileform').parents('tr').removeClass('hidden');
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -37,6 +37,10 @@ $lang->build->linkStories = 'Stories';
|
||||
$lang->build->linkBugs = 'Bugs';
|
||||
$lang->build->stories = 'Linked stories';
|
||||
$lang->build->bugs = 'Linked bugs';
|
||||
$lang->build->packageType = 'Package type';
|
||||
|
||||
$lang->build->finishStories = 'The total demand for a complete %s';
|
||||
$lang->build->resolvedBugs = 'The total solution of bug%s';
|
||||
|
||||
$lang->build->packageTypeList['path'] = 'Shared file';
|
||||
$lang->build->packageTypeList['file'] = 'Upload file';
|
||||
|
||||
@@ -37,6 +37,10 @@ $lang->build->linkStories = '相关需求';
|
||||
$lang->build->linkBugs = '相关Bug';
|
||||
$lang->build->stories = '已关联需求';
|
||||
$lang->build->bugs = '已关联Bug';
|
||||
$lang->build->packageType = '发行包方式';
|
||||
|
||||
$lang->build->finishStories = '本次共完成需求%s个';
|
||||
$lang->build->resolvedBugs = '本次共解决Bug%s个';
|
||||
|
||||
$lang->build->packageTypeList['path'] = '文件共享';
|
||||
$lang->build->packageTypeList['file'] = '上传附件';
|
||||
|
||||
@@ -156,7 +156,12 @@ class buildModel extends model
|
||||
->setDefault('product', 0)
|
||||
->join('stories', ',')
|
||||
->join('bugs', ',')
|
||||
->add('project', (int)$projectID)->remove('resolvedBy,allchecker,files,labels')->get();
|
||||
->add('project', (int)$projectID)
|
||||
->remove('resolvedBy,allchecker,files,labels')
|
||||
->get();
|
||||
|
||||
if($build->packageType == 'path') unset($_FILES);
|
||||
|
||||
$this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->check('name', 'unique', "product = {$build->product}")->exec();
|
||||
if(!dao::isError())
|
||||
{
|
||||
@@ -185,6 +190,9 @@ class buildModel extends model
|
||||
->join('bugs', ',')
|
||||
->remove('allchecker,resolvedBy,files,labels')
|
||||
->get();
|
||||
|
||||
if($build->packageType == 'path') unset($_FILES);
|
||||
|
||||
$this->dao->update(TABLE_BUILD)->data($build)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->build->edit->requiredFields, 'notempty')
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
<th class='rowhead'><?php echo $lang->build->scmPath;?></th>
|
||||
<td><?php echo html::input('scmPath', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->packageType;?></th>
|
||||
<td><?php echo html::radio('packageType', $lang->build->packageTypeList, 'path');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->filePath;?></th>
|
||||
<td><?php echo html::input('filePath', '', "class='text-1'");?></td>
|
||||
@@ -114,4 +118,5 @@
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php js::set('packageType', 'filePath')?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
<th class='rowhead'><?php echo $lang->build->scmPath;?></th>
|
||||
<td><?php echo html::input('scmPath', $build->scmPath, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->packageType;?></th>
|
||||
<td><?php echo html::radio('packageType', $lang->build->packageTypeList, $build->packageType);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->filePath;?></th>
|
||||
<td><?php echo html::input('filePath', $build->filePath, "class='text-1'");?></td>
|
||||
@@ -130,4 +134,5 @@
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton() . html::backButton() .html::hidden('project', $build->project);?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php js::set('packageType', $build->packageType == 'file' ? 'fileform' : 'filePath')?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user