This commit is contained in:
chujilu
2014-08-15 17:41:31 +08:00
8 changed files with 76 additions and 5 deletions
+1
View File
@@ -762,6 +762,7 @@ class bugModel extends model
->fetch();
$bugs = $this->dao->select('*')->from(TABLE_BUG)
->where('resolvedDate')->ge($project->begin)
->andWhere('resolution')->ne('postponed')
->andWhere('product')->eq($productID)
->andWhere('deleted')->eq(0)
->orderBy('openedDate ASC')
+2 -2
View File
@@ -33,8 +33,8 @@
common::printIcon('bug', 'confirmBug', $params, $bug, 'button', 'search', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, '', 'button', '', '', 'iframe', true);
common::printIcon('bug', 'resolve', $params, $bug, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe', true);
common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe', true);
common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe showinonlybody', true);
common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe showinonlybody', true);
common::printIcon('bug', 'toStory', "product=$bug->product&module=0&story=0&project=0&bugID=$bug->id", $bug, 'button', $lang->icons['story']);
common::printIcon('bug', 'createCase', $convertParams, '', 'button', 'sitemap');
+4
View File
@@ -0,0 +1,4 @@
$(document).ready(function()
{
$("a.preview").modalTrigger({width:1000, type:'iframe'});
})
+3
View File
@@ -359,7 +359,10 @@ class doc extends control
$this->view->doc = $doc;
$this->view->libID = $libID;
$this->view->libs = $this->libs;
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->view->products = $doc->project == 0 ? $this->product->getPairs() : $this->project->getProducts($doc->project);
$this->view->projects = $this->loadModel('project')->getPairs('all');
$this->display();
}
+49
View File
@@ -0,0 +1,49 @@
function loadModule(lib)
{
if(lib == 'product')
{
type = 'productdoc';
root = 0;
}
else if(lib == 'project')
{
type = 'projectdoc';
root = 0;
}
else
{
type = 'customdoc';
root = lib;
}
$.get(createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + root + '&viewType=' + type), function(data)
{
$('#module').parents('td').html(data);
$("#module").removeAttr('onchange');
$("#module").chosen(defaultChosenOptions);
});
}
function changeByLib(lib)
{
if(lib == 'product')
{
$('#product').parents('tr').show();
$('#project').parents('tr').hide();
}
else if(lib == 'project')
{
$('#product').parents('tr').show();
$('#project').parents('tr').show();
}
else
{
$('#product').parents('tr').hide();
$('#project').parents('tr').hide();
}
}
$(function()
{
changeByLib($('#lib').val());
})
+3
View File
@@ -218,6 +218,9 @@ class docModel extends model
$doc = fixer::input('post')
->cleanInt('module')
->setDefault('module', 0)
->setIF($this->post->lib == 'product', 'project', 0)
->setIF(($this->post->lib != 'product' and $this->post->lib != 'project'), 'project', 0)
->setIF(($this->post->lib != 'product' and $this->post->lib != 'project'), 'product', 0)
->skipSpecial($this->config->doc->editor->edit['id'])
->encodeURL('url')
->add('editedBy', $this->app->user->account)
+13 -2
View File
@@ -29,6 +29,18 @@ $(document).ready(function()
</div>
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->doc->lib;?></th>
<td class='w-p25-f'><?php echo html::select('lib', $libs, $doc->lib, "class='form-control chosen' onchange='loadModule(this.value);changeByLib(this.value)'");?></td><td></td>
</tr>
<tr>
<th class='w-80px'><?php echo $lang->doc->project;?></th>
<td class='w-p25-f'><?php echo html::select('project', $projects, $doc->project, "class='form-control chosen' onchange=loadProducts(this.value)");?></td><td></td>
</tr>
<tr>
<th class='w-80px'><?php echo $lang->doc->product;?></th>
<td class='w-p25-f'><?php echo html::select('product', $products, $doc->product, "class='form-control chosen'");?></td><td></td>
</tr>
<tr>
<th class='w-80px'><?php echo $lang->doc->module;?></th>
<td class='w-p25-f'><?php echo html::select('module', $moduleOptionMenu, $doc->module, "class='form-control chosen'");?></td><td></td>
@@ -68,8 +80,7 @@ $(document).ready(function()
<tr>
<td></td>
<td colspan='2'>
<?php echo html::submitButton() . html::backButton() . html::hidden('lib', $libID);?>
<?php echo html::hidden('product', $doc->product) . html::hidden('project', $doc->project);?>
<?php echo html::submitButton() . html::backButton();?>
</td>
</tr>
</table>
+1 -1
View File
@@ -12,7 +12,7 @@
?>
<form class='form-condensed' method='post' target='hiddenwin'>
<div id='featurebar'>
<div class='heading'><i class='icon-lock'></i></div>
<div class='heading'><i class='icon-lock'> <?php echo $group->name;?></i></div>
<ul class='nav'>
<?php $params = "type=byGroup&param=$groupID&menu=%s&version=$version";?>
<li <?php echo empty($menu) ? "class='active'" : ""?>>