Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
fix page title for apps detail page (bug 738088)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvan committed Mar 22, 2012
1 parent a436ae4 commit 8bfe003
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions media/js/mkt/fragments.js
Expand Up @@ -21,6 +21,12 @@
$.get(href, function(d) {
clearTimeout(timeout);
z.page.html(d).trigger('fragmentloaded');

// We so sneaky.
var $title = z.page.find('title');
document.title = $title.text();
$title.remove();

_.delay(function() { $loading.removeClass('active'); }, 400);
$('html, body').animate({scrollTop: 0}, 200);
});
Expand Down
2 changes: 2 additions & 0 deletions mkt/detail/templates/detail/app.html
@@ -1,5 +1,7 @@
{% extends 'mkt/base.html' %}

{% block title %}{{ mkt_page_title(product.name) }}{% endblock %}

{% block content %}
<section class="product-details">
<div class="visual">
Expand Down
4 changes: 3 additions & 1 deletion mkt/templates/mkt/fragment.html
@@ -1,2 +1,4 @@
<title>{% block title %}{% endblock %}</title>

{% block content %}
{% endblock %}
{% endblock %}

1 comment on commit 8bfe003

@potch
Copy link
Contributor

@potch potch commented on 8bfe003 Mar 22, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brilliant!

Please sign in to comment.