Jack Phoenix has uploaded a new change for review.
https://gerrit.wikimedia.org/r/278209
Change subject: [WIP] for testing on Labs, do not merge etc.
......................................................................
[WIP] for testing on Labs, do not merge etc.
Change-Id: I5d4da706c80a75943afc16c9254b21c101e04399
---
M UserProfile/UserProfile.php
M UserProfile/UserProfilePage.js
M UserProfile/UserProfilePage.php
M UserProfile/i18n/en.json
4 files changed, 27 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile
refs/changes/09/278209/1
diff --git a/UserProfile/UserProfile.php b/UserProfile/UserProfile.php
index baf00d8..8020011 100644
--- a/UserProfile/UserProfile.php
+++ b/UserProfile/UserProfile.php
@@ -77,6 +77,7 @@
$wgResourceModules['ext.socialprofile.userprofile.js'] = array(
'scripts' => 'UserProfilePage.js',
+ 'messages' => array( 'user-profile-userpage-slider-title-less',
'user-profile-userpage-slider-title-more' ),
'localBasePath' => __DIR__,
'remoteExtPath' => 'SocialProfile/UserProfile',
);
diff --git a/UserProfile/UserProfilePage.js b/UserProfile/UserProfilePage.js
index 8c7d86f..6350e03 100644
--- a/UserProfile/UserProfilePage.js
+++ b/UserProfile/UserProfilePage.js
@@ -126,14 +126,26 @@
}
};
-jQuery( document ).ready( function() {
+$( function() {
// "Send message" button on (other users') profile pages
- jQuery( 'div.user-page-message-box-button input[type="button"]' ).on(
'click', function() {
+ $( 'div.user-page-message-box-button input[type="button"]' ).on(
'click', function() {
UserProfilePage.sendMessage();
} );
// Board messages' "Delete" link
- jQuery( 'span.user-board-red a' ).on( 'click', function() {
- UserProfilePage.deleteMessage( jQuery( this ).data(
'message-id' ) );
+ $( 'span.user-board-red a' ).on( 'click', function() {
+ UserProfilePage.deleteMessage( $( this ).data( 'message-id' ) );
+ } );
+
+ $( '#profile-absolute-button' ).on( 'click', function() {
+ if ( $( '#profile-bottom' ).is( ':hidden' ) ) {
+ $( '#social-profile-user-info-wrapper #profile-bottom'
).slideDown();
+ $( this ).html( mw.msg(
'user-profile-userpage-slider-title-more' ) );
+ $( this ).css( 'background-position', 'right 0' );
+ } else {
+ $( '#social-profile-user-info-wrapper #profile-bottom'
).slideUp();
+ $( this ).html( mw.msg(
'user-profile-userpage-slider-title-less' ) );
+ $( this ).css( 'background-position', 'right -35px' );
+ }
} );
} );
diff --git a/UserProfile/UserProfilePage.php b/UserProfile/UserProfilePage.php
index 1a1bac2..d5ba31a 100644
--- a/UserProfile/UserProfilePage.php
+++ b/UserProfile/UserProfilePage.php
@@ -87,6 +87,10 @@
return '';
}
+ $wgOut->addHTML( '<div id="social-profile-user-info-wrapper">'
);
+
+ $wgOut->addHTML( '<div id="profile-absolute-button">' .
wfMessage( 'user-profile-userpage-slider-title-more' )->plain() . '</div>' );
+
$wgOut->addHTML( '<div id="profile-top">' );
$wgOut->addHTML( $this->getProfileTop( $this->user_id,
$this->user_name ) );
$wgOut->addHTML( '<div class="visualClear"></div></div>' );
@@ -102,6 +106,8 @@
parent::view();
return '';
}
+
+ $wgOut->addHTML( '<div id="profile-bottom">' );
// Left side
$wgOut->addHTML( '<div id="user-page-left" class="clearfix">' );
@@ -148,6 +154,8 @@
}
$wgOut->addHTML( '</div><div class="visualClear"></div>' );
+ $wgOut->addHTML( '</div>' ); // closes div#profile-bottom
+ $wgOut->addHTML( '</div>' ); // closes
div#social-profile-user-info-wrapper
}
function getUserStatsRow( $label, $value ) {
diff --git a/UserProfile/i18n/en.json b/UserProfile/i18n/en.json
index 7e989da..36a36d6 100644
--- a/UserProfile/i18n/en.json
+++ b/UserProfile/i18n/en.json
@@ -185,6 +185,8 @@
"user-profile-privacy-status-privacy-hidden": "hidden",
"user-profile-privacy-status-privacy-friends": "friends",
"user-profile-privacy-status-privacy-foaf": "friends of friends",
+ "user-profile-userpage-slider-title-more": "More...",
+ "user-profile-userpage-slider-title-less": "Less",
"user-no-images": "No images uploaded",
"edit-profile-title": "Edit your profile",
"edit-profiles-title": "Edit profiles",
--
To view, visit https://gerrit.wikimedia.org/r/278209
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d4da706c80a75943afc16c9254b21c101e04399
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits