Clean the filters for lists linked by SuiteDesk nodes shortcuts
This commit is contained in:
parent
1371a4bec5
commit
c3e1439b06
11 changed files with 85 additions and 34 deletions
|
@ -16,26 +16,25 @@ function stormdok_list() {
|
|||
unset($_SESSION['stormdok_list_filter']['project_nid']);
|
||||
unset($_SESSION['stormdok_list_filter']['task_nid']);
|
||||
}
|
||||
|
||||
if (array_key_exists('project_nid', $_GET)) {
|
||||
if ($_SESSION['stormdok_list_filter']['project_nid'] != $_GET['project_nid']) {
|
||||
$_SESSION['stormdok_list_filter']['project_nid'] = $_GET['project_nid'];
|
||||
}
|
||||
$p = node_load($_GET['project_nid']);
|
||||
$_SESSION['stormdok_list_filter']['organization_nid'] = $p->organization_nid;
|
||||
|
||||
unset($_SESSION['stormdok_list_filter']['task_nid']);
|
||||
}
|
||||
|
||||
if (array_key_exists('task_nid', $_GET)) {
|
||||
if ($_SESSION['stormdok_list_filter']['task_nid'] != $_GET['task_nid']) {
|
||||
$_SESSION['stormdok_list_filter']['task_nid'] = $_GET['task_nid'];
|
||||
}
|
||||
|
||||
$t = node_load($_GET['task_nid']);
|
||||
$_SESSION['stormdok_list_filter']['organization_nid'] = $t->organization_nid;
|
||||
$_SESSION['stormdok_list_filter']['project_nid'] = $t->project_nid;
|
||||
}
|
||||
if (array_key_exists('view', $_GET) && $_GET['view'] == 'all') {
|
||||
$_SESSION['stormdok_list_filter']['title'] = '';
|
||||
}
|
||||
|
||||
$i = new stdClass();
|
||||
$i->type = 'stormdok';
|
||||
|
|
Reference in a new issue