* Fix manage task module tree error.

This commit is contained in:
tianshujie98
2021-04-23 10:11:12 +08:00
parent 142e73552d
commit 1ca1e16a7b
+4 -3
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('openApp', $app->openApp);?>
<style>
li.story-item > .tree-actions .tree-action[data-type=sort] {display: none;}
li.story-item > .tree-actions .tree-action[data-type=edit] {display: none;}
@@ -50,10 +51,10 @@ li.story-item > .tree-actions .tree-action[data-type=delete] {display: none;}
<tr>
<td class="text-middle text-right with-padding">
<?php
echo "<span>" . html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&viewType=task"), $root->name) . "<i class='icon icon-angle-right muted'></i></span>";
echo "<span>" . html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&viewType=task"), $root->name, '', "data-app='{$app->openApp}'") . "<i class='icon icon-angle-right muted'></i></span>";
foreach($parentModules as $module)
{
echo "<span>" . html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&moduleID=$module->id"), $module->name) . " <i class='icon icon-angle-right muted'></i></span>";
echo "<span>" . html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&moduleID=$module->id"), $module->name, '', "data-app='{$app->openApp}'") . " <i class='icon icon-angle-right muted'></i></span>";
}
?>
</td>
@@ -138,7 +139,7 @@ $(function()
var $toggle = $('<span class="module-name" data-id="' + item.id + '">' + link + '</span>');
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', 'rootID=<?php echo $rootID ?>&viewType=task&moduleID={0}'.format(item.id)) + '">' + title + '</a>') : ('<span class="tree-toggle">' + title + '</span>');
var link = item.id !== undefined ? ('<a data-app=' + openApp + ' href="' + createLink('tree', 'browsetask', 'rootID=<?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.type === 'task')
{