do not show installed add-ons in disco promos (bug 643617)
This commit is contained in:
Родитель
90d92126b6
Коммит
62eb03a075
|
@ -13,7 +13,8 @@
|
|||
</hgroup>
|
||||
<ul class="addons">
|
||||
{% for addon in addons %}
|
||||
<li{% if addon.type == amo.ADDON_PERSONA %} class="persona-feature"{% endif %}>
|
||||
<li data-guid="{{ addon.guid }}"
|
||||
{% if addon.type == amo.ADDON_PERSONA %}class="persona-feature"{% endif %}>
|
||||
<a href="{{ services_url('discovery.addons.detail', addon.slug,
|
||||
src='discovery-promo') }}" target="_self">
|
||||
{% if addon.type == amo.ADDON_PERSONA %}
|
||||
|
|
|
@ -15,6 +15,8 @@ $(document).ready(function(){
|
|||
// Store the pane URL so we can link back from the add-on detail pages.
|
||||
z.discoStorage.set("url", location);
|
||||
|
||||
hideInstalled();
|
||||
|
||||
// Show "Starter Pack" panel only if user has fewer than three extensions.
|
||||
if (z.guids.length >= z.MIN_EXTENSIONS) {
|
||||
$("#starter").closest(".panel").remove();
|
||||
|
@ -67,7 +69,11 @@ function initSidebar() {
|
|||
}
|
||||
$("#right-module").replaceWith(data).slideDown("slow");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function hideInstalled() {
|
||||
// Do not show installed extensions in the promo modules or sidebar.
|
||||
$('li[data-guid]').each(function() {
|
||||
var $el = $(this),
|
||||
guid = $el.attr('data-guid');
|
||||
|
|
Загрузка…
Ссылка в новой задаче