Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace condition html tags with a CSS hack for IE6 (Bug 740917) #51

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/coding.rst
Expand Up @@ -39,17 +39,17 @@ in the footer (most do), make sure to handle this in your view.
Bedrock comes with a function for doing this automatically:: Bedrock comes with a function for doing this automatically::


from mozorg.util import handle_newsletter from mozorg.util import handle_newsletter
from session_csrf import anonymous_csrf from django.views.decorators.csrf import csrf_exempt


@anonymous_csrf @csrf_exempt
def view(request): def view(request):
ctx = handle_newsletter(request) ctx = handle_newsletter(request)
return l10n_utils.render(request, 'app/template.html', ctx) return l10n_utils.render(request, 'app/template.html', ctx)


You'll notice a few other things in there. You should use the You'll notice a few other things in there. You should use the
`l10n_utils.render` function to render templates because it handles `l10n_utils.render` function to render templates because it handles
special l10n work for us. Since we're handling the newsletter form special l10n work for us. Since we're handling the newsletter form
post, you also need the `anonymous_csrf` decorator. post, you also need the `csrf_exempt` decorator.


Make sure to namespace your templates by putting them in a directory Make sure to namespace your templates by putting them in a directory
named after your app, so instead of templates/template.html they would named after your app, so instead of templates/template.html they would
Expand Down
5 changes: 1 addition & 4 deletions media/css/sandstone/buttons.less
Expand Up @@ -164,17 +164,14 @@
.download-content { .download-content {
.inline-block; .inline-block;
margin-left: -25px; margin-left: -25px;
_margin-left:0;
background-image: url(/media/img/sandstone/buttons/firefox-small.png); background-image: url(/media/img/sandstone/buttons/firefox-small.png);
height: 52px; height: 52px;
padding: 0 20px 0 65px; padding: 0 20px 0 65px;
overflow: visible; overflow: visible;
} }
} }


.lt-ie7 .download-button-small .download-link .download-content {
margin-left: 0;
}



// OS detection // OS detection


Expand Down
5 changes: 1 addition & 4 deletions templates/base.html
@@ -1,8 +1,5 @@
<!doctype html> <!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <html class="no-js" lang="{{ LANG }}" dir="{{ DIR }}">
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="{{ LANG }}" dir="{{ DIR }}"> <!--<![endif]-->
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">


Expand Down