diff --git a/lib/front/front.class.php b/lib/front/front.class.php index 07a5c3b4d7..01ff9be60f 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -759,6 +759,7 @@ EOT; /** * Close colorbox in javascript. + * This is a obsolete method, you can use 'closeModal' instead. * * @param string $window * @static @@ -766,10 +767,23 @@ EOT; * @return void */ static public function closeColorbox($window = 'self') + { + return self::closeModal($window); + } + + /** + * Close modal with javascript. + * + * @param string $window + * @static + * @access public + * @return void + */ + static public function closeModal($window = 'self') { $js = self::start(); $js .= "if($window.location.href == self.location.href){ $window.window.close();}"; - $js .= "else{ $window.$.cookie('selfClose', 1);$window.$.colorbox.close();}"; + $js .= "else{ $window.$.cookie('selfClose', 1);$window.$.closeModal();}"; $js .= self::end(); return $js; } diff --git a/module/bug/control.php b/module/bug/control.php index b25f1db0d5..8bf0f78175 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -628,7 +628,7 @@ class bug extends control $this->action->logHistory($actionID, $changes); $this->sendmail($bugID, $actionID); - if(isonlybody()) die(js::closeColorbox('parent.parent')); + if(isonlybody()) die(js::closeModal('parent.parent')); die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); } @@ -657,7 +657,7 @@ class bug extends control if(dao::isError()) die(js::error(dao::getError())); $actionID = $this->action->create('bug', $bugID, 'bugConfirmed', $this->post->comment); $this->sendmail($bugID, $actionID); - if(isonlybody()) die(js::closeColorbox('parent.parent')); + if(isonlybody()) die(js::closeModal('parent.parent')); die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); } @@ -716,7 +716,7 @@ class bug extends control $confirmURL = $this->createLink('task', 'view', "taskID=$bug->toTask"); echo js::confirm(sprintf($this->lang->bug->remindTask, $bug->toTask), $confirmURL, '', 'parent'); } - if(isonlybody()) die(js::closeColorbox('parent.parent')); + if(isonlybody()) die(js::closeModal('parent.parent')); die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); } @@ -772,7 +772,7 @@ class bug extends control $files = $this->loadModel('file')->saveUpload('bug', $bugID); $actionID = $this->action->create('bug', $bugID, 'Activated', $this->post->comment); $this->sendmail($bugID, $actionID); - if(isonlybody()) die(js::closeColorbox('parent.parent')); + if(isonlybody()) die(js::closeModal('parent.parent')); die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); } @@ -807,7 +807,7 @@ class bug extends control if(dao::isError()) die(js::error(dao::getError())); $actionID = $this->action->create('bug', $bugID, 'Closed', $this->post->comment); $this->sendmail($bugID, $actionID); - if(isonlybody()) die(js::closeColorbox('parent.parent')); + if(isonlybody()) die(js::closeModal('parent.parent')); die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); } diff --git a/module/bug/css/view.css b/module/bug/css/view.css index 91f0e7ffd6..9dbb2122ba 100644 --- a/module/bug/css/view.css +++ b/module/bug/css/view.css @@ -1 +1 @@ -.content .stepTitle{margin:7px 0 7px -15px; display:block; color: green} +.content .stepTitle{display:block; color: green} diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js index 982b495d3e..9e431dc374 100644 --- a/module/bug/js/browse.js +++ b/module/bug/js/browse.js @@ -1,6 +1,5 @@ $(document).ready(function() { - $("a.customFields").colorbox({width:680, height:400, iframe:true, transition:'none'}); $('#' + browseType + 'Tab').addClass('active'); $('#module' + moduleID).addClass('active'); if(browseType == 'bysearch') ajaxGetSearchForm(); diff --git a/module/bug/js/view.js b/module/bug/js/view.js index 8c6f398c62..34bfab7a67 100644 --- a/module/bug/js/view.js +++ b/module/bug/js/view.js @@ -1,3 +1,4 @@ function setModal4List(colorboxClass, replaceID) { + if(onlybody != 'yes') $('.iframe').modalTrigger({width:900, height:500, type:'iframe', afterHide:function(){parent.location.href=parent.location.href;}}) } diff --git a/module/bug/view/activate.html.php b/module/bug/view/activate.html.php index 4e50af47e4..a3da5ea551 100644 --- a/module/bug/view/activate.html.php +++ b/module/bug/view/activate.html.php @@ -12,20 +12,28 @@ ?> -