* tree support update after actions with ajax.
This commit is contained in:
@@ -1234,12 +1234,18 @@ class project extends control
|
||||
{
|
||||
$this->project->setMenu($this->projects, $projectID);
|
||||
$project = $this->loadModel('project')->getById($projectID);
|
||||
$tree = $this->project->getProjectTree($projectID);
|
||||
|
||||
if($this->viewType === 'json')
|
||||
{
|
||||
die(json_encode($tree, JSON_HEX_QUOT | JSON_HEX_APOS));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->project->tree;
|
||||
$this->view->project = $project;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->level = $level;
|
||||
$this->view->tree = $this->project->getProjectTree($projectID);
|
||||
$this->view->tree = $tree;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ include './taskheader.html.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php js::set('replaceID', 'taskList')?>
|
||||
<script>
|
||||
var projectID = <?php echo $projectID?>;
|
||||
$('#project<?php echo $projectID;?>').addClass('active')
|
||||
@@ -143,6 +142,15 @@ $(function()
|
||||
tree.show($('.item-type-module'));
|
||||
}
|
||||
});
|
||||
|
||||
setModal4List('iframe', null, function()
|
||||
{
|
||||
$.cancelReloadCloseModal();
|
||||
$.getJSON('<?php echo inlink('tree', "projectID=$projectID", 'json') ?>', function(newData)
|
||||
{
|
||||
tree.reload(newData);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
+2
-1
@@ -1277,10 +1277,11 @@ function setModal4List(triggerClass, replaceID, callback, width)
|
||||
$(".date").datetimepicker(datepickerOptions);
|
||||
}
|
||||
catch(err){}
|
||||
if(typeof(e) == 'function') callback();
|
||||
if($.isFunction(callback)) callback();
|
||||
$.cookie('selfClose', 0);
|
||||
});
|
||||
}
|
||||
else if($.isFunction(callback)) callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+3
-3
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user