Index: trunk/extensions/SocialProfile/SocialProfile.php |
— | — | @@ -19,6 +19,7 @@ |
20 | 20 | $wgExtensionMessagesFiles['SocialProfileUserProfile'] = $dir . 'UserProfile/UserProfile.i18n.php'; |
21 | 21 | $wgExtensionMessagesFiles['SocialProfileUserRelationship'] = $dir . 'UserRelationship/UserRelationship.i18n.php'; |
22 | 22 | $wgExtensionMessagesFiles['SocialProfileUserStats'] = $dir . 'UserStats/UserStats.i18n.php'; |
| 23 | +$wgExtensionMessagesFiles['SocialProfileUserStatus'] = $dir . 'UserStatus/UserStatus.i18n.php'; |
23 | 24 | |
24 | 25 | $wgExtensionAliasesFiles['SocialProfile'] = $dir . 'SocialProfile.alias.php'; |
25 | 26 | |
— | — | @@ -94,7 +95,7 @@ |
95 | 96 | $wgFriendingEnabled = true; |
96 | 97 | |
97 | 98 | // Should we enable UserStatus feature (currently is under development) |
98 | | -$wgEnableUserStatus = true; |
| 99 | +$wgEnableUserStatus = false; |
99 | 100 | |
100 | 101 | // Extension credits that show up on Special:Version |
101 | 102 | $wgExtensionCredits['other'][] = array( |
Index: trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php |
— | — | @@ -12,19 +12,28 @@ |
13 | 13 | * @author Yevhenii Vlasenko |
14 | 14 | */ |
15 | 15 | $messages['en'] = array( |
16 | | - 'edit' => "Edit", |
| 16 | + 'userstatus-edit' => "Edit", |
| 17 | + 'userstatus-save' => "Save", |
| 18 | + 'userstatus-cancel' => "Cancel", |
| 19 | + 'userstatus-history' => "Hisory", |
17 | 20 | ); |
18 | 21 | |
19 | 22 | /** Russian (Русский) |
20 | 23 | * @author Yevhenii Vlasenko |
21 | 24 | */ |
22 | 25 | $messages['ru'] = array( |
23 | | - 'edit' => 'Изменить', |
| 26 | + 'userstatus-edit' => 'Изменить', |
| 27 | + 'userstatus-save' => "Сохранить", |
| 28 | + 'userstatus-cancel' => "Отмена", |
| 29 | + 'userstatus-history' => "История", |
24 | 30 | ); |
25 | 31 | |
26 | 32 | /** Ukrainian (Українська) |
27 | 33 | * @author Yevhenii Vlasenko |
28 | 34 | */ |
29 | 35 | $messages['uk'] = array( |
30 | | - 'edit' => 'Редагувати', |
| 36 | + 'userstatus-edit' => 'Редагувати', |
| 37 | + 'userstatus-save' => "Зберегти", |
| 38 | + 'userstatus-cancel' => "Відмінити", |
| 39 | + 'userstatus-history' => "Історія", |
31 | 40 | ); |
\ No newline at end of file |
Index: trunk/extensions/SocialProfile/UserStatus/UserStatus.js |
— | — | @@ -1,10 +1,10 @@ |
2 | 2 | var UserStatus = { |
3 | | - historyOpened : false, |
| 3 | + historyOpened : false, |
4 | 4 | |
5 | | - toShowMode: function( status, id ) { |
| 5 | + toShowMode: function( status, id ) { |
6 | 6 | document.getElementById( 'user-status-block' ).innerHTML = status; |
7 | 7 | document.getElementById( 'user-status-block' ).innerHTML += ' <a href="javascript:UserStatus.toEditMode(\'' + status + '\',' + id + ');">Edit</a>'; |
8 | | - }, |
| 8 | + }, |
9 | 9 | |
10 | 10 | toEditMode: function( status, id ) { |
11 | 11 | var editbar = '<input id="user-status-input" type="text" value="' + status + '">'; |
— | — | @@ -12,32 +12,33 @@ |
13 | 13 | editbar += ' <a href="javascript:UserStatus.useHistory(' + id + ');">History</a>'; |
14 | 14 | editbar += ' <a href="javascript:UserStatus.toShowMode(\'' + status + '\',' + id + ');">Cancel</a>'; |
15 | 15 | document.getElementById( 'user-status-block' ).innerHTML = editbar; |
16 | | - }, |
| 16 | + }, |
17 | 17 | |
18 | 18 | saveStatus: function( id ) { |
19 | 19 | var div = document.getElementById( 'user-status-block' ); |
20 | 20 | var ustext = document.getElementById( 'user-status-input' ).value; |
21 | 21 | sajax_do_call( 'wfSaveStatus', [id, ustext], div ); |
22 | | - }, |
| 22 | + }, |
23 | 23 | |
24 | 24 | useHistory: function( id ){ |
25 | | - if (this.historyOpened) |
| 25 | + if (this.historyOpened) { |
26 | 26 | this.closeStatusHistory(); |
27 | | - else |
28 | | - this.openStatusHistory(id); |
| 27 | + } else { |
| 28 | + this.openStatusHistory(id); |
| 29 | + } |
29 | 30 | }, |
30 | 31 | |
31 | | - openStatusHistory: function( id ) { |
| 32 | + openStatusHistory: function( id ) { |
32 | 33 | var historyBlock = document.getElementById('status-history-block'); |
33 | | - if(historyBlock==null) { |
| 34 | + if(historyBlock===null) { |
34 | 35 | var statusBlock = document.getElementById('user-status-block'); |
35 | | - var historyBlock = document.createElement('div'); |
| 36 | + historyBlock = document.createElement('div'); |
36 | 37 | historyBlock.id = 'status-history-block'; |
37 | 38 | statusBlock.appendChild(historyBlock); |
38 | 39 | } |
39 | | - this.historyOpened = true; |
40 | | - sajax_do_call( 'wfGetHistory', [id], historyBlock ); |
41 | | - }, |
| 40 | + this.historyOpened = true; |
| 41 | + sajax_do_call( 'wfGetHistory', [id], historyBlock ); |
| 42 | + }, |
42 | 43 | |
43 | 44 | closeStatusHistory: function() { |
44 | 45 | var hBlock = document.getElementById('status-history-block'); |
— | — | @@ -45,8 +46,7 @@ |
46 | 47 | this.historyOpened = false; |
47 | 48 | }, |
48 | 49 | |
49 | | - fromHistoryToStatus: function( str ) |
50 | | - { |
| 50 | + fromHistoryToStatus: function( str ) { |
51 | 51 | document.getElementById('user-status-input').value = str; |
52 | 52 | } |
53 | | -} |
\ No newline at end of file |
| 53 | +}; |
\ No newline at end of file |
Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php |
— | — | @@ -1508,7 +1508,7 @@ |
1509 | 1509 | |
1510 | 1510 | // Only owners of the page can change statuses |
1511 | 1511 | if ( $wgUser->getId() == $userId || $userId == 0 ) { |
1512 | | - $us = "<script>toShowMode('$buf','$userId');</script>"; |
| 1512 | + $us = "<script>UserStatus.toShowMode('$buf','$userId');</script>"; |
1513 | 1513 | } else { |
1514 | 1514 | $us = $buf; |
1515 | 1515 | } |