Permalink
Browse files

First pass at badge improvements

  • Loading branch information...
1 parent 20eed50 commit 03ad9a619132637800a6710394b187f5aa0274cb @darkwing darkwing committed Mar 5, 2014
@@ -115,14 +115,7 @@ <h1 class="page-title"><span class="nickname">{{ profile.user.username }}</span>
{% if waffle.flag('badger') and award_list %}
<section id="profile-badges" class="profile-section">
- <header>
- <h2 class="count">{{_("Recent Badge Awards")}}
- <small>(
- <a href="{{ url('badger.views.awards_by_user', profile.user.username) }}">{{ _("More...") }}</a>
- <a href="{{ url('badger.feeds.awards_by_user', 'atom', profile.user.username) }}"><img src="{{MEDIA_URL}}/img/feed-icon-14x14.png" /></a>
- )</small>
- </h2>
- </header>
+ <h2>{{_("Recent Badge Awards")}}</h2>
{% include "badger/includes/awards_as_badges_list.html" %}
</section>
{% endif %}
View
@@ -368,7 +368,7 @@
/* @Gallery @Head *********/
.gallery-head { clear: both; position: relative; z-index: 11; }
.gallery-head:after { content: "."; display: block; clear: both; height: 0; visibility: hidden; }
-.gallery-head .count { font-size: 1.428em; float: left; }
+.gallery-head .count { float: left; }
.gallery-head .count .button { font-size: .636em; margin-left: 15px; position: relative; top: -2px; }
.gallery-head .sort { float: right; font-size: .786em; margin: .5em 0 0; }
.gallery-head .sort li { display: inline; padding: 0; margin: 0 0 0 20px; background: none; }
@@ -19,11 +19,4 @@
background-image: url(images/mozAutocompleteSpinner.gif) !important;
background-position: 97% 5px !important;
background-repeat: no-repeat !important;
-}
-
-/* dialog updates */
-.ui-dialog-titlebar {
- background: none !important;
- background-color: #000 !important;
- border-color: #999;
}
@@ -1,8 +1,32 @@
(function ($) {
- $('#recent_badge_awards .close').on('click', function() {
- $('#recent_badge_awards').hide();
- });
+ // Show the dialog immediately if the new badge is present!
+ (function() {
+ var $badgesTray = $('#badges-tray');
+ var showFn = function() {
+ $badgesTray.removeClass('show');
+ };
+ var timeout;
+ var delay = 5000;
+
+ if($badgesTray.length) {
+ $badgesTray.addClass('show');
+ timeout = setTimeout(showFn, delay);
+ }
+
+ $badgesTray
+ .on('mouseenter', function() {
+ clearTimeout(timeout);
+ })
+ .on('mouseleave', function() {
+ setTimeout(showFn, delay / 2);
+ })
+ .on('transitionend webkitTransitionEnd', function(a, b, c) {
+ if(!parseInt($badgesTray.css('opacity'), 10)) {
+ $badgesTray.addClass('hidden');
+ }
+ });
+ })();
$('form.obi_issuer button.issue').on('click', function() {
// Grab the hosted assertion URL from the header link.
@@ -22,4 +46,4 @@
return false;
});
-})(jQuery);
+})(jQuery);
@@ -294,4 +294,4 @@
});
};
-})(jQuery);
+})(jQuery);
Oops, something went wrong.

0 comments on commit 03ad9a6

Please sign in to comment.