Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -602,10 +602,15 @@ class bug extends control
|
||||
{
|
||||
$product = $this->product->getByID($productID);
|
||||
|
||||
/* Set plans. */
|
||||
$plans = $this->loadModel('productplan')->getPairs($productID, $branch);
|
||||
$plans['ditto'] = $this->lang->bug->ditto;
|
||||
|
||||
/* Set product menu. */
|
||||
$this->bug->setMenu($this->products, $productID, $branch);
|
||||
$this->view->title = $product->name . $this->lang->colon . "BUG" . $this->lang->bug->batchEdit;
|
||||
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID&branch=$branch"), $this->products[$productID]);
|
||||
$this->view->plans = $plans;
|
||||
}
|
||||
/* The bugs of my. */
|
||||
else
|
||||
@@ -631,11 +636,11 @@ class bug extends control
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->bug->custom->batchedit;
|
||||
|
||||
/* Set ditto option for users and type, severity, pri, resolution list. */
|
||||
/* Set users. */
|
||||
$users = $this->user->getPairs('nodeleted,devfirst');
|
||||
$users['ditto'] = $this->lang->bug->ditto;
|
||||
$plans = $this->loadModel('productplan')->getPairs($productID, $branch);
|
||||
$plans['ditto'] = $this->lang->bug->ditto;
|
||||
|
||||
/* Set ditto option for users and type, severity, pri, resolution list. */
|
||||
$this->lang->bug->typeList['ditto'] = $this->lang->bug->ditto;
|
||||
$this->lang->bug->priList['ditto'] = $this->lang->bug->ditto;
|
||||
$this->lang->bug->resolutionList['ditto'] = $this->lang->bug->ditto;
|
||||
@@ -656,7 +661,6 @@ class bug extends control
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->users = $users;
|
||||
$this->view->plans = $plans;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ $(function()
|
||||
});
|
||||
})
|
||||
|
||||
$(document).on('click', '.chosen-with-drop', function(){oldValue = $(this).prev('select').val();})
|
||||
|
||||
$(document).on('change', 'select', function()
|
||||
{
|
||||
if($(this).val() == 'ditto')
|
||||
@@ -49,7 +51,26 @@ $(document).on('change', 'select', function()
|
||||
if(value != 'ditto') break;
|
||||
}
|
||||
|
||||
$(this).val(value);
|
||||
isPlans = $(this).attr('name').indexOf('plans') != -1;
|
||||
|
||||
if(isPlans)
|
||||
{
|
||||
var valueStr = ',' + $(this).find('option').map(function(){return $(this).val();}).get().join(',') + ',';
|
||||
if(valueStr.indexOf(',' + value + ',') != -1)
|
||||
{
|
||||
$(this).val(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(dittoNotice);
|
||||
$(this).val(oldValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).val(value);
|
||||
}
|
||||
|
||||
$(this).trigger("chosen:updated");
|
||||
$(this).trigger("change");
|
||||
}
|
||||
|
||||
@@ -107,7 +107,9 @@ $lang->bug->allBugs = 'Allbug';
|
||||
$lang->bug->byQuery = 'Search';
|
||||
$lang->bug->needConfirm = 'StoryChanged';
|
||||
$lang->bug->allProduct = "All {$lang->productCommon}s";
|
||||
$lang->bug->ditto = 'Ditto';
|
||||
|
||||
$lang->bug->ditto = 'Ditto';
|
||||
$lang->bug->dittoNotice = 'Current bug and bug above it do not belong to same product!';
|
||||
|
||||
/* Labels. */
|
||||
$lang->bug->lblAssignedTo = 'Assigned to';
|
||||
|
||||
@@ -107,7 +107,9 @@ $lang->bug->allBugs = '所有';
|
||||
$lang->bug->byQuery = '搜索';
|
||||
$lang->bug->needConfirm = '需求变动';
|
||||
$lang->bug->allProduct = '所有' . $lang->productCommon;
|
||||
$lang->bug->ditto = '同上';
|
||||
|
||||
$lang->bug->ditto = '同上';
|
||||
$lang->bug->dittoNotice = '该bug与上一bug不属于同一产品!';
|
||||
|
||||
/* 页面标签。*/
|
||||
$lang->bug->lblAssignedTo = '当前指派';
|
||||
|
||||
@@ -543,7 +543,7 @@ class bugModel extends model
|
||||
$bug->pri = $data->pris[$bugID];
|
||||
$bug->status = $data->statuses[$bugID];
|
||||
$bug->title = $data->titles[$bugID];
|
||||
$bug->plan = $data->plan[$bugID];
|
||||
$bug->plan = empty($data->plans[$bugID]) ? 0 : $data->plans[$bugID];
|
||||
$bug->assignedTo = $data->assignedTos[$bugID];
|
||||
$bug->resolvedBy = $data->resolvedBys[$bugID];
|
||||
$bug->keywords = $data->keywords[$bugID];
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('dittoNotice', $this->lang->bug->dittoNotice);?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['bug']);?></span>
|
||||
@@ -40,16 +41,21 @@ $columns = count($hasFields) + 2;
|
||||
<th class='w-150px<?php echo zget($hasFields, 'productplan', ' hidden')?>'><?php echo $lang->bug->productplan;?></th>
|
||||
<th class='w-150px<?php echo zget($hasFields, 'assignedTo', ' hidden')?>'><?php echo $lang->bug->assignedTo;?></th>
|
||||
<th class='w-90px<?php echo zget($hasFields, 'status', ' hidden')?>'><?php echo $lang->bug->status;?></th>
|
||||
<th class='w-150px<?php echo zget($hasFields, 'resolvedBy', ' hidden')?>'><?php echo $lang->bug->resolvedByAB;?></th>
|
||||
<th class='w-180px<?php echo zget($hasFields, 'resolution', ' hidden')?>'><?php echo $lang->bug->resolutionAB;?></th>
|
||||
<th class='w-100px<?php echo zget($hasFields, 'os', ' hidden')?>'><?php echo $lang->bug->os;?></th>
|
||||
<th class='w-100px<?php echo zget($hasFields, 'browser', ' hidden')?>'><?php echo $lang->bug->browser;?></th>
|
||||
<th class='w-100px<?php echo zget($hasFields, 'keywords', ' hidden')?>'><?php echo $lang->bug->keywords;?></th>
|
||||
<th class='w-150px<?php echo zget($hasFields, 'resolvedBy', ' hidden')?>'><?php echo $lang->bug->resolvedByAB;?></th>
|
||||
<th class='w-180px<?php echo zget($hasFields, 'resolution', ' hidden')?>'><?php echo $lang->bug->resolutionAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($bugIDList as $bugID):?>
|
||||
<?php
|
||||
if(!$productID)
|
||||
{
|
||||
$plans = $this->loadModel('productplan')->getPairs($bugs[$bugID]->product, $branch);
|
||||
$plans['ditto'] = $this->lang->story->ditto;
|
||||
}
|
||||
/**
|
||||
* Remove designchange, newfeature, trackings from the typeList, because should be tracked in story or task.
|
||||
* These thress types if upgrade from bugfree2.x.
|
||||
@@ -67,6 +73,9 @@ $columns = count($hasFields) + 2;
|
||||
<td class='text-left<?php echo zget($hasFields, 'productplan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plans[$bugID]", $plans, $bugs[$bugID]->plan, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($hasFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $users, $bugs[$bugID]->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($hasFields, 'status', "class='hidden'")?>><?php echo html::select("statuses[$bugID]", $lang->bug->statusList, $bugs[$bugID]->status, 'class=form-control');?></td>
|
||||
<td <?php echo zget($hasFields, 'os', "class='hidden'")?>><?php echo html::select("os[$bugID]", $lang->bug->osList, $bugs[$bugID]->os, 'class=form-control');?></td>
|
||||
<td <?php echo zget($hasFields, 'browser', "class='hidden'")?>><?php echo html::select("browsers[$bugID]", $lang->bug->browserList, $bugs[$bugID]->browser, 'class=form-control');?></td>
|
||||
<td <?php echo zget($hasFields, 'keywords', "class='hidden'")?>><?php echo html::input("keywords[$bugID]", $bugs[$bugID]->keywords, 'class=form-control');?></td>
|
||||
<td class='text-left<?php echo zget($hasFields, 'resolvedBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("resolvedBys[$bugID]", $users, $bugs[$bugID]->resolvedBy, "class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($hasFields, 'resolution', "class='hidden'")?>>
|
||||
<table class='w-p100'>
|
||||
@@ -80,9 +89,6 @@ $columns = count($hasFields) + 2;
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td <?php echo zget($hasFields, 'os', "class='hidden'")?>><?php echo html::select("os[$bugID]", $lang->bug->osList, $bugs[$bugID]->os, 'class=form-control');?></td>
|
||||
<td <?php echo zget($hasFields, 'browser', "class='hidden'")?>><?php echo html::select("browsers[$bugID]", $lang->bug->browserList, $bugs[$bugID]->browser, 'class=form-control');?></td>
|
||||
<td <?php echo zget($hasFields, 'keywords', "class='hidden'")?>><?php echo html::input("keywords[$bugID]", $bugs[$bugID]->keywords, 'class=form-control');?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php if(isset($suhosinInfo)):?>
|
||||
|
||||
@@ -60,7 +60,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
|
||||
<tr class='text-center'>
|
||||
<td>
|
||||
<?php
|
||||
if($canBatchEdit or $canManageContacts) echo "<input type='checkbox' name='users[]' value='$user->account'> ";
|
||||
if($canBatchEdit) echo "<input type='checkbox' name='users[]' value='$user->account'> ";
|
||||
printf('%03d', $user->id);
|
||||
?>
|
||||
</td>
|
||||
@@ -96,7 +96,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
|
||||
<td colspan='12'>
|
||||
<div class='table-actions clearfix'>
|
||||
<?php
|
||||
if($canBatchEdit or $canManageContacts) echo html::selectButton();
|
||||
if($canBatchEdit) echo html::selectButton();
|
||||
if($canBatchEdit) echo html::submitButton($lang->edit, 'onclick=batchEdit()', 'btn btn-default');
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -1152,3 +1152,10 @@ $lang->changelog['8.0.1'][] = 'story-linkStory';
|
||||
$lang->changelog['8.0.1'][] = 'story-unlinkStory';
|
||||
$lang->changelog['8.0.1'][] = 'testcase-linkCases';
|
||||
$lang->changelog['8.0.1'][] = 'testcase-unlinkCase';
|
||||
|
||||
$lang->changelog['8.1.3'][] = 'story-batchChangeModule';
|
||||
$lang->changelog['8.1.3'][] = 'task-batchChangeModule';
|
||||
$lang->changelog['8.1.3'][] = 'bug-batchChangeModule';
|
||||
$lang->changelog['8.1.3'][] = 'testcase-batchChangeModule';
|
||||
$lang->changelog['8.1.3'][] = 'my-manageContacts';
|
||||
$lang->changelog['8.1.3'][] = 'my-deleteContacts';
|
||||
|
||||
@@ -70,11 +70,15 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='10'>
|
||||
<?php if($bugs and $canBatchEdit):?>
|
||||
<div class='table-actions clearfix'>
|
||||
<?php echo html::selectButton() . html::submitButton($lang->edit, '', '');?>
|
||||
<?php
|
||||
if($bugs and $canBatchEdit)
|
||||
{
|
||||
$actionLink = $this->createLink('bug', 'batchEdit');
|
||||
echo html::selectButton() . html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php $pager->show();?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -901,90 +901,6 @@ class user extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage contacts.
|
||||
*
|
||||
* @param int $listID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function manageContacts($listID = 0)
|
||||
{
|
||||
$lists = $this->user->getContactLists($this->app->user->account);
|
||||
|
||||
/* If set $mode, need to update database. */
|
||||
if($this->post->mode)
|
||||
{
|
||||
/* The mode is new: append or new a list. */
|
||||
if($this->post->mode == 'new')
|
||||
{
|
||||
if($this->post->list2Append)
|
||||
{
|
||||
$this->user->append2ContactList($this->post->list2Append, $this->post->users);
|
||||
die(js::locate(inlink('manageContacts', "listID={$this->post->list2Append}"), 'parent'));
|
||||
}
|
||||
elseif($this->post->newList)
|
||||
{
|
||||
$listID = $this->user->createContactList($this->post->newList, $this->post->users);
|
||||
die(js::locate(inlink('manageContacts', "listID=$listID"), 'parent'));
|
||||
}
|
||||
}
|
||||
elseif($this->post->mode == 'edit')
|
||||
{
|
||||
$this->user->updateContactList($this->post->listID, $this->post->listName, $this->post->users);
|
||||
die(js::locate(inlink('manageContacts', "listID={$this->post->listID}"), 'parent'));
|
||||
}
|
||||
}
|
||||
if($this->post->users)
|
||||
{
|
||||
$mode = 'new';
|
||||
$users = $this->user->getContactUserPairs($this->post->users);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mode = 'edit';
|
||||
$listID= $listID ? $listID : key($lists);
|
||||
if(!$listID) die(js::alert($this->lang->user->contacts->noListYet) . js::locate($this->createLink('company', 'browse'), 'parent'));
|
||||
|
||||
$list = $this->user->getContactListByID($listID);
|
||||
$users = explode(',', $list->userList);
|
||||
$users = $this->user->getContactUserPairs($users);
|
||||
$this->view->list = $list;
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->user->manageContacts;
|
||||
$this->view->position[] = $this->lang->company->common;
|
||||
$this->view->position[] = $this->lang->user->manageContacts;
|
||||
$this->view->lists = $this->user->getContactLists($this->app->user->account);
|
||||
$this->view->users = $users;
|
||||
$this->view->listID = $listID;
|
||||
$this->view->mode = $mode;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a contact list.
|
||||
*
|
||||
* @param int $listID
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteContacts($listID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
echo js::confirm($this->lang->user->contacts->confirmDelete, inlink('deleteContacts', "listID=$listID&confirm=yes"));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->user->deleteContactList($listID);
|
||||
echo js::locate(inlink('manageContacts'), 'parent');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user for ajax
|
||||
*
|
||||
|
||||
@@ -59,8 +59,6 @@ $lang->user->unbind = "Unbind ranzhi";
|
||||
$lang->user->login = "Login";
|
||||
$lang->user->mobileLogin = "Mobile";
|
||||
$lang->user->editProfile = "Edit profile";
|
||||
$lang->user->manageContacts = 'Manage contacts';
|
||||
$lang->user->deleteContacts = 'Delete contacts';
|
||||
$lang->user->deny = "Denied";
|
||||
$lang->user->confirmDelete = "Are you sure to delete this user?";
|
||||
$lang->user->confirmUnlock = "Are you sure to unlock this user?";
|
||||
|
||||
@@ -59,8 +59,6 @@ $lang->user->unbind = "解除然之绑定";
|
||||
$lang->user->login = "用户登录";
|
||||
$lang->user->mobileLogin = "手机访问";
|
||||
$lang->user->editProfile = "修改档案";
|
||||
$lang->user->manageContacts = '维护联系人';
|
||||
$lang->user->deleteContacts = '删除联系人';
|
||||
$lang->user->deny = "访问受限";
|
||||
$lang->user->confirmDelete = "您确定删除该用户吗?";
|
||||
$lang->user->confirmUnlock = "您确定解除该用户的锁定状态吗?";
|
||||
|
||||
@@ -915,26 +915,6 @@ class userModel extends model
|
||||
return $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/**
|
||||
* Append some users to a contact list.
|
||||
*
|
||||
* @param int $listID
|
||||
* @param string $userList
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function append2ContactList($listID, $userList)
|
||||
{
|
||||
$list = $this->getContactListByID($listID);
|
||||
if($list->userList) $userList = array_merge($userList, explode(',', $list->userList));
|
||||
|
||||
$userList = array_unique($userList);
|
||||
sort($userList);
|
||||
$userList = join(',', $userList);
|
||||
|
||||
$this->dao->update(TABLE_USERCONTACT)->set('userList')->eq($userList)->where('id')->eq($listID)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a contact list.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user