* finish task #7603,7603.
This commit is contained in:
@@ -247,11 +247,16 @@ function loadProductStories(productID)
|
||||
*/
|
||||
function loadProductProjects(productID)
|
||||
{
|
||||
required = $('#project_chosen').hasClass('required');
|
||||
branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
|
||||
link = createLink('product', 'ajaxGetProjects', 'productID=' + productID + '&projectID=' + oldProjectID + '&branch=' + branch);
|
||||
$('#projectIdBox').load(link, function(){$(this).find('select').chosen()});
|
||||
$('#projectIdBox').load(link, function()
|
||||
{
|
||||
$(this).find('select').chosen();
|
||||
if(required) $(this).addClass('required');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -616,7 +616,7 @@ class product extends control
|
||||
|
||||
if($number === '')
|
||||
{
|
||||
die(html::select('project', $projects, $projectID, 'class=form-control onchange=loadProjectRelated(this.value)'));
|
||||
die(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProjectRelated(this.value)'"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ class task extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($projectID = 0, $storyID = '', $moduleID = 0, $taskID = 0, $todoID = 0)
|
||||
public function create($projectID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0)
|
||||
{
|
||||
$this->project->getLimitedProject();
|
||||
$limitedProjects = !empty($_SESSION['limitedProjects']) ? $_SESSION['limitedProjects'] : '';
|
||||
@@ -580,9 +580,9 @@ class task extends control
|
||||
|
||||
$muletipleTasks = $this->dao->select('root')->from(TABLE_TEAM)->where('type')->eq('task')->andWhere('root')->in($taskIDList)->fetchPairs();
|
||||
$tasks = $this->task->getByList($taskIDList);
|
||||
$this->loadModel('action');
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
$this->loadModel('action');
|
||||
if(in_array($taskID, $muletipleTasks) and $task->assignedTo != $this->app->user->account) continue;
|
||||
|
||||
$changes = $this->task->assign($taskID);
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<span id='storyBox'><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('project', 'linkStory', "projectID=$project->id"), $lang->project->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($project->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
|
||||
<?php else:?>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('story', array($task->story => $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
|
||||
<?php echo html::select('story', $stories, $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
|
||||
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe'><?php echo $lang->preview;?></a></span>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -1024,10 +1024,13 @@ class user extends control
|
||||
*/
|
||||
public function ajaxGetContactUsers($contactListID)
|
||||
{
|
||||
$list = $contactListID ? $this->user->getContactListByID($contactListID) : '';
|
||||
$list = $contactListID ? $this->user->getContactListByID($contactListID) : '';
|
||||
|
||||
$users = $this->user->getPairs('devfirst|nodeleted', $list ? $list->userList : '', $this->config->maxCount);
|
||||
if(isset($this->config->user->moreLink)) $this->config->moreLinks['mailto[]'] = $this->config->user->moreLink;
|
||||
|
||||
if(!$contactListID) return print(html::select('mailto[]', $users, '', "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
|
||||
|
||||
return print(html::select('mailto[]', $users, $list->userList, "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ class userModel extends model
|
||||
*
|
||||
* @param string $params noletter|noempty|nodeleted|noclosed|withguest|pofirst|devfirst|qafirst|pmfirst|realname, can be sets of theme
|
||||
* @param string $usersToAppended account1,account2
|
||||
* @param int $maxCount
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -96,6 +97,7 @@ class userModel extends model
|
||||
->orderBy($orderBy)
|
||||
->beginIF($maxCount)->limit($maxCount)->fi()
|
||||
->fetchAll('account');
|
||||
|
||||
if($maxCount and $maxCount == count($users))
|
||||
{
|
||||
if(is_array($usersToAppended)) $usersToAppended = join(',', $usersToAppended);
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ function setMailto(mailto, contactListID)
|
||||
{
|
||||
$('#' + mailto).replaceWith(users);
|
||||
$('#' + mailto + '_chosen').remove();
|
||||
$('.picker').remove();
|
||||
$('.picker').remove();
|
||||
|
||||
if($("[data-pickertype='remote']").length == 0 && $('.picker-select').length == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user