* Finish task #43985.
This commit is contained in:
@@ -633,6 +633,7 @@ class bugModel extends model
|
||||
->join('openedBuild', ',')
|
||||
->join('mailto', ',')
|
||||
->join('linkBug', ',')
|
||||
->setIF(count($this->post->mailto) == 1 and !$this->post->mailto[0], 'mailto', '')
|
||||
->setIF($this->post->assignedTo != $oldBug->assignedTo, 'assignedDate', $now)
|
||||
->setIF($this->post->resolvedBy != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
->setIF($this->post->resolution != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
|
||||
@@ -2275,7 +2275,7 @@ EOT;
|
||||
if($startModule) $startModulePath = $startModule->path . '%';
|
||||
}
|
||||
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('lib')->eq($rootID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchAll();
|
||||
@@ -2363,7 +2363,7 @@ EOT;
|
||||
else
|
||||
{
|
||||
if(!$docID and $currentMethod != 'tablecontents') $docID = $doc->id;
|
||||
$treeMenu[$module->id] .= '<li' . ($doc->id == $docID ? ' class="active"' : ' class="doc"') . '>';
|
||||
$treeMenu[$module->id] .= '<li' . ($doc->id == $docID ? ' class="active"' : ' class="doc"') . " data-id=$doc->id>";
|
||||
|
||||
if($currentMethod == 'tablecontents')
|
||||
{
|
||||
@@ -2399,7 +2399,7 @@ EOT;
|
||||
}
|
||||
else
|
||||
{
|
||||
$li = "<div class='tree-group'><span class='module-name'><a title='{$module->name}'>" . $module->name . '</a></span>';
|
||||
$li = "<div class='tree-group'><span class='module-name'><a class='sort-module' title='{$module->name}'>" . $module->name . '</a></span>';
|
||||
$li .= "<div class='tree-actions'>";
|
||||
$li .= html::a(helper::createLink('tree', 'edit', "module=$module->id&type=doc"), "<i class='icon icon-edit'></i>", '', "data-toggle='modal' title={$this->lang->doc->editType}");
|
||||
$li .= html::a(helper::createLink('tree', 'browse', "rootID=$libID&type=doc&module=$module->id", '', 1), "<i class='icon icon-split'></i>", '', "class='iframe' title={$this->lang->doc->editType}");
|
||||
@@ -2433,7 +2433,7 @@ EOT;
|
||||
}
|
||||
}
|
||||
|
||||
$treeMenu[$module->parent] .= '<li class="' . implode(' ', $class) . '">' . $li . '</li>';
|
||||
$treeMenu[$module->parent] .= '<li class="' . implode(' ', $class) . '" data-id=' . $module->id . '>' . $li . '</li>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
|
||||
/* Make modules tree sortable */
|
||||
$('#modules').sortable(
|
||||
{
|
||||
trigger: '.module-name>a',
|
||||
trigger: '.module-name>a.sort-module',
|
||||
dropToClass: 'sort-to',
|
||||
stopPropagation: true,
|
||||
nested: true,
|
||||
@@ -97,7 +97,19 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
|
||||
{
|
||||
if(!e.changed) return;
|
||||
|
||||
/* TODO(@sunguangming): console.log('sort.finish', e); */
|
||||
var orders = {};
|
||||
$('#modules').find('li.has-list').each(function()
|
||||
{
|
||||
var $li = $(this);
|
||||
|
||||
var item = $li.data();
|
||||
orders['orders[' + item.id + ']'] = $li.attr('data-order') || item.order;
|
||||
});
|
||||
|
||||
$.post('<?php echo $this->createLink('tree', 'updateOrder');?>', orders, function(data){}).error(function()
|
||||
{
|
||||
bootbox.alert(lang.timeout);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -20,3 +20,4 @@
|
||||
table th, td {border: 2px solid #fff !important;}
|
||||
|
||||
#kanban {padding-bottom: 10px}
|
||||
.kanban-col[data-type='closedProject'] .count {display: none}
|
||||
|
||||
Reference in New Issue
Block a user