Changes for page Profile of XWikiUserSheet

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

From 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]
To version 4.1
edited by Ludovic Dubost
on 2015/09/01 11:46
Change comment: Install extension [org.xwiki.platform:xwiki-platform-user-profile-ui-7.1]

Summary

Details

Page properties
Content
... ... @@ -15,17 +15,10 @@
15 15  #end
16 16  ## TODO: add APIs to be able to display users watchlists to admins
17 17  #if($isMyProfile && $hasWatch)
18 - #set($discard = $categories.add({'id':'watchlist', 'sheet':'XWiki.XWikiUserWatchListSheet', 'glyphicon': 'eye'}))
18 + #set($discard = $categories.add({'id':'watchlist', 'sheet':'XWiki.XWikiUserWatchListSheet', 'glyphicon': 'eye-open'}))
19 19  #end
20 20  #if($isMyProfile)
21 - #if ("$!services.notification.watch" != '' || $hasWatch)
22 - #set($discard = $categories.add({'id':'network', 'sheet':'XWiki.XWikiUserNetworkSheet', 'glyphicon': 'world'}))
23 - #end
24 - ## TODO: add an enhancement system instead
25 - #set($notificationsSheet = $services.model.createDocumentReference('', ['XWiki', 'Notifications', 'Code'], 'XWikiUserNotificationsSheet'))
26 - #if ($xwiki.exists($notificationsSheet))
27 - #set($discard = $categories.add({'id':'notifications', 'sheet':'XWiki.Notifications.Code.XWikiUserNotificationsSheet', 'glyphicon': 'bell'}))
28 - #end
21 + #set($discard = $categories.add({'id':'network', 'sheet':'XWiki.XWikiUserNetworkSheet', 'glyphicon': 'globe'}))
29 29  #end
30 30  #set($userWikiSheet = 'WikiManager.UserWikiSheet')
31 31  #if($xcontext.isMainWiki() && $xwiki.exists($userWikiSheet))
... ... @@ -75,13 +75,10 @@
75 75   (((
76 76   #if($request.xpage == 'edituser')
77 77   {{html clean="false"}}
78 - #resizedUserAvatar($doc.fullName 180)
71 + #resizedUserAvatar($doc.fullName 170)
79 79   {{/html}}
80 80   #else
81 - ## By specifying the image width we enable server side resizing. The width value we use is greater than the
82 - ## available space because we don't want to loose too much of the image quality (we rely on the browser to fit the
83 - ## image in the available space).
84 - {{attachmentSelector classname="XWiki.XWikiUsers" object="$obj.number" property="avatar" #if ($isMyProfile) savemode="direct" #end defaultValue="XWiki.XWikiUserSheet@noavatar.png" width="180" alternateText="$xwiki.getUserName($doc.fullName, false)" buttontext="$services.localization.render('platform.core.profile.changePhoto')" displayImage="true" filter="png,jpg,jpeg,gif"/}}
74 + {{attachmentSelector classname="XWiki.XWikiUsers" object="$obj.number" property="avatar" #if ($isMyProfile) savemode="direct" #end defaultValue="XWiki.XWikiUserSheet@noavatar.png" width="120" alternateText="$xwiki.getUserName($doc.fullName, false)" buttontext="$services.localization.render('platform.core.profile.changePhoto')" displayImage="true" filter="png,jpg,gif"/}}
85 85   #end
86 86   )))
87 87   ##########
XWiki.JavaScriptExtension[0]
Code
... ... @@ -17,7 +17,6 @@
17 17   this.tabsContainer.select('.category-tab.current').each(function (activeTab) {
18 18   this.updateCategoryFields(activeTab.id);
19 19   document.fire('xwiki:profile:switchedCategory', {'category' : activeTab.id});
20 - document.fire('xwiki:dom:refresh');
21 21   }.bind(this));
22 22   this.handleCancelAction();
23 23  
... ... @@ -48,7 +48,6 @@
48 48   this.updateURL(tabName);
49 49   }
50 50   document.fire('xwiki:profile:switchedCategory', {'category' : tab});
51 - document.fire('xwiki:dom:refresh');
52 52   },
53 53  
54 54   updateCategoryFields : function (category) {