web/ldtplatform/templates/registration/login.html
changeset 995 94f9d36371f6
parent 522 7d6630fd287e
child 997 947c8ad09bd6
--- a/web/ldtplatform/templates/registration/login.html	Fri Nov 23 15:02:45 2012 +0100
+++ b/web/ldtplatform/templates/registration/login.html	Wed Nov 28 12:27:08 2012 +0100
@@ -1,13 +1,29 @@
 {% extends "registration/base.html" %}
 {% load i18n %}
+{% load absstatic %}
+{% load static %}
+
 {% block js_declaration %}
-{{ block.super }}
+
+	<script type="text/javascript">
+		$(document).ready(function(){
+			$('.social_link').each(function(i){
+				{% if social_list %}
+					{% for backend_name in social_list %}
+						var coucou='ldt/img/logo_{{backend_name}}.png'
+						{% with "ldt/img/logo_"|add:backend_name|add:".png" as src_path %}
+							document.getElementById('{{backend_name}}_logo_id').src='{% absstatic src_path %}';
+						{% endwith %}
+					{% endfor %}
+				{% endif %}		
+			});
+		});
+	</script>
 {% endblock %}
-
 {% block css_import %}
 	{{ block.super }}
-	<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
-	<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
+	<link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}'/>
+	<link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' />
 {% endblock %}
 
 
@@ -40,10 +56,12 @@
             {% if social_list %}
             <p>{% trans "Or login with your external account" %}&nbsp;:</p>
             <ul>
-            {% for backend_name in social_list %}
-            <li><a href="{{ backend_name }}"><img src="{{LDT_MEDIA_PREFIX}}img/logo_{{backend_name}}.png" />&nbsp;{{ backend_name }}</a></li>
-            {% endfor %}
-            {% comment %}{{social_list|safe}}{% endcomment %}
+           {% for backend_name in social_list %}
+             
+       		<li><a href="{{ backend_name }}"><img class='social_link' id="{{backend_name}}_logo_id"/>&nbsp;{{ backend_name }}</a></li>
+           
+           {% endfor %}
+           {% comment %}{{social_list|safe}}{% endcomment %}
             </ul>
             {% endif %}
             </div>