Skip to content

Commit

Permalink
Bug 558208, whoa new popups
Browse files Browse the repository at this point in the history
  • Loading branch information
potch committed Sep 16, 2010
1 parent d47cb94 commit 0799c71
Show file tree
Hide file tree
Showing 15 changed files with 495 additions and 589 deletions.
24 changes: 12 additions & 12 deletions apps/addons/templates/addons/contribution.html
Expand Up @@ -64,11 +64,9 @@ <h3>{{ text }}</h3>
addon.suggested_amount|currencyfmt('USD')) }}</p>
{% endif %}
{% if show_help %}
<p>
<a class="toggle-help" href="#contribute-why">
<a id="contribute-more-info" href="#contribute-why">
{{ _("What's this?") }}{# msgctxt addons_display_a_license_what #}
</a>
</p>
{% endif %}
</div>{# /suggestion #}
</div>{# /aux #}
Expand Down Expand Up @@ -134,15 +132,17 @@ <h4 class="comment">
</div>{# /contribute-box #}
{% endif %}

<div id="contribute-why" class="toggle-info">
<p class="dropdown">

</div>{# /notification #}

<div class="hidden">
<div id="contribute-why" class="popup">
<p class="msg">
{% trans %}
Mozilla is committed to supporting a vibrant and healthy developer
ecosystem. Your optional contribution helps sustain further development
of this add-on.
Mozilla is committed to supporting a vibrant and healthy developer
ecosystem. Your optional contribution helps sustain further development
of this add-on.
{% endtrans %}
</p>
<a class="close" href="#">{{ _('close') }}</a>
</div>{# /why #}

</div>{# /notification #}
</div>
</div>
49 changes: 23 additions & 26 deletions apps/addons/templates/addons/includes/collection_add_widget.html
@@ -1,33 +1,30 @@
<div class="collection-add widget collection{{ ' condensed tooltip' if condensed else '' }}"
<a class="collection-add widget collection{{ ' condensed tooltip' if condensed else '' }}"
data-listurl="{{ url('collections.ajax_list') }}"
data-addurl="{{ url('collections.ajax_add') }}"
data-removeurl="{{ url('collections.ajax_remove') }}"
data-newurl="{{ url('collections.ajax_new') }}"
data-addonid="{{ addon.id }}"
title="{{ _('Add to collection') if condensed }}"
href="#"
>
{% if condensed %}
<a class="collection" href="#" title="{{ _('Add to collection') }}"><span></span></a>
{% else %}
<span><a class="collection" href="#" title="{{ _('Add to collection') }}">
{{ _('Add to collection') }}</a></span>
{% endif %}
<div class="popup-shim">
<div class="collection-add-dropdown popup{{ ' left' if condensed else '' }}">
{% if user.is_anonymous() %}
<div class="collection-add-login">
<p>{% trans %}
To create your own collections, you must have a Mozilla Add-ons account.
{% endtrans %}</p>
<p class="register-button">
<a class="button" href="{{ remora_url('users/register') }}">{{ _('Create an Add-ons Account') }}</a>
</p>
<p>
{% trans login=login_link() %}
or <a href="{{ login }}">log in to your current account</a>
{% endtrans %}
</p>
</div>
{% endif %}
</div>
{{ _('Add to collection') if not condensed }}
</a>
<div class="hidden">
<div class="collection-add-dropdown popup{{ ' left' if condensed else '' }}">
{% if user.is_anonymous() %}
<div class="collection-add-login">
<p>{% trans %}
To create your own collections, you must have a Mozilla Add-ons account.
{% endtrans %}</p>
<p class="register-button">
<a class="button" href="{{ remora_url('users/register') }}">{{ _('Create an Add-ons Account') }}</a>
</p>
<p>
{% trans login=login_link() %}
or <a href="{{ login }}">log in to your current account</a>
{% endtrans %}
</p>
</div>
{% endif %}
</div>
</div>
</div>
5 changes: 3 additions & 2 deletions apps/bandwagon/templates/bandwagon/collection_widgets.html
@@ -1,9 +1,10 @@
<div class="collection_widgets{{ ' condensed' if condensed }} widgets">
{% if request.user.is_authenticated() %}
{% set is_watching = c.id in request.amo_user.watching %}
{% set watch_msg = _('Stop Following') if is_watching else _('Follow this Collection') %}
<a title="{{ (_('Stop Following') if is_watching else _('Follow this Collection')) if condensed }}"
class="widget tooltip watch{{ ' watching' if is_watching }}"
href="{{ c.watch_url() }}"><span>{{ _('Stop Following') if is_watching else _('Follow this Collection') }}</span></a>
class="widget tooltip watch{{ ' watching' if is_watching }}{{ ' condensed' if condensed }}"
href="{{ c.watch_url() }}">{{ watch_msg if not condensed }}</a>
{% endif %}
{{ sharing_widget(c, show_email=False, condensed=condensed) }}
{% if request.user.is_authenticated() %}
Expand Down
13 changes: 5 additions & 8 deletions apps/bandwagon/templates/bandwagon/favorites_widget.html
@@ -1,16 +1,13 @@
{% set text = faved_text if is_favorite else unfaved_text %}
{% set title = _('Remove from favorites') if is_favorite else _('Add to favorites') %}
<div class="addon-favorite widget {{ faved_class }}{{ ' condensed tooltip' if condensed else '' }}"
<a class="favorite widget {{ faved_class }}{{ ' condensed tooltip' if condensed else '' }}"
data-addonid="{{ addon.id }}"
data-addurl="{{ add_url }}"
data-removeurl="{{ remove_url }}"
data-favedtext="{{ faved_text }}"
data-unfavedtext="{{ unfaved_text }}"
title="{{ title if condensed }}"
href="#"
>
{% if condensed %}
<span class="msg" title="{{ title }}">{{ text }}</span>
{% else %}
<span><a class="msg" href="#" title="{{ title }}">
{{ text }}</a></span>
{% endif %}
</div>
{{ text if not condensed }}
</a>
2 changes: 1 addition & 1 deletion apps/reviews/templates/reviews/report_review.html
@@ -1,5 +1,5 @@
<div class="hidden">
<div class="install-note review-reason">
<div class="popup review-reason">
<strong>{{ _('Please select a reason:') }}</strong>
<ul>
{% for flag, text in ReviewFlag.FLAGS %}
Expand Down
12 changes: 4 additions & 8 deletions apps/sharing/templates/sharing/sharing_widget.html
Expand Up @@ -7,13 +7,9 @@
{% endif %}
{% if listed %}
{% set email_class = ' no-email' if not (show_email and request.user.is_authenticated()) %}
<div class="share widget{{ ' condensed tooltip' if condensed }}"
<a class="share widget{{ ' condensed tooltip' if condensed }}{{ email_class }}"
data-share-counts="{{ counts|json }}"
data-base-url="{{ obj.share_url() }}?service=">
<a title="{{ sharemsg }}"
class="share" href="#">
<span>{{ sharemsg }}</span>
</a>
<div class="share-me popup-shim{{ ' left' if condensed }}{{ email_class }}"></div>
</div>
data-base-url="{{ obj.share_url() }}?service="
title="{{ sharemsg }}"
href="#">{{ sharemsg if not condensed }}</a>
{% endif %}
26 changes: 5 additions & 21 deletions media/css/main.css
Expand Up @@ -1519,6 +1519,11 @@ form.favorite {
color: #666666;
font-weight: bold;
}
.notification .suggestion {
margin: 0;
color: #666666;
font-weight: bold;
}
.notification .aux {
overflow: hidden;
width: 100%;
Expand Down Expand Up @@ -2454,35 +2459,15 @@ ol.pagination li a:active {
/* @group Share This */

#sharing-popup {
width: 280px;
left: -55px;
padding: 0;
}

.condensed #sharing-popup.left {
left: -194px;
}

.share-arrow {
background-image: url(../../img/amo2009/icons/pointer.gif) no-repeat 30px top;
padding-top: 7px;
display: none;
}

.secondary .share-frame {
position:absolute;
}

.share-frame {
background-color:#FFFFFF;
border: 1px solid #2E5186;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
overflow: hidden;
padding: 0;
}

#sharing-popup div.share-content {
-moz-border-radius:5px;
-webkit-border-radius:5px;
Expand Down Expand Up @@ -2765,7 +2750,6 @@ form.addon-feedback div.container {
-moz-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
padding: 0.1em 0 0.1em 0.25em;
overflow: hidden;
line-height: 2.5em;
}
.listing-header ul {
Expand Down

0 comments on commit 0799c71

Please sign in to comment.