Changes for page Profile of XWikiUserSheet

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

From 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]
To version 3.1
edited by Thomas Mortagne
on 2014/09/29 12:41
Change comment: Install extension [org.xwiki.platform:xwiki-platform-user-profile-ui-6.2]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.ludovic
1 +xwiki:XWiki.ThomasMortagne
XWiki.JavaScriptExtension[0]
Code
... ... @@ -11,7 +11,7 @@
11 11   this.tabsContainer.select('.category-tab').each(function (tabElement) {
12 12   tabElement.observe('click', function(event) {
13 13   Event.stop(event);
14 - this.switchTab(tabElement.id, true);
14 + this.switchTab(tabElement.id);
15 15   }.bindAsEventListener(this));
16 16   }.bind(this));
17 17   this.tabsContainer.select('.category-tab.current').each(function (activeTab) {
... ... @@ -19,20 +19,9 @@
19 19   document.fire('xwiki:profile:switchedCategory', {'category' : activeTab.id});
20 20   }.bind(this));
21 21   this.handleCancelAction();
22 -
23 - // History navigation through our pushed states.
24 - window.addEventListener('popstate', function(event) {
25 - if (event.state && event.state.category) {
26 - this.switchTab('vertical-menu-' + event.state.category);
27 - }
28 - }.bindAsEventListener(this));
29 - // Store the initial history state so we can go back.
30 - history.replaceState({
31 - category: window.location.search.toQueryParams().category || 'profile'
32 - }, document.title, document.location.href);
33 33   },
34 34  
35 - switchTab : function(tab, pushHistory) {
24 + switchTab : function(tab) {
36 36   var tabName = tab.substring(14); // 14 = len('vertical-menu-')
37 37   $("user-page-content").select("div.user-page-pane").each(function(pane){
38 38   pane.addClassName('hidden');
... ... @@ -43,9 +43,6 @@
43 43   });
44 44   $(tab).addClassName('current');
45 45   this.updateCategoryFields(tab);
46 - if (pushHistory) {
47 - this.updateURL(tabName);
48 - }
49 49   document.fire('xwiki:profile:switchedCategory', {'category' : tab});
50 50   },
51 51  
... ... @@ -57,17 +57,6 @@
57 57   this.updateField('category', category);
58 58   },
59 59  
60 - updateURL : function (category) {
61 - if (history.pushState) {
62 - var params = window.location.search.toQueryParams();
63 - params.category = category;
64 - newQueryString = Object.toQueryString(params);
65 -
66 - var newURL = window.location.protocol + '//' + window.location.host + window.location.pathname + '?' + newQueryString;
67 - window.history.pushState({category : category}, '', newURL);
68 - }
69 - },
70 -
71 71   updateField : function (fieldName, value) {
72 72   var element = $$('input[name=' + fieldName + ']');
73 73   if (element && element.size() > 0) {
XWiki.StyleSheetExtension[0]
Code
... ... @@ -6,10 +6,6 @@
6 6   width: 13em;
7 7  }
8 8  
9 -#avatar p {
10 - text-align: center;
11 -}
12 -
13 13  #avatar img {
14 14   border: 1px solid $theme.borderColor;
15 15   border-radius: 5px 5px 5px 5px;