Modifications pour le document Profil de XWikiUserSheet

Modifié par superadmin le 2026/01/29 15:29

Depuis la version 1.1
modifié par superadmin
sur 2026/01/29 15:25
Commentaire de modification : Install extension [org.xwiki.platform:xwiki-platform-user-profile-ui/17.10.2]
À la version 2.1
modifié par superadmin
sur 2026/01/29 15:29
Commentaire de modification : Imported from XAR

Résumé

Détails

Propriétés de la Page
Contenu
... ... @@ -65,7 +65,8 @@
65 65   ## By specifying the image width we enable server side resizing. The width value we use is greater than the
66 66   ## available space because we don't want to loose too much of the image quality (we rely on the browser to fit the
67 67   ## image in the available space).
68 - {{attachmentSelector classname="XWiki.XWikiUsers" object="$obj.number" property="avatar" #if ($hasEdit) 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"/}}
68 + #set($isMyProfile = ($services.model.resolveDocument($xcontext.user) == $doc.documentReference))
69 + {{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"/}}
69 69   #end
70 70   )))
71 71   ##########
XWiki.JavaScriptExtension[0]
Code
... ... @@ -72,7 +72,7 @@
72 72  
73 73   updateField : function (fieldName, value) {
74 74   var element = $$('input[name=' + fieldName + ']');
75 - if (element && element.length) {
75 + if (element && element.size() > 0) {
76 76   element[0].value = value;
77 77   }
78 78   },
... ... @@ -79,7 +79,7 @@
79 79  
80 80   handleCancelAction : function() {
81 81   var elements = $$('form .buttons input[type=submit][name=action_cancel]');
82 - if (elements && elements.length) {
82 + if (elements && elements.size() > 0) {
83 83   var button = elements[0];
84 84   Event.stopObserving(button, 'click');
85 85   button.observe('click', function(event){
XWiki.StyleSheetExtension[0]
Code
... ... @@ -1,58 +1,50 @@
1 1  #template("colorThemeInit.vm")
2 2  #set($tabswidth = "130px")
3 3  /* ----- User menu ----- */
4 -#user-menu-col {
4 +#user-menu-col{
5 5   float: left;
6 6   width: 13em;
7 7  }
8 8  
9 -#avatar {
9 +#avatar p {
10 + text-align: center;
11 +}
10 10  
11 - p {
12 - text-align: center;
13 - }
14 -
15 - img {
16 - border-top: @border-width solid @list-group-border;
17 - border-left: @border-width solid @list-group-border;
18 - border-right: @border-width solid @list-group-border;
19 - border-bottom: 0;
20 - border-radius: @border-radius-base @border-radius-base 0 0;
21 - margin: 0 auto;
22 - }
23 -
24 - .attachment-picker {
25 - border-radius: @border-radius-base;
26 - padding: @border-width;
27 - }
13 +#avatar img {
14 + border: 1px solid $theme.borderColor;
15 + border-radius: 5px 5px 5px 5px;
16 + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
17 + margin: 0 auto;
18 + padding: 0.3em;
19 + width: 95%;
28 28  }
29 29  
30 -.profile-menu .category-tab:before {
22 +.profile-menu .category-tab:before{
31 31   float: left;
32 32   margin: 5px 0 0 5px;
33 33  }
34 34  
35 -.profile-menu .user-menu-profile:before {
27 +.profile-menu .user-menu-profile:before{
36 36   content: url("$xwiki.getSkinFile('icons/silk/vcard.png')");
37 37  }
38 38  
39 -.profile-menu .user-menu-preferences:before {
31 +.profile-menu .user-menu-preferences:before{
40 40   content: url("$xwiki.getSkinFile('icons/silk/wrench.png')");
41 41  }
42 42  
43 -.profile-menu .user-menu-watchlist:before {
35 +.profile-menu .user-menu-watchlist:before{
44 44   content: url("$xwiki.getSkinFile('icons/silk/star.png')");
45 45  }
46 46  
47 -.profile-menu .user-menu-network:before {
39 +.profile-menu .user-menu-network:before{
48 48   content: url("$xwiki.getSkinFile('icons/silk/group.png')");
49 49  }
50 50  
51 -.profile-menu .user-menu-dashboard:before {
43 +.profile-menu .user-menu-dashboard:before{
52 52   content: url("$xwiki.getSkinFile('icons/silk/application_view_tile.png')");
53 53  }
54 54  
55 -.profile-menu .user-menu-wikis:before {
47 +.profile-menu .user-menu-wikis:before{
56 56   content: url("$xwiki.getSkinFile('icons/silk/chart_organisation.png')");
57 57  }
58 58  
... ... @@ -71,22 +71,22 @@
71 71   background-position: 7px 50%,top center;
72 72  }
73 73  
74 -.user-menu-title a:hover {
66 +.user-menu-title a:hover{
75 75   color: $theme.panelHeaderTextColor !important;
76 76  }
77 77  
78 78  /* ----- Page content ---- */
79 -#user-page-content {
71 +#user-page-content{
80 80   margin-left: 14em;
81 81  }
82 82  
83 -.column h1, .column h2 {
84 - font-weight: bold;
85 - font-size: 115%;
86 - margin: 10px 0;
75 +.column h1 {
76 + font-weight:bold;
77 + font-size:115%;
78 + margin:10px 0;
87 87  }
88 88  
89 -.column h3 {
81 +.column h2 {
90 90   font-size: 110%;
91 91  }
92 92  
... ... @@ -104,7 +104,7 @@
104 104  
105 105  /* ----- Profile ----- */
106 106  td.recentChangesLeft, .recentChangesMoreActions {
107 - display: none;
99 + display:none;
108 108  }
109 109  
110 110  td.recentChangesRight {
... ... @@ -123,6 +123,10 @@
123 123   background-color: $theme.backgroundSecondaryColor;
124 124  }
125 125  
118 +.userInfo {
119 + -ms-word-break: break-all; /* IE8, IE9 */
120 +}
121 +
126 126  .userInfo a {
127 127   word-wrap: break-word;
128 128  }
... ... @@ -134,7 +134,6 @@
134 134  .userInfo h2 {
135 135   font-size: larger;
136 136   font-weight: bolder;
137 - margin-top: 10px;
138 138  }
139 139  
140 140  div.userInfo input[type="text"], div.userInfo input[type="password"], div.userInfo textarea, div.userInfo select, div.userPreferences select {
... ... @@ -142,9 +142,15 @@
142 142  }
143 143  
144 144  div.editProfileCategory {
145 - float: right;
140 + float:right;
146 146  }
147 147  
143 +div.editProfileCategory a {
144 + display:block;
145 + width: 16px;
146 + height: 16px;
147 + background: url("$xwiki.getSkinFile('icons/silk/pencil.png')") no-repeat;
148 +}
148 148  
149 149  /* Watchlist */
150 150  
... ... @@ -155,9 +155,9 @@
155 155  }
156 156  
157 157  span#avatarUpload {
158 - display: block;
159 - width: $tabswidth;
160 - position: absolute;
159 + display:block;
160 + width:$tabswidth;
161 + position:absolute;
161 161   font-size: 10px;
162 162   font-weight: bold;
163 163   background-color: white;
... ... @@ -172,72 +172,59 @@
172 172   margin: 0;
173 173   padding: 0;
174 174  }
175 -
176 176  #networkPane .following li {
177 177   padding: 2px 20px 2px 2px;
178 178  }
179 -
180 180  #networkPane .following li:hover {
181 181   background-color: $theme.highlightColor;
182 182  }
183 -
184 184  #networkPane .following img {
185 185   float: left;
186 186   margin-right: 5px;
187 187  }
188 -
189 189  #networkPane .following .user-info {
190 190   float: left;
191 191  }
192 -
193 193  #networkPane .following .user-id {
194 194   font-size: .8em;
195 195   font-weight: 900;
196 196  }
197 -
198 198  #networkPane .following .unfollow {
199 199   float: right;
200 200   margin-right: -16px;
201 201   padding: 0;
202 202  }
203 -
204 204  ## --------------------------------------
205 205  ## Picker style
206 -
207 -#user-menu-col .attachment-picker {
200 +.attachment-picker {
208 208   position: relative;
209 209   margin: auto;
210 210   width: 100%;
211 211  }
212 -
213 -#user-menu-col .attachment-picker p {
205 +.attachment-picker p {
214 214   padding: 0;
215 215   margin: 0;
216 216  }
217 217  
218 -#user-menu-col .attachment-picker .picture {
210 +.attachment-picker .picture {
219 219   z-index: -1;
220 220  }
221 -
222 -#user-menu-col .attachment-picker .buttonwrapper {
213 +.attachment-picker .buttonwrapper {
223 223   margin: 0;
224 224  }
225 225  
226 -#user-menu-col .attachment-picker {
227 - .buttonwrapper {
228 - .wikilink {
229 - display: flex;
230 - flex-flow: column;
231 - }
232 -
233 - a.button {
234 - .btn;
235 - .btn-default;
236 - border-radius: 0 0 @border-radius-base @border-radius-base;
237 - flex-grow: 1;
238 - margin: 0;
239 - }
240 - }
217 +.attachment-picker-start {
218 + background: url("$xwiki.getSkinFile('icons/silk/picture_edit.png')") no-repeat center center $theme.pageContentBackgroundColor !important;
219 + border: 0 none !important;
220 + border-bottom-left-radius: 8px;
221 + height: 18px;
222 + position: absolute;
223 + right: 0;
224 + text-align: left;
225 + text-indent: -9999px;
226 + top: 1px;
227 + width: 18px !important;
228 + z-index: 1;
241 241  }
242 242  
243 243  ## --------------------------------------
Content Type
... ... @@ -1,1 +1,0 @@
1 -LESS