diff --git a/lib/front/front.class.php b/lib/front/front.class.php index dcfb6d3b6d..510da7ba0d 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -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();}"; diff --git a/module/story/control.php b/module/story/control.php index c97a12f9fd..cbdd1190a0 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -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')); } diff --git a/module/task/control.php b/module/task/control.php index 1e3e8e54ac..ff8d78a567 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -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')); } diff --git a/module/task/js/view.js b/module/task/js/view.js index 786f079e8e..27a9d91402 100644 --- a/module/task/js/view.js +++ b/module/task/js/view.js @@ -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;}}); -})