Changes for page Profile of XWikiUserSheet

Last modified by Ludovic Dubost on 2024/07/22 15:51

From version 7.1
edited by Ludovic Dubost
on 2018/12/09 12:24
Change comment: Install extension [org.xwiki.platform:xwiki-platform-user-profile-ui/10.10]
To version 6.1
edited by Ludovic Dubost
on 2018/07/01 11:40
Change comment: Install extension [org.xwiki.platform:xwiki-platform-user-profile-ui/10.5]

Summary

Details

Page properties
Content
... ... @@ -13,7 +13,6 @@
13 13  #if($isMyProfile || $hasAdmin)
14 14   #set($discard = $categories.add({'id':'preferences', 'sheet':'XWiki.XWikiUserPreferencesSheet', 'glyphicon': 'wrench'}))
15 15  #end
16 -#set($discard = $categories.add({'id':'groups', 'sheet':'XWiki.XWikiUserMembershipSheet', 'glyphicon': 'group'}))
17 17  ## TODO: add APIs to be able to display users watchlists to admins
18 18  #if($isMyProfile && $hasWatch)
19 19   #set($discard = $categories.add({'id':'watchlist', 'sheet':'XWiki.XWikiUserWatchListSheet', 'glyphicon': 'eye'}))
... ... @@ -117,5 +117,10 @@
117 117   <input type='hidden' name='category' value="$!{escapetool.xml($currentCategory)}" />
118 118   #end
119 119   <div class="clearfloats">&nbsp;</div>
119 + #if($request.get('xpage'))
120 + <script type="text/javascript">
121 + document.fire('lightbox:userprofile:loaded');
122 + </script>
123 + #end
120 120  {{/html}}
121 121  {{/velocity}}
XWiki.JavaScriptExtension[0]
Code
... ... @@ -2,9 +2,9 @@
2 2  // Start XWiki augmentation.
3 3  Object.extend(XWiki, {
4 4   userprofile : {
5 - init : function(container) {
5 + init : function() {
6 6   this.crtCategory = '';
7 - this.tabsContainer = (container || $('body')).down('#user-vertical-menu');
7 + this.tabsContainer = $('user-vertical-menu');
8 8   if (!this.tabsContainer) {
9 9   return;
10 10   }
... ... @@ -91,14 +91,12 @@
91 91   }
92 92  });
93 93  
94 -var init = function(event) {
95 - ((event && event.memo.elements) || [$('body')]).each(function(element) {
96 - XWiki.userprofile.init(element);
97 - });
94 +var init = function() {
95 + XWiki.userprofile.init();
98 98   return true;
99 99  };
100 100  (XWiki.domIsLoaded && init()) || document.observe('xwiki:dom:loaded', init);
101 -document.observe('xwiki:dom:updated', init);
99 +document.observe('lightbox:userprofile:loaded', init);
102 102  // End XWiki augmentation.
103 103  return XWiki;
104 104  }(XWiki || {}));