diff --git a/lib/front/front.class.php b/lib/front/front.class.php index 6c02b9274d..dcfb6d3b6d 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -815,11 +815,11 @@ EOT; * @access public * @return void */ - static public function closeModal($window = 'self') + static public function closeModal($window = 'self', $location) { $js = self::start(); $js .= "if($window.location.href == self.location.href){ $window.window.close();}"; - $js .= "else{ $window.$.cookie('selfClose', 1);$window.$.closeModal();}"; + $js .= "else{ $window.$.cookie('selfClose', 1);$window.$.closeModal(null, '$location');}"; $js .= self::end(); return $js; } diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 7cab2d4940..8a478f2508 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -153,8 +153,8 @@ $lang->my->menu->testtask = array('link' => '测试|my|testtask|', 'subMod $lang->my->menu->story = array('link' => '需求|my|story|', 'subModule' => 'story'); $lang->my->menu->myProject = '项目|my|project|'; $lang->my->menu->dynamic = '动态|my|dynamic|'; -$lang->my->menu->profile = array('link' => '档案|my|profile|onlybody=yes', 'alias' => 'editprofile'); -$lang->my->menu->changePassword = '密码|my|changepassword|onlybody=yes'; +$lang->my->menu->profile = array('link' => '档案|my|profile', 'alias' => 'editprofile'); +$lang->my->menu->changePassword = '密码|my|changepassword'; $lang->todo = new stdclass(); $lang->todo->menu = $lang->my->menu; diff --git a/module/group/control.php b/module/group/control.php index 922ade043e..d3a14f7193 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -107,6 +107,7 @@ class group extends control { $this->group->copy($groupID); if(dao::isError()) die(js::error(dao::getError())); + if(isonlybody()) die(js::closeModal('parent.parent', 'this')); die(js::locate($this->createLink('group', 'browse'), 'parent')); } @@ -198,6 +199,7 @@ class group extends control if(!empty($_POST)) { $this->group->updateUser($groupID); + if(isonlybody()) die(js::closeModal('parent.parent', 'this')); die(js::locate($this->createLink('group', 'browse'), 'parent')); } $group = $this->group->getById($groupID); diff --git a/module/my/js/common.js b/module/my/js/common.js index 379bcaf868..b68d3aed41 100644 --- a/module/my/js/common.js +++ b/module/my/js/common.js @@ -1,5 +1,6 @@ $(function() { - $('#submenuprofile').modalTrigger({width:600, type:'iframe'}); - $('#submenuchangePassword').modalTrigger({width:500, type:'iframe'}); + var sp = $('#submenuprofile'), scp = $('#submenuchangePassword'); + sp.attr('href', sp.attr('href') + '?onlybody=yes').modalTrigger({width:600, type:'iframe'}); + scp.attr('href', scp.attr('href') + '?onlybody=yes').modalTrigger({width:500, type:'iframe'}); }); diff --git a/module/my/view/profile.html.php b/module/my/view/profile.html.php index 5dd946b5d5..bb468baa8e 100644 --- a/module/my/view/profile.html.php +++ b/module/my/view/profile.html.php @@ -15,7 +15,7 @@
icons['user']);?> my->profile;?>
- createLink('my', 'editprofile', '', '', true), $lang->user->editProfile, '', "class='btn btn-primary'");?> + createLink('my', 'editprofile'), $lang->user->editProfile, '', "class='btn btn-primary'");?>
diff --git a/module/story/view/review.html.php b/module/story/view/review.html.php index 69efd0a483..6141c7c9c1 100644 --- a/module/story/view/review.html.php +++ b/module/story/view/review.html.php @@ -11,76 +11,72 @@ */ ?> + -
-
- icons['story']);?> id;?> - createLink('story', 'view', "storyID=$story->id"), $story->title);?> - icons['review']) . ' ' . $lang->story->review;?> -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - status == 'changed' or ($story->status == 'draft' and $story->version > 1)):?> - - - - - - - - - - - - - - - - - - - - - - - - - -
story->reviewedDate;?>
story->reviewResult;?>story->reviewResultList, '', 'class=form-control onchange="switchShow(this.value)"');?>
story->assignedTo;?>lastEditedBy ? $story->lastEditedBy : $story->openedBy, 'class=form-control');?>
story->reviewedBy;?>user->account, "class='form-control' multiple data-placeholder='{$lang->story->chosen->reviewedBy}'");?>
story->comment;?>
story->checkAffection;?>
- - goback, $app->session->storyList ? $app->session->storyList : inlink('view', "storyID=$story->id"));?> -
- +
+
+
+ icons['story']);?> id;?> + createLink('story', 'view', "storyID=$story->id"), $story->title);?> + icons['review']) . ' ' . $lang->story->review;?>
-
-
-
+
+ + + + + + + + + + + + + + + + + + + + + + status == 'changed' or ($story->status == 'draft' and $story->version > 1)):?> + + + + + + + + + + + + + + + + + + + + + + + + + +
story->reviewedDate;?>
story->reviewResult;?>story->reviewResultList, '', 'class=form-control onchange="switchShow(this.value)"');?>
story->assignedTo;?>lastEditedBy ? $story->lastEditedBy : $story->openedBy, 'class=form-control');?>
story->reviewedBy;?>user->account, "class='form-control' multiple data-placeholder='{$lang->story->chosen->reviewedBy}'");?>
story->comment;?>
story->checkAffection;?>
+ + goback, $app->session->storyList ? $app->session->storyList : inlink('view', "storyID=$story->id"));?> +
+
+
+
diff --git a/www/js/my.full.js b/www/js/my.full.js index 91b1372925..e35798d130 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -965,9 +965,17 @@ function setModal() } $ajaxModal = $('#ajaxModal'); - $.extend({'closeModal':function(callback) + $.extend({'closeModal':function(callback, location) { - $ajaxModal.on('hidden.bs.modal', callback); + $ajaxModal.on('hidden.bs.modal', function() + { + if(location) + { + if(location == 'this') window.location.reload(); + else window.location = location; + } + callback(); + }); $ajaxModal.modal('hide'); }}); @@ -1056,25 +1064,6 @@ function condensedForm() }); } -/** - * Update data to the target element synchronous. - * - * @access public - * @return void - */ -function setSyncTrigger() -{ - $("[data-sync-target]").on('input propertychange', function() - { - var $this = $(this); - var val = $this.prop('tagName') == 'INPUT' ? $this.val() : $this.html(); - var target = $($this.attr('data-sync-target')); - if(target.prop('tagName') == 'INPUT') target.val(val); - else target.html(val); - }); -} - - /* Ping the server every some minutes to keep the session. */ needPing = true; @@ -1099,8 +1088,6 @@ $(document).ready(function() toggleSearch(); toggleTreeBox(); - setSyncTrigger(); - hideClearDataLink(); $(window).resize(saveWindowSize); // When window resized, call it again.