From 56015fecf32721b9df37345d44bade65ddbce45a Mon Sep 17 00:00:00 2001 From: asadiqbal Date: Tue, 14 Jul 2015 13:14:00 +0500 Subject: [PATCH] asadiqbal08/SOL-1046: Convert LinkedIn anchor tag to button * remove the onclick event * add mako check to Javascript handler --- common/test/acceptance/pages/lms/certificate_page.py | 2 +- lms/templates/certificates/_accomplishment-banner.html | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/test/acceptance/pages/lms/certificate_page.py b/common/test/acceptance/pages/lms/certificate_page.py index e2a161caa8..6b6781bd0c 100644 --- a/common/test/acceptance/pages/lms/certificate_page.py +++ b/common/test/acceptance/pages/lms/certificate_page.py @@ -49,7 +49,7 @@ class CertificatePage(PageObject): """ returns add to LinkedIn profile button """ - return self.q(css='a.action-linkedin-profile') + return self.q(css='button.action-linkedin-profile') @property def add_to_facebook_profile_button(self): diff --git a/lms/templates/certificates/_accomplishment-banner.html b/lms/templates/certificates/_accomplishment-banner.html index da133f34b2..5f643754f5 100644 --- a/lms/templates/certificates/_accomplishment-banner.html +++ b/lms/templates/certificates/_accomplishment-banner.html @@ -30,6 +30,9 @@ from django.core.urlresolvers import reverse social_network: 'LinkedIn' }; Logger.log('edx.certificate.shared', data); + % if linked_in_url: + window.open('${linked_in_url}'); + % endif }); }); @@ -85,10 +88,10 @@ from django.core.urlresolvers import reverse %endif %if linked_in_url: - + %endif %if badge: