adjust code.

This commit is contained in:
wangyidong
2016-05-04 14:59:39 +08:00
parent d27aa31723
commit 5d70ec7e35
28 changed files with 123 additions and 114 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ body {background: #fafafa;}
.dashboard .panel-dragging-shadow {position: absolute;}
.dashboard-empty-message {text-align: center; margin-top: 100px;}
.dashboard-empty-message > h5 {margin-bottom: 20px;}
.dashboard-actions {text-align: right; margin-top: -10px; margin-right: 10px; margin-bottom: 10px;}
.dashboard-actions > a {display: inline-block; width: 20px; height: 20px; text-align: center; color: #999; border: 1px solid #999; line-height: 20px; background: #999; color: #fff}
.dashboard-actions {position: absolute; top:-20px; right:-10px;}
.dashboard-actions > a {display: inline-block; width: 40px; height: 20px; text-align: center; color: #999; border: 1px solid #999; line-height: 20px; background: #1a4f85; color: #fff}
.dashboard-actions > a:hover {background: #2e6dad; border-color: #2e6dad}
#wrap .outer {background-color: #fafafa;}
+1 -1
View File
@@ -81,7 +81,7 @@ $lang->block->default['qa']['2']['grid'] = 4;
$lang->block->default['qa']['2']['params']['num'] = 15;
$lang->block->default['qa']['2']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['2']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['2']['params']['type'] = 'assigntome';
$lang->block->default['qa']['3']['title'] = 'Waiting test task';
$lang->block->default['qa']['3']['block'] = 'testtask';
+1 -2
View File
@@ -31,7 +31,6 @@ $lang->block->createBlock = '添加区块';
$lang->block->editBlock = '编辑区块';
$lang->block->ordersSaved = '排序已保存';
$lang->block->confirmRemoveBlock = '确定移除区块【{0}】吗?';
$lang->block->emptyMessage = '这里什么也没有。快来定制你的页面!';
$lang->block->refresh = '刷新';
$lang->block->hidden = '隐藏';
$lang->block->dynamicInfo = "%s, %s <em>%s</em> %s <a href='%s'>%s</a>。";
@@ -81,7 +80,7 @@ $lang->block->default['qa']['2']['grid'] = 4;
$lang->block->default['qa']['2']['params']['num'] = 15;
$lang->block->default['qa']['2']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['2']['params']['type'] = 'assignedTo';
$lang->block->default['qa']['2']['params']['type'] = 'assigntome';
$lang->block->default['qa']['3']['title'] = '待测版本列表';
$lang->block->default['qa']['3']['block'] = 'testtask';
+1 -2
View File
@@ -18,7 +18,6 @@ if(isset($pageCSS)) css::internal($pageCSS);
<div class='dashboard dashboard-draggable' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
<div class='dashboard-actions'><a href='<?php echo $this->createLink("block", "admin", "id=0&module=$module"); ?>' data-toggle='modal' data-type='ajax' data-width='700' data-title='<?php echo $lang->block->createBlock?>'><i class='icon icon-plus' title='<?php echo $lang->block->createBlock?>' data-toggle='tooltip' data-placement='left'></i></a></div>
<div class='dashboard-empty-message hide'>
<h5 class='text-success'><?php echo $lang->block->emptyMessage ?></h5>
<a href='<?php echo $this->createLink("block", "admin", "id=0&module=$module"); ?>' data-toggle='modal' data-type='ajax' data-width='700' class='btn btn-primary'><i class='icon icon-plus'></i> <?php echo $lang->block->createBlock?></a>
</div>
<div class='row'>
@@ -35,10 +34,10 @@ if(isset($pageCSS)) css::internal($pageCSS);
<ul class='dropdown-menu pull-right'>
<li><a href='javascript:;' class='refresh-panel'><i class='icon-repeat'></i> <?php echo $lang->block->refresh ?></a></li>
<li><a data-toggle='modal' href="<?php echo $this->createLink("block", "admin", "id=$block->id&module=$module"); ?>" class='edit-block' data-title='<?php echo $block->title; ?>' data-icon='icon-pencil'><i class='icon-pencil'></i> <?php echo $lang->edit; ?></a></li>
<li><a href='javascript:;' class='remove-panel'><i class='icon-remove'></i> <?php echo $lang->delete; ?></a></li>
<?php if(!$block->source and $block->block == 'html'):?>
<li><a href="javascript:hiddenBlock(<?php echo $index;?>)" class="hidden-panel"><i class='icon-eye-close'></i><?php echo $lang->block->hidden; ?></a></li>
<?php endif;?>
<li><a href='javascript:;' class='remove-panel'><i class='icon-remove'></i> <?php echo $lang->delete; ?></a></li>
</ul>
</div>
</div>
+1 -1
View File
@@ -116,7 +116,7 @@ class bug extends control
$this->bug->buildSearchForm($productID, $this->products, $queryID, $actionURL);
$this->loadModel('search')->mergeFeatureBar('bug', 'browse');
$showModule = !empty($this->config->datatable->bugbrowse->showModule) ? $this->config->datatable->bugbrowse->showModule : '';
$showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : '';
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'bug', $showModule) : array();
/* Set view. */
+2 -1
View File
@@ -67,7 +67,8 @@ $lang->unfold = '+';
$lang->fold = '-';
$lang->homepage = 'Set homepage';
$lang->tutorial = 'Novice tutorial';
$lang->feature = 'New features';
$lang->changeLog = 'Change log';
$lang->manual = 'Manual';
$lang->customMenu = 'Custom menu';
$lang->tutorialConfirm = 'Detected you have not quit tutorial mode, quit now?';
+2 -1
View File
@@ -67,7 +67,8 @@ $lang->unfold = '+';
$lang->fold = '-';
$lang->homepage = '设为主页';
$lang->tutorial = '新手教程';
$lang->feature = '了解新功能';
$lang->changeLog = '修改日志';
$lang->manual = '手册';
$lang->customMenu = '自定义导航';
$lang->tutorialConfirm = '检测到你尚未退出新手教程模式,是否现在退出?';
+7 -3
View File
@@ -296,9 +296,13 @@ class commonModel extends model
if($app->company->website) echo html::a($app->company->website, $lang->company->website, '_blank');
if($app->company->backyard) echo html::a($app->company->backyard, $lang->company->backyard, '_blank');
if(!commonModel::isTutorialMode() and self::hasPriv('tutorial', 'start')) echo html::a(helper::createLink('tutorial', 'start'), $lang->tutorial, '', "class='iframe' data-width='800' data-headerless='true'");
echo html::a(helper::createLink('misc', 'changeLog'), $lang->feature, '', "class='iframe' data-width='800' data-headerless='true'");
echo html::a('javascript:;', $lang->help, '', "class='open-help-tab'");
echo "<div class='dropdown'>";
echo "<a href='javascript:;' data-toggle='dropdown'>" . $lang->help . " <span class='caret'></span></a>";
echo "<ul class='dropdown-menu'>";
echo '<li>' . html::a('javascript:;', $lang->manual, '', "class='open-help-tab'") . '</li>';
if(!commonModel::isTutorialMode() and self::hasPriv('tutorial', 'start')) echo '<li>' . html::a(helper::createLink('tutorial', 'start'), $lang->tutorial, '', "class='iframe' data-width='800' data-headerless='true'") . "</li>";
echo '<li>' . html::a(helper::createLink('misc', 'changeLog'), $lang->changeLog, '', "class='iframe' data-width='800' data-headerless='true'") . '</li>';
echo "</ul></div>";
echo html::a(helper::createLink('misc', 'about'), $lang->aboutZenTao, '', "class='about iframe' data-width='900' data-headerless='true' data-class='modal-about'");
}
+6 -4
View File
@@ -50,16 +50,18 @@ $(function()
});
</script>
<div class="modal fade" id="showModuleModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog w-800px">
<div class="modal-dialog w-600px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title"><i class="icon-cog"></i> <?php echo $lang->customConfig?></h4>
<h4 class="modal-title"><i class="icon-cog"></i> <?php echo $lang->datatable->showModule?></h4>
</div>
<div class="modal-body">
<form class='form-condensed' method='post' target='hiddenwin' action='<?php echo $this->createLink('datatable', 'ajaxSave')?>'>
<p><?php echo html::radio('showModule', $lang->datatable->showModuleList, isset($config->datatable->$datatableId->showModule) ? $config->datatable->$datatableId->showModule : '');?></p>
<p><button type='button' id='setShowModule' class='btn btn-primary'><?php echo $lang->save?></button></p>
<p>
<span><?php echo html::radio('showModule', $lang->datatable->showModuleList, isset($config->datatable->$datatableId->showModule) ? $config->datatable->$datatableId->showModule : '');?></span>
<button type='button' id='setShowModule' class='btn btn-primary'><?php echo $lang->save?></button>
</p>
</form>
</div>
</div>
+2 -2
View File
@@ -18,7 +18,6 @@
</div>
</div>
<div id='menuEditor'>
<p class='text-danger'><i class="icon icon-info-sign"></i> <?php echo $lang->custom->menuTip ?></p>
<div class='panel'>
<nav id='mainmenu'>
<ul></ul>
@@ -30,10 +29,11 @@
<ul></ul>
</nav>
</div>
<div class='text-center'>
<div class='text-left'>
<button id='saveMenuBtn' type='button' class='btn btn-primary'><?php echo $lang->save ?></button> &nbsp;
<button id='closeModalBtn' type='button' class='btn'><?php echo $lang->close ?></button> &nbsp;
<?php echo html::a(inlink('ajaxRestoreMenu'), $lang->custom->restore, 'hiddenwin', "class='btn'")?>
<span class='text-danger'> &nbsp; <i class="icon icon-info-sign"></i> <?php echo $lang->custom->menuTip ?></span>
</div>
</div>
</div>
+2 -5
View File
@@ -33,11 +33,8 @@ class datatable extends control
if(!empty($_POST))
{
$account = $this->app->user->account;
if($account == 'guest')
{
$this->send(array('result' => 'fail', 'target' => $target, 'message' => 'guest.'));
return;
}
if($account == 'guest') $this->send(array('result' => 'fail', 'target' => $target, 'message' => 'guest.'));
$name = $account . '.datatable.' . $this->post->target . '.' . $this->post->name;
$this->loadModel('setting')->setItem($name, $this->post->value);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => 'dao error.'));
+3 -3
View File
@@ -14,7 +14,7 @@ $lang->datatable->required = '必选';
$lang->datatable->branch = '分支';
$lang->datatable->platform = '平台';
$lang->datatable->showModule = '标题是否显示模块';
$lang->datatable->showModule = '列表页是否显示模块名';
$lang->datatable->showModuleList[] = '不显示';
$lang->datatable->showModuleList['base'] = '根节点';
$lang->datatable->showModuleList['end'] = '终极节点';
$lang->datatable->showModuleList['base'] = '只显示一级模块';
$lang->datatable->showModuleList['end'] = '只显示最后一级模块';
+6 -8
View File
@@ -15,11 +15,9 @@
<div class='heading'><?php echo html::icon($lang->icons['dept']);?> <?php echo $lang->dept->common;?></div>
</div>
<div class='row'>
<div class='col-sm-5'>
<div class='col-sm-4'>
<div class='panel'>
<div class='panel-heading'>
<?php echo html::icon($lang->icons['dept']);?> <strong><?php echo $title;?></strong>
</div>
<div class='panel-heading'><?php echo html::icon($lang->icons['dept']);?> <strong><?php echo $title;?></strong></div>
<div class='panel-body'>
<div class='container'>
<ul class='tree-lines' id='deptTree'></ul>
@@ -27,7 +25,7 @@
</div>
</div>
</div>
<div class='col-sm-7'>
<div class='col-sm-8'>
<div class='panel panel-sm'>
<div class='panel-heading'>
<i class='icon-sitemap'></i> <strong><?php echo $lang->dept->manageChild;?></strong>
@@ -121,19 +119,19 @@ $(function()
sort:
{
title: '<?php echo $lang->dept->dragAndSort ?>',
template: '<a class="sort-handler" data-toggle="tooltip" href="javascript:;"><i class="icon icon-move"></i>'
template: '<a class="sort-handler" data-toggle="tooltip" href="javascript:;"><i class="icon icon-move"></i></a>'
},
edit:
{
linkTemplate: '<?php echo helper::createLink('dept', 'edit', "deptid={0}"); ?>',
title: '<?php echo $lang->dept->edit ?>',
template: '<a data-toggle="tooltip" href="javascript:;"><i class="icon icon-pencil"></i>'
template: '<a data-toggle="tooltip" href="javascript:;"><?php echo $lang->edit?></a>'
},
"delete":
{
linkTemplate: '<?php echo helper::createLink('dept', 'delete', "deptid={0}"); ?>',
title: '<?php echo $lang->dept->delete ?>',
template: '<a data-toggle="tooltip" href="javascript:;"><i class="icon icon-trash"></i>'
template: '<a data-toggle="tooltip" href="javascript:;"><?php echo $lang->delete?></a>'
}
},
action: function(event)
-3
View File
@@ -923,9 +923,6 @@ $lang->resource->dev->db = 'db';
$lang->dev->methodOrder[5] = 'api';
$lang->dev->methodOrder[10] = 'db';
$lang->resource->datatable = new stdclass();
$lang->resource->datatable->custom = 'custom';
/* Every version of new privilege. */
$lang->changelog['1.0.1'][] = 'project-computeBurn';
+1 -1
View File
@@ -155,7 +155,7 @@ class product extends control
$this->product->buildSearchForm($productID, $this->products, $queryID, $actionURL);
$this->loadModel('search')->mergeFeatureBar('product', 'browse');
$showModule = !empty($this->config->datatable->productbrowse->showModule) ? $this->config->datatable->productbrowse->showModule : '';
$showModule = !empty($this->config->datatable->productBrowse->showModule) ? $this->config->datatable->productBrowse->showModule : '';
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'story', $showModule) : array();
/* Assign. */
+3 -3
View File
@@ -189,7 +189,7 @@ class project extends control
$memberPairs = array();
foreach($this->view->teamMembers as $key => $member) $memberPairs[$key] = $member->realname;
$showModule = !empty($this->config->datatable->projecttask->showModule) ? $this->config->datatable->projecttask->showModule : '';
$showModule = !empty($this->config->datatable->projectTask->showModule) ? $this->config->datatable->projectTask->showModule : '';
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($projectID, 'task', $showModule) : array();
/* Assign. */
@@ -226,7 +226,7 @@ class project extends control
* @access public
* @return void
*/
public function grouptask($projectID = 0, $groupBy = 'story')
public function grouptask($projectID = 0, $groupBy = 'story', $filter = '')
{
$project = $this->commonAction($projectID);
$projectID = $project->id;
@@ -296,6 +296,7 @@ class project extends control
$this->view->users = $users;
$this->view->moduleID = 0;
$this->view->moduleName = $this->lang->tree->all;
$this->view->filter = $filter;
$this->display();
}
@@ -1560,7 +1561,6 @@ class project extends control
{
$this->project->manageMembers($projectID);
$this->locate($this->createLink('project', 'team', "projectID=$projectID"));
exit;
}
/* Load model. */
-6
View File
@@ -34,9 +34,3 @@ $(function()
$tbody.find('tr.group-collapse').addClass('hidden');
});
})
function setFilter(groupBy, setting)
{
$.cookie('groupFilter_' + groupBy, setting, {expires:config.cookieLife, path:config.webRoot});
location.href = removeAnchor(location.href);
}
+3 -3
View File
@@ -148,15 +148,15 @@ $lang->project->groups['type'] = '类型分组';
$lang->project->groups['deadline'] = '截止分组';
$lang->project->groupFilter['story']['all'] = $lang->project->all;
$lang->project->groupFilter['story']['linked'] = '关联需求的任务';
$lang->project->groupFilter['story']['linked'] = '已关联需求的任务';
$lang->project->groupFilter['pri']['all'] = $lang->project->all;
$lang->project->groupFilter['pri']['setted'] = '已设置';
$lang->project->groupFilter['assignedTo']['undone'] = '未完成';
$lang->project->groupFilter['assignedTo']['all'] = $lang->project->all;
$lang->project->groupFilter['finishedBy']['all'] = $lang->project->all;
$lang->project->groupFilter['finishedBy']['done'] = '已完成';
$lang->project->groupFilter['closedBy']['all'] = $lang->project->all;
$lang->project->groupFilter['finishedBy']['all'] = $lang->project->all;
$lang->project->groupFilter['closedBy']['closed'] = '已关闭';
$lang->project->groupFilter['closedBy']['all'] = $lang->project->all;
$lang->project->groupFilter['deadline']['all'] = $lang->project->all;
$lang->project->groupFilter['deadline']['setted'] = '已设置';
+1
View File
@@ -1271,6 +1271,7 @@ class projectModel extends model
*/
public function getTeamMembers($projectID)
{
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembers();
return $this->dao->select("t1.*, t1.hours * t1.days AS totalHours, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
->where('t1.project')->eq((int)$projectID)
+18 -10
View File
@@ -13,11 +13,11 @@
<?php include '../../common/view/header.html.php';?>
<?php include './taskheader.html.php';?>
<?php if(isset($lang->project->groupFilter[$groupBy])):?>
<?php $currentFilter = isset($_COOKIE["groupFilter_$groupBy"]) ? $_COOKIE["groupFilter_$groupBy"] : key($lang->project->groupFilter[$groupBy]);?>
<?php $currentFilter = empty($filter) ? key($lang->project->groupFilter[$groupBy]) : $filter;?>
<div class='sub-featurebar'>
<ul class='nav nav-tabs'>
<?php foreach($lang->project->groupFilter[$groupBy] as $filterKey => $name):?>
<li <?php if($filterKey == $currentFilter) echo "class='active'"?>><a href="javascript:setFilter('<?php echo $groupBy?>', '<?php echo $filterKey?>')"><?php echo $name?></a></li>
<li <?php if($filterKey == $currentFilter) echo "class='active'"?>><?php echo html::a(inlink('grouptask', "projectID=$projectID&groupBy=$groupBy&filter=$filterKey"), $name)?></li>
<?php endforeach;?>
</ul>
</div>
@@ -25,7 +25,7 @@
<table class='table active-disabled table-condensed table-fixed' id='groupTable'>
<thead>
<tr>
<th class='w-120px text-left'>
<th class='<?php echo $groupBy == 'story' ? 'w-200px' : 'w-120px'?> text-left'>
<?php echo html::a('###', "<i class='icon-caret-down'></i> " . $lang->task->$groupBy, '', "class='expandAll' data-action='expand'")?>
<?php echo html::a('###', "<i class='icon-caret-right'></i> " . $lang->task->$groupBy, '', "class='collapseAll hidden' data-action='collapse'")?>
</th>
@@ -64,7 +64,10 @@
$groupLeft = 0.0;
$groupName = $groupKey;
if($groupBy == 'story' and $groupName == 0) $groupName = $this->lang->task->noStory;
if($groupBy == 'story' and $groupName == 0) $groupName = $this->lang->task->noStory;
if($groupBy == 'assignedTo' and $groupName == '') $groupName = $this->lang->task->noAssigned;
if($groupBy == 'finishedBy' and $groupName == '') $groupName = $this->lang->task->noFinished;
if($groupBy == 'closedBy' and $groupName == '') $groupName = $this->lang->task->noClosed;
if(!empty($groupByList[$groupKey])) $groupName .= '::' . $groupByList[$groupKey];
?>
<tbody>
@@ -72,12 +75,12 @@
<?php
if(isset($currentFilter) and $currentFilter != 'all')
{
if($groupBy == 'story' and $currentFilter == 'linked' and empty($task->story)) continue;
if($groupBy == 'pri' and $currentFilter == 'setted' and empty($task->pri)) continue;
if($groupBy == 'story' and $currentFilter == 'linked' and empty($task->story)) continue;
if($groupBy == 'pri' and $currentFilter == 'setted' and empty($task->pri)) continue;
if($groupBy == 'assignedTo' and $currentFilter == 'undone' and $task->status != 'wait' and $task->status != 'doing') continue;
if($groupBy == 'finishedBy' and $currentFilter == 'done' and $task->status != 'done') continue;
if($groupBy == 'closedBy' and $currentFilter == 'closed' and $task->status != 'closed') continue;
if($groupBy == 'deadline' and $currentFilter == 'setted' and $task->deadline == '0000-00-00') continue;
if($groupBy == 'finishedBy' and $currentFilter == 'done' and $task->status != 'done') continue;
if($groupBy == 'closedBy' and $currentFilter == 'closed' and $task->status != 'closed') continue;
if($groupBy == 'deadline' and $currentFilter == 'setted' and $task->deadline == '0000-00-00') continue;
}
?>
<?php $assignedToClass = $task->assignedTo == $app->user->account ? "style='color:red'" : '';?>
@@ -152,7 +155,12 @@
<tr class='actie-disabled group-collapse hidden text-center group-title'>
<td colspan='5' class='text-left'>
<?php echo html::a('###', "<i class='icon-caret-right'></i> " . $groupName, '', "class='collapseGroup' data-action='collapse' title='$groupName'");?>
<span class='groupdivider' style='margin-left:10px;'><span class='text'> <?php printf($lang->project->noTimeSummary, $groupSum, $groupWait, $groupDoing);?></span></span>
<span class='groupdivider' style='margin-left:10px;'>
<span class='text'>
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
<?php printf($lang->project->noTimeSummary, $groupSum, $groupWait, $groupDoing);?>
</span>
</span>
</td>
<td><?php echo $groupEstimate;?></td>
<td><?php echo $groupConsumed;?></td>
+3
View File
@@ -93,6 +93,9 @@ $lang->task->ditto = '同上';
$lang->task->dittoNotice = "该任务与上一任务不属于同一项目!";
$lang->task->selectAllUser = '全部';
$lang->task->noStory = '无需求';
$lang->task->noAssigned = '未指派';
$lang->task->noFinished = '未完成';
$lang->task->noClosed = '未关闭';
$lang->task->statusList[''] = '';
$lang->task->statusList['wait'] = '未开始';
+1 -1
View File
@@ -106,7 +106,7 @@ class testcase extends control
$this->testcase->buildSearchForm($productID, $this->products, $queryID, $actionURL);
$this->loadModel('search')->mergeFeatureBar('testcase', 'browse');
$showModule = !empty($this->config->datatable->testcasebrowse->showModule) ? $this->config->datatable->testcasebrowse->showModule : '';
$showModule = !empty($this->config->datatable->testcaseBrowse->showModule) ? $this->config->datatable->testcaseBrowse->showModule : '';
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array();
/* Assign. */
+21 -21
View File
@@ -12,29 +12,29 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<form class='form-condensed' method='post' target='hiddenwin'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix pull-left'><?php echo html::icon($lang->icons['todo']);?></span>
<strong class='pull-left'><small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small> <?php echo $lang->todo->batchCreate;?></strong>
<div class='input-group w-200px pull-left' id='datepicker'>
<span class='input-group-addon'><?php echo $lang->todo->date;?></span>
<?php echo html::input('date', $date, "class='form-control form-date' onchange='updateAction(this.value)'");?>
<span class='input-group-addon'><input type='checkbox' id='switchDate' onclick='switchDateTodo(this);'> <?php echo $lang->todo->periods['future'];?></span>
</div>
<div class='actions'>
<button type="button" class="btn btn-default" data-toggle="customModal"><i class='icon icon-cog'></i> </button>
</div>
<div id='titlebar'>
<div class='heading'>
<span class='prefix pull-left'><?php echo html::icon($lang->icons['todo']);?></span>
<strong class='pull-left'><small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small> <?php echo $lang->todo->batchCreate;?></strong>
<div class='input-group w-200px pull-left' id='datepicker'>
<span class='input-group-addon'><?php echo $lang->todo->date;?></span>
<?php echo html::input('date', $date, "class='form-control form-date' onchange='updateAction(this.value)'");?>
<span class='input-group-addon'><input type='checkbox' id='switchDate' onclick='switchDateTodo(this);'> <?php echo $lang->todo->periods['future'];?></span>
</div>
<div class='actions'>
<button type="button" class="btn btn-default" data-toggle="customModal"><i class='icon icon-cog'></i> </button>
</div>
</div>
<?php
$visibleFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
}
$columns = count($visibleFields) + 2;
?>
</div>
<?php
$visibleFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
}
$columns = count($visibleFields) + 2;
?>
<form class='form-condensed' method='post' target='hiddenwin'>
<table class='table table-form table-fixed with-border'>
<thead>
<tr>
+1 -1
View File
@@ -1498,7 +1498,7 @@ class treeModel extends model
foreach($branches as $branchID => $branch)
{
$stmt = $this->dbh->query($this->buildMenuQuery($rootID, $viewType, $currentModuleID, $branchID));
$branchTrees[] = array('branch' => $branchID, 'id' => 0, 'name' => $branch, 'root' => $rootID, 'actions' => array('add' => true, 'edit' => false, 'delete' => false, 'sort' => true), 'nodeType' => 'branch', 'type' => 'branch', 'children' => $this->getDataStructure($stmt, $viewType));
$branchTrees[] = array('branch' => $branchID, 'id' => 0, 'name' => $branch, 'root' => $rootID, 'actions' => false, 'nodeType' => 'branch', 'type' => 'branch', 'children' => $this->getDataStructure($stmt, $viewType));
}
$fullTrees[] = array('name' => $this->lang->product->branchName[$product->type], 'root' => $rootID, 'type' => 'branch', 'actions' => false, 'children' => $branchTrees);
}
+5 -5
View File
@@ -16,7 +16,7 @@
<div class='heading'><?php echo $lang->tree->common;?></div>
</div>
<div class='row'>
<div class='col-sm-5'>
<div class='col-sm-4'>
<div class='panel'>
<div class='panel-heading'><i class='icon-cog'></i> <strong><?php echo $title;?></strong></div>
<div class='panel-body'>
@@ -26,7 +26,7 @@
</div>
</div>
</div>
<div class='col-sm-7'>
<div class='col-sm-8'>
<form id='childrenForm' class='form-condensed' method='post' target='hiddenwin' action='<?php echo $this->createLink('tree', 'manageChild', "root={$root->id}&viewType=$viewType");?>'>
<div class='panel'>
<div class='panel-heading'>
@@ -128,19 +128,19 @@ $(function()
sort:
{
title: '<?php echo $lang->tree->dragAndSort ?>',
template: '<a class="sort-handler" data-toggle="tooltip" href="javascript:;"><i class="icon icon-move"></i>'
template: '<a class="sort-handler" data-toggle="tooltip" href="javascript:;"><i class="icon icon-move"></i></a>'
},
edit:
{
linkTemplate: '<?php echo helper::createLink('tree', 'edit', "moduleID={0}&type=$viewType"); ?>',
title: '<?php echo $lang->tree->edit ?>',
template: '<a data-toggle="tooltip" href="javascript:;"><i class="icon icon-pencil"></i>'
template: '<a data-toggle="tooltip" href="javascript:;"><?php echo $lang->edit?></a>'
},
"delete":
{
linkTemplate: '<?php echo helper::createLink('tree', 'delete', "rootID=$rootID&moduleID={0}"); ?>',
title: '<?php echo $lang->tree->delete ?>',
template: '<a data-toggle="tooltip" href="javascript:;"><i class="icon icon-trash"></i>'
template: '<a data-toggle="tooltip" href="javascript:;"><?php echo $lang->delete?></a>'
}
},
action: function(event)
+8 -25
View File
@@ -15,7 +15,7 @@
<div class='heading'><?php echo $lang->tree->common;?></div>
</div>
<div class='row'>
<div class='col-sm-5'>
<div class='col-sm-4'>
<div class='panel'>
<div class='panel-heading'><i class='icon-cog'></i> <strong><?php echo $title;?></strong></div>
<div class='panel-body'>
@@ -23,7 +23,7 @@
</div>
</div>
</div>
<div class='col-sm-7'>
<div class='col-sm-8'>
<form id='childrenForm' class='form-condensed' method='post' target='hiddenwin' action='<?php echo $this->createLink('tree', 'manageChild', "root={$root->id}&viewType=task");?>'>
<div class='panel'>
<div class='panel-heading'>
@@ -114,20 +114,10 @@ $(function()
var title = (item.type === 'product' ? '<i class="icon icon-cube text-muted"></i> ' : '') + item.name;
var link = item.id !== undefined ? ('<a href="' + createLink('tree', 'browsetask', 'root=<?php echo $rootID ?>&viewType=<?php echo $viewType ?>&moduleID={0}'.format(item.id)) + '">' + title + '</a>') : ('<span class="tree-toggle">' + title + '</span>');
var link = item.id !== undefined ? ('<a href="' + createLink('tree', 'browsetask', 'root=<?php echo $rootID ?>&viewType=task&moduleID={0}'.format(item.id)) + '">' + title + '</a>') : ('<span class="tree-toggle">' + title + '</span>');
var $toggle = $('<span class="module-name" data-id="' + item.id + '">' + link + '</span>');
if(item.short)
{
$toggle.append('&nbsp; <span class="module-manager text-muted">(' + item.short + ')</span>');
}
if(item.type === 'task')
{
$toggle.append('&nbsp; <span class="text-muted">[T]</span>');
}
if(item.type === 'story')
{
$li.addClass('story-item');
}
if(item.type === 'task') $toggle.append('&nbsp; <span class="text-muted">[T]</span>');
if(item.type === 'story') $li.addClass('story-item');
$li.append($toggle);
if(item.nodeType) $li.addClass('tree-item-' + item.nodeType);
return true;
@@ -137,26 +127,19 @@ $(function()
sort:
{
title: '<?php echo $lang->tree->dragAndSort ?>',
template: '<a class="sort-handler" data-toggle="tooltip" href="javascript:;"><i class="icon icon-move"></i>'
template: '<a class="sort-handler" data-toggle="tooltip" href="javascript:;"><i class="icon icon-move"></i></a>'
},
edit:
{
linkTemplate: '<?php echo helper::createLink('tree', 'edit', "moduleID={0}&type=task"); ?>',
title: '<?php echo $lang->tree->edit ?>',
template: '<a data-toggle="tooltip" href="javascript:;"><i class="icon icon-pencil"></i>'
},
add:
{
title: '<?php echo $lang->tree->manageChild ?>',
template: '<a data-toggle="tooltip" href="javascript:;"><i class="icon icon-sitemap"></i>',
linkTemplate: '<?php echo helper::createLink('tree', 'browsetask', "rootID=$rootID&productID=$productID&currentModuleID={0}"); ?>',
templateInList: false
template: '<a data-toggle="tooltip" href="javascript:;"><?php echo $lang->edit?></a>'
},
"delete":
{
linkTemplate: '<?php echo helper::createLink('tree', 'delete', "rootID=$rootID&moduleID={0}"); ?>',
title: '<?php echo $lang->tree->delete ?>',
template: '<a data-toggle="tooltip" href="javascript:;"><i class="icon icon-trash"></i>'
template: '<a data-toggle="tooltip" href="javascript:;"><?php echo $lang->delete?></a>'
}
},
action: function(event)
+21
View File
@@ -191,4 +191,25 @@ class tutorialModel extends model
$story = $stories[0];
return array($story->id => $story->title);
}
public function getTeamMembers()
{
$member = new stdclass();
$member->project = 1;
$member->account = $this->app->user->account;
$member->role = $this->app->user->role;
$member->join = $this->app->user->join;
$member->days = 10;
$member->hours = 7.0;
$member->totalHours = 70.0;
$member->realname = $this->app->user->realname;
return array($member->account => $member);
}
public function getUserPairs()
{
$users[$this->app->user->account] = $this->app->user->account;
$users['test'] = 'Test';
return $users;
}
}
+1
View File
@@ -71,6 +71,7 @@ class userModel extends model
*/
public function getPairs($params = '', $usersToAppended = '')
{
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getUserPairs();
/* Set the query fields and orderBy condition.
*
* If there's xxfirst in the params, use INSTR function to get the position of role fields in a order string,