Merge branch 'master' into 'sprint/180_xieqiyu_18166'

# Conflicts:
#   module/project/config.php
This commit is contained in:
孙广明
2022-01-07 00:46:43 +00:00
49 changed files with 151 additions and 212 deletions
+1 -1
View File
@@ -2793,7 +2793,7 @@ class EndResponseException extends \Exception
/**
* @param string $content
*
* @return sellf
* @return self
*/
public static function create($content = '')
{
+5 -1
View File
@@ -1227,17 +1227,21 @@ class actionModel extends model
if(!common::hasPriv($moduleName, $methodName) and !$isLoginOrLogout) return false;
$action->objectLabel = $objectLabel;
$action->product = trim($action->product, ',');
if(isset($this->config->maxVersion)
and strpos($this->config->action->assetType, $action->objectType) !== false
and empty($action->project) and empty($action->product) and empty($action->execution))
{
$method = $this->config->action->assetViewMethod[$action->objectType];
if($action->objectType == 'doc')
{
$assetLibType = $this->dao->select('assetLibType')->from(TABLE_DOC)->where('id')->eq($action->objectID)->fetch('assetLibType');
$method = $assetLibType == 'practice' ? 'practiceView' : 'componentView';
}
else
{
$method = $this->config->action->assetViewMethod[$action->objectType];
}
$action->objectLink = helper::createLink('assetlib', $method, sprintf($vars, $action->objectID));
}
@@ -31,7 +31,7 @@
<th><?php echo $lang->block->totalStory . ':';?></th>
<td><?php echo $totalData[$projectID]->allStories;?></td>
<th><?php echo $lang->block->totalPeople . ':';?></th>
<td><?php echo $totalData[$projectID]->teamCount ? html::a($this->createLink('project', 'team', 'projectID=' . $projectID), $totalData[$projectID]->teamCount) : 0;?></td>
<td><?php echo $totalData[$projectID]->teamCount ? html::a($this->createLink('project', 'team', 'projectID=' . $projectID), $totalData[$projectID]->teamCount) : 0;?></td>
<th><?php echo $lang->block->estimatedHours . ':';?></th>
<td><?php echo $totalData[$projectID]->estimate . $lang->execution->workHour;?></td>
<th><?php echo $lang->block->totalBug. ':';?></th>
+4 -2
View File
@@ -764,8 +764,8 @@ class bugModel extends model
$bug->resolution = $data->resolutions[$bugID];
$bug->duplicateBug = $data->duplicateBugs[$bugID] ? $data->duplicateBugs[$bugID] : $oldBug->duplicateBug;
if($bug->assignedTo != $oldBug->assignedTo) $bug->assignedDate = $now;
if($bug->resolution != '') $bug->confirmed = 1;
if($bug->assignedTo != $oldBug->assignedTo) $bug->assignedDate = $now;
if($bug->resolution != '') $bug->confirmed = 1;
if(($bug->resolvedBy != '' or $bug->resolution != '') and $oldBug->status != 'closed')
{
$bug->resolvedDate = $now;
@@ -2694,6 +2694,8 @@ class bugModel extends model
* @param array $stories
* @param array $tasks
* @param string $mode
* @param array $projectPairs
*
* @access public
* @return void
*/
+4 -2
View File
@@ -805,8 +805,10 @@ class doc extends control
return print(html::select('users[]', $users, $whitelist, "class='form-control chosen' multiple"));
}
return print(html::select('users[]', $users, $doclib->users, "class='form-control chosen' multiple"));
else
{
return print(html::select('users[]', $users, $doclib->users, "class='form-control chosen' multiple"));
}
}
/**
+6 -6
View File
@@ -7,7 +7,7 @@
*/
function loadModules(libID)
{
link = createLink('doc', 'ajaxGetModules', 'libID=' + libID);
var link = createLink('doc', 'ajaxGetModules', 'libID=' + libID);
$('#moduleBox').load(link, function(){$('#moduleBox').find('select').chosen()});
}
@@ -24,12 +24,12 @@ function toggleAcl(acl, type)
if(acl == 'custom')
{
$('#whiteListBox').removeClass('hidden');
$('#groupWhiteListBox').removeClass('hidden');
$('#groupBox').removeClass('hidden');
}
else if(acl == 'private')
{
$('#whiteListBox').removeClass('hidden');
$('#groupWhiteListBox').addClass('hidden');
$('#groupBox').addClass('hidden');
}
else
{
@@ -46,9 +46,9 @@ function toggleAcl(acl, type)
if(libType == 'project' && typeof(doclibID) != 'undefined')
{
link = createLink('doc', 'ajaxGetWhitelist', 'doclibID=' + doclibID + '&acl=' + acl);
var link = createLink('doc', 'ajaxGetWhitelist', 'doclibID=' + doclibID + '&acl=' + acl);
$.get(link, function(users)
{
{
$('#users').replaceWith(users);
$('#users_chosen').remove();
$('#users').chosen();
@@ -71,7 +71,7 @@ function toggleAcl(acl, type)
*/
function loadDocModule(libID)
{
link = createLink('doc', 'ajaxGetChild', 'libID=' + libID);
var link = createLink('doc', 'ajaxGetChild', 'libID=' + libID);
$.post(link, function(data)
{
$('#module').replaceWith(data);
+3 -3
View File
@@ -1333,7 +1333,7 @@ class docModel extends model
/* Sort project. */
$orderedProjects = array();
/* Project permissions for DocLib whitelist */
/* Project permissions for DocLib whitelist. */
if($this->app->tab == 'doc')
{
$myObjects = $this->dao->select('t2.id, t2.name')->from(TABLE_DOCLIB)->alias('t1')
@@ -2561,8 +2561,8 @@ EOT;
{
if(empty($type))
{
$doclib = $this->getLibById($libID);
$type = $doclib->type == 'execution' ? 'project' : $doclib->type;
$doclib = $this->getLibById($libID);
$type = $doclib->type == 'execution' ? 'project' : $doclib->type;
$objectID = $type == 'custom' or $type == 'book' ? 0 : $doclib->$type;
}
+1 -1
View File
@@ -59,7 +59,7 @@
<tr id='whiteListBox' class='hidden'>
<th><?php echo $lang->doc->whiteList;?></th>
<td>
<div id='groupWhiteListBox' class='input-group'>
<div id='groupBox' class='input-group'>
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
<?php echo html::select('groups[]', $groups, '', "class='form-control chosen' multiple")?>
</div>
+1 -1
View File
@@ -64,7 +64,7 @@
<tr id='whiteListBox' class='hidden'>
<th><?php echo $lang->doc->whiteList?></th>
<td>
<div id='groupWhiteListBox' class='input-group'>
<div id='groupBox' class='input-group'>
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
<?php echo html::select('groups[]', $groups, $lib->groups, "class='form-control chosen' multiple")?>
</div>
+5 -4
View File
@@ -239,6 +239,7 @@ class execution extends control
$this->view->setModule = true;
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
$this->view->showBranch = $showBranch;
$this->view->projectName = $this->config->systemMode == 'new' ? $this->loadModel('project')->getById($execution->project)->name . ' / ' . $execution->name : $execution->name;
$this->display();
}
@@ -1972,10 +1973,10 @@ class execution extends control
foreach($plans as $plan) $allPlans += $plan;
}
$userList = $this->dao->select('account, realname name, avatar')->from(TABLE_USER)->where('deleted')->eq(0)->fetchAll('account');
$userList['closed']['account'] = 'Closed';
$userList['closed']['name'] = 'Closed';
$userList['closed']['avatar'] = '';
$userList = $this->dao->select('account, realname, avatar')->from(TABLE_USER)->where('deleted')->eq(0)->fetchAll('account');
$userList['closed']['account'] = 'Closed';
$userList['closed']['realname'] = 'Closed';
$userList['closed']['avatar'] = '';
$this->view->title = $this->lang->execution->kanban;
$this->view->position[] = html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name);
+1 -1
View File
@@ -39,7 +39,7 @@ function renderUserAvatar(user, objectType, objectID, size)
if(objectType == 'story' && !priv.canAssignStory) return $noPrivAvatar;
if(objectType == 'bug' && !priv.canAssignBug) return $noPrivAvatar;
return $('<a class="avatar has-text ' + avatarSizeClass + ' avatar-circle iframe" title="' + user.name + '" href="' + link + '"/>').avatar({user: user});
return $('<a class="avatar has-text ' + avatarSizeClass + ' avatar-circle iframe" title="' + user.realname + '" href="' + link + '"/>').avatar({user: user});
}
/**
+1 -1
View File
@@ -1324,7 +1324,7 @@ class executionModel extends model
$module = 'execution';
$method = 'testcase';
}
if($module == 'testtask' and ($method == 'view' || $method == 'create' || $method == 'edit' || $method == 'linkcase'))
if($module == 'testtask')
{
$module = 'execution';
$method = 'testtask';
+1 -1
View File
@@ -230,7 +230,7 @@
<td colspan='2'>
<div class='input-group'>
<?php echo html::select('whitelist[]', $users, $whitelist, 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName='whitelist'");?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
</div>
</td>
</tr>
+1 -1
View File
@@ -194,7 +194,7 @@
<td>
<div class='input-group'>
<?php echo html::select('whitelist[]', $users, $execution->whitelist, 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName='whitelist'");?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
</div>
</td>
</tr>
+1 -2
View File
@@ -182,8 +182,7 @@ body {margin-bottom: 25px;}
<?php if($this->app->getViewType() == 'xhtml'):?>
<div id="xx-title">
<strong>
<?php $projectName = $this->config->systemMode == 'new' ? $this->project->getById($execution->project)->name . ' / ' : '';?>
<?php echo ($projectName . $this->execution->getByID($execution->id)->name);?>
<?php echo $projectName;?>
</strong>
<div class="linkButton" onclick="handleLinkButtonClick()">
<span title="<?php echo $lang->viewDetails;?>">
+1 -1
View File
@@ -21,7 +21,7 @@ else
echo '<a title="' . $lang->user->contacts->manage . '" href="' . $this->createLink('my', 'managecontacts', "listID=0&mode=new", '', true) . "\" target='_blank' data-icon='cog' data-title='{$lang->user->contacts->manage}' class='btn btn-icon iframe'><i class='icon icon-cog'></i></a>";
echo '</span>';
echo '<span class="input-group-btn">';
echo '<button type="button" title="' . $lang->refresh . '" class="btn btn-icon" onclick="ajaxGetContacts(this)"><i class="icon icon-refresh"></i></button>';
echo '<button type="button" title="' . $lang->refresh . '" class="btn btn-icon"' . "onclick=\"ajaxGetContacts(this, '$dropdownName')\"" . '><i class="icon icon-refresh"></i></button>';
echo '</span>';
}
?>
+2 -2
View File
@@ -104,10 +104,10 @@
</tr>
<tr id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td colspan='2'>
<td colspan='1'>
<div class='input-group'>
<?php echo html::select('whitelist[]', $users, '', 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName='whitelist'");?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
</div>
</td>
</tr>
+1 -1
View File
@@ -90,7 +90,7 @@
<td>
<div class='input-group'>
<?php echo html::select('whitelist[]', $users, $product->whitelist, 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName='whitelist'");?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
</div>
</td>
</tr>
-2
View File
@@ -2,10 +2,8 @@
$config->productplan = new stdclass();
$config->productplan->create = new stdclass();
$config->productplan->edit = new stdclass();
$config->productplan->start = new stdclass();
$config->productplan->create->requiredFields = 'title';
$config->productplan->edit->requiredFields = 'title';
$config->productplan->start->requiredFields = 'begin,end';
$config->productplan->editor = new stdclass();
$config->productplan->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
+8 -29
View File
@@ -164,11 +164,11 @@ class productplan extends control
return print(js::locate($this->session->productPlanList, 'parent'));
}
$planIDList = $this->post->planIDList ? $this->post->planIDList : return print(js::locate($this->session->productPlanList, 'parent'));
if(!$this->post->planIDList) return print(js::locate($this->session->productPlanList, 'parent'));
$this->commonAction($productID, $branch);
$plans = $this->productplan->getByIDList($planIDList);
$plans = $this->productplan->getByIDList($this->post->planIDList);
$oldBranch = array();
foreach($plans as $plan) $oldBranch[$plan->id] = $plan->branch;
@@ -401,37 +401,16 @@ class productplan extends control
*/
public function start($planID, $confirm = 'no')
{
$plan = $this->productplan->getByID($planID);
if($_POST)
if($confirm == 'no')
{
$changes = $this->productplan->start($planID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$actionID = $this->loadModel('action')->create('productplan', $planID, 'started');
$this->action->logHistory($actionID, $changes);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
}
if(!isonlybody())
{
if($confirm == 'no')
{
die(js::confirm($this->lang->productplan->confirmStart, $this->createLink('productplan', 'start', "planID=$planID&confirm=yes")));
}
else
{
$this->productplan->updateStatus($planID, 'doing', 'started');
if(dao::isError()) die(js::error(dao::getError()));
die(js::reload('parent'));
}
die(js::confirm($this->lang->productplan->confirmStart, $this->createLink('productplan', 'start', "planID=$planID&confirm=yes")));
}
else
{
$this->view->plan = $plan;
$this->display();
$this->productplan->updateStatus($planID, 'doing', 'started');
if(dao::isError()) die(js::error(dao::getError()));
die(js::reload('parent'));
}
}
+3 -3
View File
@@ -7,10 +7,10 @@
*/
function changeDate(planID)
{
if($("#future"+planID).prop('checked'))
if($("#future" + planID).prop('checked'))
{
$("input[name='begin[" + planID + "]']").attr('disabled', 'disabled');
$("input[name='end[" + planID + "]']").attr('disabled', 'disabled');
$("input[name='begin[" + planID + "]']").attr('disabled', 'disabled').val('');
$("input[name='end[" + planID + "]']").attr('disabled', 'disabled').val('');
}
else
{
+3 -14
View File
@@ -150,18 +150,7 @@ function createCardMenu(options)
if(privs.includes('linkStory')) items.push({label: productplanLang.linkStory, icon: 'link', url: createLink('productplan', 'view', "planID=" + card.id + "&type=story&orderBy=id_desc&link=true")});
if(privs.includes('linkBug')) items.push({label: productplanLang.linkBug, icon: 'bug', url: createLink('productplan', 'view', "planID=" + card.id + "&type=bug&orderBy=id_desc&link=true")});
if(privs.includes('edit')) items.push({label: productplanLang.edit, icon: 'edit', url: createLink('productplan', 'edit', "planID=" + card.id)});
if(privs.includes('start'))
{
if(card.begin == '2030-01-01' || card.end == '2030-01-01')
{
items.push({label: productplanLang.start, icon: 'start', url: createLink('productplan', 'start', "planID=" + card.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-id': card.id, 'data-width': '70%'}});
}
else
{
items.push({label: productplanLang.start, icon: 'start', url: createLink('productplan', 'start', "planID=" + card.id), attrs: {'target': 'hiddenwin'}});
}
}
if(privs.includes('start')) items.push({label: productplanLang.start, icon: 'start', url: createLink('productplan', 'start', "planID=" + card.id), attrs: {'target': 'hiddenwin'}});
if(privs.includes('finish')) items.push({label: productplanLang.finish, icon: 'checked', url: createLink('productplan', 'finish', "planID=" + card.id), attrs: {'target': 'hiddenwin'}});
if(privs.includes('close')) items.push({label: productplanLang.close, icon: 'off', url: createLink('productplan', 'close', "planID=" + card.id), attrs: {'target': 'hiddenwin'}});
if(privs.includes('activate')) items.push({label: productplanLang.activate, icon: 'magic', url: createLink('productplan', 'activate', "planID=" + card.id), attrs: {'target': 'hiddenwin'}});
@@ -269,8 +258,8 @@ function changeCardColType(card, fromColType, toColType, kanbanID)
{
if(fromColType == 'wait' && privs.includes('start'))
{
showIframe = (card.begin == '2030-01-01' || card.end == '2030-01-01') ? true : false;
link = createLink('productplan', 'start', 'planID=' + objectID, '', showIframe);
link = createLink('productplan', 'start', 'planID=' + objectID);
showIframe = false;
}
else if((fromColType == 'done' || fromColType == 'closed') && privs.includes('activate'))
{
+1 -1
View File
@@ -92,7 +92,7 @@ $('#future').on('change', function()
{
if($(this).prop('checked'))
{
$('#begin').attr('disabled', 'disabled');
$('#begin').attr('disabled', 'disabled').val('');
$('#end').parents('tr').hide();
}
else
-37
View File
@@ -516,43 +516,6 @@ class productplanModel extends model
}
}
/**
* Start a plan.
*
* @param int $planID
* @access public
* @return array
*/
public function start($planID)
{
$oldPlan = $this->getByID($planID);
$plan = fixer::input('post')
->add('status', 'doing')
->stripTags($this->config->productplan->editor->start['id'], $this->config->allowedTags)
->remove('uid')
->get();
$this->checkDate4Plan($oldPlan, $plan->begin, $plan->end);
if(dao::isError()) return false;
$plan = $this->loadModel('file')->processImgURL($plan, $this->config->productplan->editor->start['id'], $this->post->uid);
$this->dao->update(TABLE_PRODUCTPLAN)
->data($plan)
->autoCheck()
->batchCheck($this->config->productplan->start->requiredFields, 'notempty')
->checkIF(!empty($plan->begin) and !empty($plan->end), 'end', 'ge', $plan->begin)
->where('id')->eq($planID)
->exec();
if(dao::isError()) return false;
if($oldPlan->parent > 0) $this->updateParentStatus($oldPlan->parent);
$this->file->updateObjectID($this->post->uid, $planID, 'productplan');
return common::createChanges($oldPlan, $plan);
}
/**
* Update a plan's status.
*
+5 -5
View File
@@ -38,7 +38,7 @@
</thead>
<tbody>
<?php foreach($plans as $plan):?>
<?php $isChecked = ($plan->begin == '2030-01-01' or $plan->end == '2030-01-01') ? 'checked="checked"' : '';?>
<?php $isChecked = ($plan->begin == $config->productplan->future and $plan->end == $config->productplan->future) ? 'checked="checked"' : '';?>
<tr>
<td class='text-center'><?php echo $plan->id . html::hidden("id[$plan->id]", $plan->id);?></td>
<?php if($product->type != 'normal'):?>
@@ -53,10 +53,10 @@
<?php else:?>
<td><?php echo html::select("status[$plan->id]", array_slice($lang->productplan->statusList,($plan->status == 'wait' ? 0 : 1)), $plan->status, "class='form-control chosen' disabled onchange='setPlanStatus($plan->id, this.value, $plan->parent)'");?></td>
<?php endif;?>
<?php $disabled = (($plan->begin == '2030-01-01' or $plan->end == '2030-01-01') and $plan->status == 'wait') ? 'disabled="disabled"' : '';?>
<?php if($plan->parent == -1 and ($plan->begin == '2030-01-01' or $plan->end == '2030-01-01')) $disabled = 'disabled="disabled"';?>
<?php if($plan->begin == '2030-01-01') $plan->begin = '';?>
<?php if($plan->end == '2030-01-01') $plan->end = '';?>
<?php $disabled = (($plan->begin == $config->productplan->future and $plan->end == $config->productplan->future) and $plan->status == 'wait') ? 'disabled="disabled"' : '';?>
<?php if($plan->parent == -1 and ($plan->begin == $config->productplan->future and $plan->end == $config->productplan->future)) $disabled = 'disabled="disabled"';?>
<?php if($plan->begin == $config->productplan->future) $plan->begin = '';?>
<?php if($plan->end == $config->productplan->future) $plan->end = '';?>
<td><?php echo html::input("begin[$plan->id]", $plan->begin, "class='form-control form-date' $disabled");?></td>
<td><?php echo html::input("end[$plan->id]", $plan->end, "class='form-control form-date' $disabled");?></td>
<?php $hidden = ($plan->status != 'wait' and $plan->parent != -1) ? 'hidden' : '';?>
+6 -14
View File
@@ -134,8 +134,8 @@
<?php if($this->session->currentProductType != 'normal'):?>
<td class='c-branch' title='<?php echo $branchOption[$plan->branch];?>'><?php if($plan->parent != '-1') echo $branchOption[$plan->branch];?></td>
<?php endif;?>
<td><?php echo $plan->begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?></td>
<td><?php echo $plan->end == '2030-01-01' ? $lang->productplan->future : $plan->end;?></td>
<td><?php echo $plan->begin == $config->productplan->future ? $lang->productplan->future : $plan->begin;?></td>
<td><?php echo $plan->end == $config->productplan->future ? $lang->productplan->future : $plan->end;?></td>
<td class='text-center'><?php echo $plan->stories;?></td>
<td class='text-center'><?php echo $plan->bugs;?></td>
<td class='text-center'><?php echo $plan->hour;?></td>
@@ -149,18 +149,10 @@
<?php
if($plan->parent >= 0 )
{
$attr = "target='hiddenwin'";
$isOnlyBody = false;
$class = '';
if($plan->begin == '2030-01-01' or $plan->end == '2030-01-01')
{
$class = 'iframe';
$attr = "data-id='{$plan->id}' data-width='70%'";
$isOnlyBody = true;
}
common::printIcon('productplan', 'start', "planID=$plan->id", $plan, 'list', 'play', '', $class, $isOnlyBody, $attr);
common::printIcon('productplan', 'finish', "planID=$plan->id", $plan, 'list', 'checked', '', $class, false, $attr);
common::printIcon('productplan', 'close', "planID=$plan->id", $plan, 'list', 'off', '', $class, false, $attr);
$attr = "target='hiddenwin'";
common::printIcon('productplan', 'start', "planID=$plan->id", $plan, 'list', 'play', '', '', false, $attr);
common::printIcon('productplan', 'finish', "planID=$plan->id", $plan, 'list', 'checked', '', '', false, $attr);
common::printIcon('productplan', 'close', "planID=$plan->id", $plan, 'list', 'off', '', '', false, $attr);
}
$attr = $plan->expired ? "disabled='disabled'" : '';
+4 -4
View File
@@ -48,9 +48,9 @@
</tr>
<tr>
<?php $hidden = $plan->status != 'wait' ? 'hidden' : '';?>
<?php $checked = $plan->begin == '2030-01-01' || $plan->end == '2030-01-01' ? "checked='checked'" : '';?>
<?php $checked = $plan->begin == $config->productplan->future and $plan->end == $config->productplan->future ? "checked='checked'" : '';?>
<th><?php echo $lang->productplan->begin;?></th>
<td><?php echo html::input('begin', $plan->begin != '2030-01-01' ? formatTime($plan->begin) : '', "class='form-control form-date'");?></td>
<td><?php echo html::input('begin', $plan->begin != $config->productplan->future ? formatTime($plan->begin) : '', "class='form-control form-date'");?></td>
<td>
<?php if($plan->status == 'wait'):?>
<div class='checkbox-primary <?php echo $hidden;?>' id='checkBox'>
@@ -62,8 +62,8 @@
</tr>
<tr>
<th><?php echo $lang->productplan->end;?></th>
<td><?php echo html::input('end', $plan->end != '2030-01-01' ? formatTime($plan->end) : '', "class='form-control form-date'");?></td>
<?php $deltaValue = $plan->end == '2030-01-01' ? 0 : (strtotime($plan->end) - strtotime($plan->begin)) / 3600 / 24 + 1;?>
<td><?php echo html::input('end', $plan->end != $config->productplan->future ? formatTime($plan->end) : '', "class='form-control form-date'");?></td>
<?php $deltaValue = $plan->end == $config->productplan->future ? 0 : (strtotime($plan->end) - strtotime($plan->begin)) / 3600 / 24 + 1;?>
<td colspan='2'><?php echo html::radio('delta', $lang->productplan->endList , $deltaValue, "onclick='computeEndDate(this.value)'");?></td>
</tr>
<?php $this->printExtendFields($plan, 'table', 'columns=3');?>
+2 -2
View File
@@ -21,11 +21,11 @@
<table class='table table-form'>
<tr>
<th><?php echo $lang->productplan->begin;?></th>
<td colspan='2'><?php echo html::input('begin', $plan->begin != '2030-01-01' ? formatTime($plan->begin) : '', "class='form-control form-date'");?></td>
<td colspan='2'><?php echo html::input('begin', $plan->begin != $config->productplan->future ? formatTime($plan->begin) : '', "class='form-control form-date'");?></td>
</tr>
<tr>
<th><?php echo $lang->productplan->end;?></th>
<td colspan='2'><?php echo html::input('end', $plan->end != '2030-01-01' ? formatTime($plan->end) : '', 'class="form-control form-date"');?></td>
<td colspan='2'><?php echo html::input('end', $plan->end != $config->productplan->future ? formatTime($plan->end) : '', 'class="form-control form-date"');?></td>
</tr>
<tr>
<th><?php echo $lang->productplan->desc;?></th>
+4 -4
View File
@@ -29,7 +29,7 @@
<span title='<?php echo $plan->title;?>' class='text'><?php echo $plan->title;?></span>
<?php if($product->type !== 'normal') echo "<span title='{$lang->product->branchName[$product->type]}' class='label label-branch label-badge'>" . $branchOption[$branch] . '</span>';?>
<span class='label label-info label-badge'>
<?php echo ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? $lang->productplan->future : $plan->begin . '~' . $plan->end;?>
<?php echo ($plan->begin == $config->productplan->future || $plan->end == $config->productplan->future) ? $lang->productplan->future : $plan->begin . '~' . $plan->end;?>
</span>
<?php if($plan->deleted):?>
<span class='label label-danger'><?php echo $lang->product->deleted;?></span>
@@ -47,7 +47,7 @@
$attr = "target='hiddenwin'";
$isOnlyBody = false;
$class = '';
if($plan->begin == '2030-01-01' or $plan->end == '2030-01-01')
if($plan->begin == $config->productplan->future or $plan->end == $config->productplan->future)
{
$class = 'iframe';
$attr = "data-toggle='modal' data-id='{$plan->id}' data-width='550px'";
@@ -596,11 +596,11 @@
<?php endif;?>
<tr>
<th><?php echo $lang->productplan->begin;?></th>
<td><?php echo $plan->begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?></td>
<td><?php echo $plan->begin == $config->productplan->future ? $lang->productplan->future : $plan->begin;?></td>
</tr>
<tr>
<th><?php echo $lang->productplan->end;?></th>
<td><?php echo $plan->end == '2030-01-01' ? $lang->productplan->future : $plan->end;?></td>
<td><?php echo $plan->end == $config->productplan->future ? $lang->productplan->future : $plan->end;?></td>
</tr>
<?php if($plan->parent == '-1'):?>
<tr>
+3 -3
View File
@@ -650,9 +650,9 @@ class program extends control
/**
* Ajax get program drop menu.
*
* @param int $programID
* @param string $module
* @param string $method
* @param int $programID
* @param string $module
* @param string $method
* @access public
* @return void
*/
+1 -1
View File
@@ -117,7 +117,7 @@
<td colspan='2'>
<div class='input-group'>
<?php echo html::select('whitelist[]', $users, '', 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName='whitelist'");?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
</div>
</td>
</tr>
+2 -2
View File
@@ -99,10 +99,10 @@
</tr>
<tr class="<?php if($program->acl == 'open') echo 'hidden';?>" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td>
<td colspan='2'>
<div class='input-group'>
<?php echo html::select('whitelist[]', $users, $program->whitelist, 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName='whitelist'");?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
</div>
</td>
</tr>
+8 -8
View File
@@ -1217,11 +1217,11 @@ class project extends control
}
else
{
if($project->model == 'scrum' and $module == 'projectstory') $this->config->project->removePriv[$module][] = 'track';
if($project->model == 'scrum' and $module == 'projectstory') $this->config->project->excludedPriv[$module][] = 'track';
foreach($methods as $method => $label)
{
if(isset($this->config->project->removePriv[$module]) and in_array($method, $this->config->project->removePriv[$module])) unset($this->lang->resource->$module->$method);
if(isset($this->config->project->excludedPriv[$module]) and in_array($method, $this->config->project->excludedPriv[$module])) unset($this->lang->resource->$module->$method);
}
}
}
@@ -1317,11 +1317,11 @@ class project extends control
return $this->send(array('message' => $this->lang->saveSuccess, 'result' => 'success', 'locate' => $link));
}
$project = $this->project->getById($projectID);
$users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback');
$roles = $this->user->getUserRoles(array_keys($users));
$deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept);
$userInfos = $this->user->getUserDisplayInfos(array_keys($users), $dept);
$project = $this->project->getById($projectID);
$users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback');
$roles = $this->user->getUserRoles(array_keys($users));
$deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept);
$userInfoList = $this->user->getUserDisplayInfos(array_keys($users), $dept);
$currentMembers = $this->project->getTeamMembers($projectID);
$members2Import = $this->project->getMembers2Import($copyProjectID, array_keys($currentMembers));
@@ -1332,7 +1332,7 @@ class project extends control
$this->view->project = $project;
$this->view->users = $users;
$this->view->deptUsers = $deptUsers;
$this->view->userInfos = $userInfos;
$this->view->userInfoList = $userInfoList;
$this->view->roles = $roles;
$this->view->dept = $dept;
$this->view->depts = array('' => '') + $this->dept->getOptionMenu();
+1 -1
View File
@@ -1,3 +1,3 @@
.c-id {width: 60px;}
.c-name {width: 130px;}
.c-name {width: 300px;}
.c-desc {width: 300px;}
+1 -1
View File
@@ -162,7 +162,7 @@
<td colspan='2'>
<div class='input-group'>
<?php echo html::select('whitelist[]', $users, '', 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName='whitelist'");?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
</div>
</td>
</tr>
+2 -2
View File
@@ -176,10 +176,10 @@
</tr>
<tr class="<?php if($project->acl == 'open') echo 'hidden';?>" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td>
<td colspan='2'>
<div class='input-group'>
<?php echo html::select('whitelist[]', $users, $project->whitelist, 'class="form-control chosen" multiple');?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName='whitelist'");?>
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
</div>
</td>
</tr>
+1 -1
View File
@@ -2,7 +2,7 @@
<?php js::set('projectID', $project->id);?>
<?php js::set('roles', $roles);?>
<?php js::set('deptID', $dept);?>
<?php js::set('pickerUsers', $userInfos);?>
<?php js::set('pickerUsers', $userInfoList);?>
<?php js::set('copyProjectID', $copyProjectID);?>
<?php js::set('oldAccountList', array_keys($currentMembers));?>
<?php js::set('unlinkExecutionMembers', $lang->project->unlinkExecutionMembers);?>
+1 -1
View File
@@ -2436,7 +2436,7 @@ class storyModel extends model
* @param int $productID
* @param string $type requirement|story
* @param string $orderBy
* @param string $pager
* @param object $pager
* @access public
* @return array
*/
+1 -1
View File
@@ -482,7 +482,7 @@
if(!isset($executions[$task->execution])) continue;
$executionName = $executions[$task->execution];
$taskInfo = $task->id . '&nbsp<span class="label label-success label-outline">' . $this->lang->task->statusList[$task->status] . '</span>&nbsp' . $task->name;
$class = isonlybody() ? 'showinonlybody' : 'iframe';
$class = isonlybody() ? 'showinonlybody' : 'iframe';
echo "<li title='$task->name'>" . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), $taskInfo, '', "class=$class data-width='80%'");
echo html::a($this->createLink('execution', 'browse', "executionID=$task->execution"), $executionName, '', "class='text-muted'") . '</li>';
}
+18 -13
View File
@@ -299,8 +299,10 @@ class testreport extends control
$this->view->reportTitle = date('Y-m-d') . " EXECUTION#{$execution->id} {$execution->name} {$this->lang->testreport->common}";
}
$cases = $this->testreport->getTaskCases($tasks, $begin, $end);
$bugInfo = $this->testreport->getBugInfo($tasks, $productIdList, $begin, $end, $builds);
$cases = $this->testreport->getTaskCases($tasks, $begin, $end);
list($bugInfo, $bugSummary) = $this->testreport->getBug4Report($tasks, $productIdList, $begin, $end, $builds);
$this->view->begin = $begin;
$this->view->end = $end;
$this->view->members = $this->dao->select('DISTINCT lastRunner')->from(TABLE_TESTRUN)->where('task')->in(array_keys($tasks))->fetchPairs('lastRunner', 'lastRunner');
@@ -329,9 +331,9 @@ class testreport extends control
$this->view->datas['testTaskPerRunResult'] = $this->loadModel('report')->computePercent($perCaseResult);
$this->view->datas['testTaskPerRunner'] = $this->report->computePercent($perCaseRunner);
$this->view->legacyBugs = $bugInfo['legacyBugs'];
unset($bugInfo['legacyBugs']);
$this->view->bugInfo = $bugInfo;
$this->view->bugInfo = $bugInfo;
$this->view->legacyBugs = $bugSummary['legacyBugs'];
$this->view->bugSummary = $bugSummary;
$this->view->objectID = $objectID;
$this->view->objectType = $objectType;
@@ -432,8 +434,9 @@ class testreport extends control
$bugs = $this->testreport->getBugs4Test($builds, $productIdList, $begin, $end, 'execution');
}
$cases = $this->testreport->getTaskCases($tasks, $begin, $end);
$bugInfo = $this->testreport->getBugInfo($tasks, $productIdList, $begin, $end, $builds);
$cases = $this->testreport->getTaskCases($tasks, $begin, $end);
list($bugInfo, $bugSummary) = $this->testreport->getBug4Report($tasks, $productIdList, $begin, $end, $builds);
$this->view->title = $report->title . $this->lang->testreport->edit;
@@ -458,9 +461,9 @@ class testreport extends control
$this->view->datas['testTaskPerRunResult'] = $this->loadModel('report')->computePercent($perCaseResult);
$this->view->datas['testTaskPerRunner'] = $this->report->computePercent($perCaseRunner);
$this->view->legacyBugs = $bugInfo['legacyBugs'];
unset($bugInfo['legacyBugs']);
$this->view->bugInfo = $bugInfo;
$this->view->legacyBugs = $bugSummary['legacyBugs'];
$this->view->bugInfo = $bugInfo;
$this->view->bugSummary = $bugSummary;
$this->display();
}
@@ -529,7 +532,8 @@ class testreport extends control
$tasks = $report->tasks ? $this->testtask->getByList($report->tasks) : array();;
$builds = $report->builds ? $this->build->getByList($report->builds) : array();
$cases = $this->testreport->getTaskCases($tasks, $report->begin, $report->end);
$bugInfo = $this->testreport->getBugInfo($tasks, $report->product, $report->begin, $report->end, $builds);
list($bugInfo, $bugSummary) = $this->testreport->getBug4Report($tasks, $report->product, $report->begin, $report->end, $builds);
/* save session .*/
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
@@ -566,9 +570,10 @@ class testreport extends control
$this->view->datas['testTaskPerRunResult'] = $this->loadModel('report')->computePercent($perCaseResult);
$this->view->datas['testTaskPerRunner'] = $this->report->computePercent($perCaseRunner);
$this->view->legacyBugs = $bugInfo['legacyBugs'];
unset($bugInfo['legacyBugs']);
$this->view->bugInfo = $bugInfo;
$this->view->legacyBugs = $bugSummary['legacyBugs'];
$this->view->bugSummary = $bugSummary;
$this->display();
}
+1 -1
View File
@@ -78,7 +78,7 @@ $lang->testreport->exportNotice = "Exported By <a href='https://www.zentao.ne
$lang->testreport->noReport = "No report has been generated. Please check it later.";
$lang->testreport->foundBugTip = "Bugs found in this build period and the affected build is in this test period.";
$lang->testreport->legacyBugTip = "Active bugs, or bugs that are not resolved in the test period.";
$lang->testreport->activatedBugTip = "Reactive bugs in the test period.";
$lang->testreport->activatedBugTip = "Reactived bugs during the testtask.";
$lang->testreport->fromCaseBugTip = "Bugs found from the running of cases in the test period.";
$lang->testreport->errorTrunk = "You cannot create a Testing report for the trunk. Please modify the linked build!";
$lang->testreport->noTestTask = "No test requests for this {$lang->productCommon}, so no reports can be generated. Please go to {$lang->productCommon} which has test requests and then generate the report.";
+11 -12
View File
@@ -125,7 +125,7 @@ class testreportModel extends model
}
/**
* Get bug info.
* Get bug info and summary.
*
* @param array $tasks
* @param array $productIdList
@@ -135,7 +135,7 @@ class testreportModel extends model
* @access public
* @return array
*/
public function getBugInfo($tasks, $productIdList, $begin, $end, $builds)
public function getBug4Report($tasks, $productIdList, $begin, $end, $builds)
{
$generatedBugs = $this->dao->select('*')->from(TABLE_BUG)->where('product')->in($productIdList)->andWhere('openedDate')->ge($begin)->andWhere('openedDate')->le("$end 23:59:59")->andWhere('deleted')->eq(0)->fetchAll();
$resolvedBugs = $this->dao->select('*')->from(TABLE_BUG)->where('product')->in($productIdList)->andWhere('resolvedDate')->ge($begin)->andWhere('resolvedDate')->le("$end 23:59:59")->andWhere('deleted')->eq(0)->fetchAll();
@@ -259,7 +259,6 @@ class testreportModel extends model
}
$resolvedBugs = 0;
$this->loadModel('action');
foreach($foundBugs as $bug)
{
$severityGroups[$bug->severity] = isset($severityGroups[$bug->severity]) ? $severityGroups[$bug->severity] + 1 : 1;
@@ -273,14 +272,14 @@ class testreportModel extends model
if($bug->status == 'resolved' or $bug->status == 'closed') $resolvedBugs ++;
}
$bugInfo['foundBugs'] = count($foundBugs);
$bugInfo['legacyBugs'] = $legacyBugs;
$bugInfo['activatedBugs'] = $activatedBugs;
$bugInfo['countBugByTask'] = $byCaseNum;
$bugInfo['bugConfirmedRate'] = empty($resolvedBugs) ? 0 : round((zget($resolutionGroups, 'fixed', 0) + zget($resolutionGroups, 'postponed', 0)) / $resolvedBugs * 100, 2);
$bugInfo['bugCreateByCaseRate'] = empty($byCaseNum) ? 0 : round($byCaseNum / count($foundBugs) * 100, 2);
$bugInfo['bugStageGroups'] = $isEmptyStage ? array() : $stageGroups;
$bugInfo['bugHandleGroups'] = $isEmptyHandle ? array() : $handleGroups;
$bugSummary['foundBugs'] = count($foundBugs);
$bugSummary['legacyBugs'] = $legacyBugs;
$bugSummary['activatedBugs'] = count($activatedBugs);
$bugSummary['countBugByTask'] = $byCaseNum;
$bugSummary['bugConfirmedRate'] = empty($resolvedBugs) ? 0 : round((zget($resolutionGroups, 'fixed', 0) + zget($resolutionGroups, 'postponed', 0)) / $resolvedBugs * 100, 2);
$bugSummary['bugCreateByCaseRate'] = empty($byCaseNum) ? 0 : round($byCaseNum / count($foundBugs) * 100, 2);
$bugInfo['bugStageGroups'] = $isEmptyStage ? array() : $stageGroups;
$bugInfo['bugHandleGroups'] = $isEmptyHandle ? array() : $handleGroups;
$this->app->loadLang('bug');
$users = $this->loadModel('user')->getPairs('noclosed|noletter|nodeleted');
@@ -351,7 +350,7 @@ class testreportModel extends model
}
$bugInfo['bugResolvedByGroups'] = $data;
return $bugInfo;
return array($bugInfo, $bugSummary);
}
/**
+1 -2
View File
@@ -83,8 +83,7 @@
<?php
echo '<div>' . $storySummary . '</div>';
echo '<div>' . sprintf($lang->testreport->buildSummary, empty($builds) ? 1 : count($builds)) . $caseSummary . '</div>';
echo '<div>' . sprintf($lang->testreport->bugSummary, $bugInfo['foundBugs'], count($legacyBugs), count($bugInfo['activatedBugs']), $bugInfo['countBugByTask'], $bugInfo['bugConfirmedRate'] . '%', $bugInfo['bugCreateByCaseRate'] . '%') . '</div>';
unset($bugInfo['countBugByTask']); unset($bugInfo['bugConfirmedRate']); unset($bugInfo['bugCreateByCaseRate']); unset($bugInfo['foundBugs']); unset($bugInfo['activatedBugs']);
echo '<div>' . sprintf($lang->testreport->bugSummary, $bugSummary['foundBugs'], count($legacyBugs), $bugSummary['activatedBugs'], $bugSummary['countBugByTask'], $bugSummary['bugConfirmedRate'] . '%', $bugSummary['bugCreateByCaseRate'] . '%') . '</div>';
?>
</td>
<td></td>
+1 -2
View File
@@ -71,8 +71,7 @@
<?php
echo '<p>' . $storySummary . '</p>';
echo '<p>' . sprintf($lang->testreport->buildSummary, empty($builds) ? 1 : count($builds)) . $caseSummary . '</p>';
echo '<p>' . sprintf($lang->testreport->bugSummary, $bugInfo['foundBugs'], count($legacyBugs), count($bugInfo['activatedBugs']), $bugInfo['countBugByTask'], $bugInfo['bugConfirmedRate'] . '%', $bugInfo['bugCreateByCaseRate'] . '%') . '</p>';
unset($bugInfo['countBugByTask']); unset($bugInfo['bugConfirmedRate']); unset($bugInfo['bugCreateByCaseRate']); unset($bugInfo['foundBugs']); unset($bugInfo['activatedBugs']);
echo '<p>' . sprintf($lang->testreport->bugSummary, $bugSummary['foundBugs'], count($legacyBugs), $bugSummary['activatedBugs'], $bugSummary['countBugByTask'], $bugSummary['bugConfirmedRate'] . '%', $bugSummary['bugCreateByCaseRate'] . '%') . '</p>';
?>
</td>
<td></td>
+1 -2
View File
@@ -78,8 +78,7 @@
<?php
echo '<p>' . $storySummary . '</p>';
echo '<p>' . sprintf($lang->testreport->buildSummary, empty($builds) ? 1 : count($builds)) . $caseSummary . '</p>';
echo '<p>' . sprintf($lang->testreport->bugSummary, $bugInfo['foundBugs'], count($legacyBugs), count($bugInfo['activatedBugs']), $bugInfo['countBugByTask'], $bugInfo['bugConfirmedRate'] . '%', $bugInfo['bugCreateByCaseRate'] . '%') . '</p>';
unset($bugInfo['countBugByTask']); unset($bugInfo['bugConfirmedRate']); unset($bugInfo['bugCreateByCaseRate']); unset($bugInfo['foundBugs']); unset($bugInfo['activatedBugs']);
echo '<p>' . sprintf($lang->testreport->bugSummary, $bugSummary['foundBugs'], count($legacyBugs), $bugSummary['activatedBugs'], $bugSummary['countBugByTask'], $bugSummary['bugConfirmedRate'] . '%', $bugSummary['bugCreateByCaseRate'] . '%') . '</p>';
?>
</td>
</tr>
+1 -1
View File
@@ -63,7 +63,7 @@
echo "</ul></div>";
?>
<?php common::printLink('testtask', 'linkCase', "taskID=$taskID&type=bybug", "<span class='text'>" . $lang->testtask->linkByBug . '</span>', '', "class='btn btn-link {$bugActive}'");?>
<?php if($type == 'all') echo "<a class='btn btn-link querybox-toggle' id='bysearchTab'><i class='icon icon-search muted'></i>{$lang->testcase->bySearch}</a>";?>
<?php if($type == 'all') echo "<a class='btn btn-link querybox-toggle' id='bysearchTab'><i class='icon icon-search muted'></i> {$lang->testcase->bySearch}</a>";?>
</div>
</div>
<div class="cell show" id="queryBox" data-module='testcase'></div>
+3 -3
View File
@@ -242,8 +242,8 @@ class treeModel extends model
public function getTaskOptionMenu($rootID, $productID = 0, $startModule = 0, $extra = '')
{
/* If createdVersion <= 4.1, go to getOptionMenu(). */
$products = $this->loadModel('product')->getProductPairsByProject($rootID);
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noclosed');
$products = $this->loadModel('product')->getProductPairsByProject($rootID);
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noclosed');
if(!$this->isMergeModule($rootID, 'task') or !$products) return $this->getOptionMenu($rootID, 'task', $startModule);
@@ -282,7 +282,7 @@ class treeModel extends model
{
$modules = $this->dao->select('*')->from(TABLE_MODULE)->where("((root = '" . (int)$rootID . "' and type = 'task' and parent != 0) OR (root = $id and type = 'story'))")
->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi()
->beginIF(!empty($activeBranch))->andWhere('branch')->in($activeBranch)->fi()
->andWhere('branch')->in($activeBranch)->fi()
->andWhere('deleted')->eq(0)
->orderBy('grade desc, branch, `order`, type')
->fetchAll('id');
+13 -5
View File
@@ -1173,25 +1173,33 @@ class user extends control
{
$list = $contactListID ? $this->user->getContactListByID($contactListID) : '';
$attr = $dropdownName == 'mailto' ? "data-placeholder='{$this->lang->chooseUsersToMail}'" : '';
$users = $this->user->getPairs('devfirst|nodeleted', $list ? $list->userList : '', $this->config->maxCount);
if(isset($this->config->user->moreLink)) $this->config->moreLinks[$dropdownName . "[]"] = $this->config->user->moreLink;
if(!$contactListID) return print(html::select($dropdownName . "[]", $users, '', "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
return print(html::select($dropdownName . "[]", $users, $list->userList, "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
if(!$contactListID)
{
return print(html::select($dropdownName . "[]", $users, '', "class='form-control chosen' multiple $attr"));
}
else
{
return print(html::select($dropdownName . "[]", $users, $list->userList, "class='form-control chosen' multiple $attr"));
}
}
/**
* Ajax get contact list.
*
* @param $dropdownName mailto|whitelist
* @access public
* @return string
*/
public function ajaxGetContactList()
public function ajaxGetContactList($dropdownName = 'mailto')
{
$contactList = $this->user->getContactLists($this->app->user->account, 'withnote');
if(empty($contactList)) return false;
return print(html::select('', $contactList, '', "class='form-control' onchange=\"setMailto('mailto', this.value)\""));
return print(html::select('', $contactList, '', "class='form-control' onchange=\"setMailto('$dropdownName', this.value)\""));
}
/**
+4 -3
View File
@@ -162,13 +162,14 @@ function setMailto(mailto, contactListID)
/**
* Ajax get contacts.
*
* @param obj $obj
* @param object $obj
* @param string $dropdownName mailto|whitelist
* @access public
* @return void
*/
function ajaxGetContacts(obj)
function ajaxGetContacts(obj, dropdownName = 'mailto')
{
link = createLink('user', 'ajaxGetContactList');
link = createLink('user', 'ajaxGetContactList', 'dropdownName=' + dropdownName);
$.get(link, function(contacts)
{
if(!contacts) return false;