* fixed a bug: page not reload when close modal on story/view.
This commit is contained in:
@@ -815,7 +815,7 @@ EOT;
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
static public function closeModal($window = 'self', $location)
|
||||
static public function closeModal($window = 'self', $location = '')
|
||||
{
|
||||
$js = self::start();
|
||||
$js .= "if($window.location.href == self.location.href){ $window.window.close();}";
|
||||
|
||||
@@ -438,7 +438,7 @@ class story extends control
|
||||
$actionID = $this->action->create('story', $storyID, 'Activated', $this->post->comment);
|
||||
$this->sendmail($storyID, $actionID);
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -611,7 +611,7 @@ class story extends control
|
||||
$actionID = $this->action->create('story', $storyID, 'Closed', $this->post->comment, ucfirst($this->post->closedReason));
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($storyID, $actionID);
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate(inlink('view', "storyID=$storyID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -454,7 +454,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ class task extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->task->recordEstimate($taskID);
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ class task extends control
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -616,7 +616,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -690,7 +690,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -724,7 +724,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,3 @@ function assign(taskID, assignedTo)
|
||||
$('.assign').height(40);
|
||||
$('.assign').load(createLink('user', 'ajaxGetUser', 'taskID=' + taskID + '&assignedTo=' + assignedTo));
|
||||
}
|
||||
$(function()
|
||||
{
|
||||
if(onlybody != 'yes') $('.iframe').modalTrigger({width:900, type:'iframe', afterHide:function(){parent.location.href=parent.location.href;}});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user