diff --git a/common/static/js/utils/rwd_header.js b/common/static/js/utils/rwd_header.js index 616f176268..d2137fd9bc 100644 --- a/common/static/js/utils/rwd_header.js +++ b/common/static/js/utils/rwd_header.js @@ -10,9 +10,6 @@ var _fn = { header: 'header.global-new', - // TODO (ECOM-1339): Remove this once the V3 footer is enabled permanently - footer: '.edx-footer-new', - resultsUrl: 'course-search', init: function() { @@ -30,7 +27,6 @@ classes: function() { // Add any RWD-specific classes _fn.$header.addClass('rwd'); - _fn.$footer.addClass('rwd'); // TODO (ECOM-1339): remove once the V3 footer is enabled permanently }, elements: function() { diff --git a/lms/djangoapps/branding/api.py b/lms/djangoapps/branding/api.py index b040774678..e964580c8f 100644 --- a/lms/djangoapps/branding/api.py +++ b/lms/djangoapps/branding/api.py @@ -29,13 +29,6 @@ log = logging.getLogger("edx.footer") def is_enabled(): """Check whether the branding API is enabled. """ - # TODO (ECOM-1339): Remove this comment - # Currently, the branding API configuration controls two things: - # 1) whether we're using the new version of the footer - # 2) whether we're exposing footer information through the API. - # - # Once we've enabled the new footer, the feature flag will control - # only (2), but not (1). return BrandingApiConfig.current().enabled diff --git a/lms/djangoapps/branding/context_processors.py b/lms/djangoapps/branding/context_processors.py deleted file mode 100644 index 3aa688381d..0000000000 --- a/lms/djangoapps/branding/context_processors.py +++ /dev/null @@ -1,10 +0,0 @@ -"""Context processors for Django templates. """ -from branding import api as branding_api - - -# TODO (ECOM-1339): Remove this module once we permanently enable the V3 footer. -def branding_context_processor(request): # pylint: disable=unused-argument - """Add the feature flag to Django template context. """ - return { - "ENABLE_BRANDING_API": branding_api.is_enabled() - } diff --git a/lms/djangoapps/courseware/tests/test_footer.py b/lms/djangoapps/courseware/tests/test_footer.py index 1300f562f4..b662349138 100644 --- a/lms/djangoapps/courseware/tests/test_footer.py +++ b/lms/djangoapps/courseware/tests/test_footer.py @@ -43,10 +43,7 @@ class TestFooter(TestCase): with patch.dict('django.conf.settings.FEATURES', {"IS_EDX_DOMAIN": True}): resp = self.client.get('/') self.assertEqual(resp.status_code, 200) - - # assert that footer template has been properly overridden on homepage - # test the top-level element class; which is less likely to change than copy. - self.assertContains(resp, 'edx-footer') + self.assertContains(resp, 'footer-edx-v3') def test_openedx_footer(self): """ @@ -56,10 +53,7 @@ class TestFooter(TestCase): with patch.dict('django.conf.settings.FEATURES', {"IS_EDX_DOMAIN": False}): resp = self.client.get('/') self.assertEqual(resp.status_code, 200) - - # assert that footer template has been properly overridden on homepage - # test the top-level element class; which is less likely to change than copy. - self.assertContains(resp, 'wrapper-footer') + self.assertContains(resp, 'footer-openedx') @patch.dict(settings.FEATURES, {'IS_EDX_DOMAIN': True}) @override_settings( diff --git a/lms/envs/common.py b/lms/envs/common.py index f7d0e5e571..ada3612a29 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -515,11 +515,6 @@ TEMPLATE_CONTEXT_PROCESSORS = ( # Allows the open edX footer to be leveraged in Django Templates. 'edxmako.shortcuts.open_source_footer_context_processor', - # TODO (ECOM-1339): Remove once the V3 version of the footer is enabled permanently - # This allows us to pass the appropriate feature flag to the main Django template - # that contains the footer. - 'branding.context_processors.branding_context_processor', - # Shoppingcart processor (detects if request.user has a cart) 'shoppingcart.context_processor.user_has_cart_context_processor', diff --git a/lms/static/sass/shared/_footer.scss b/lms/static/sass/shared/_footer.scss index 9590fc3e92..aac804bec2 100644 --- a/lms/static/sass/shared/_footer.scss +++ b/lms/static/sass/shared/_footer.scss @@ -285,231 +285,3 @@ $edx-footer-bg-color: rgb(252,252,252); } } } - -// TODO (ECOM-1339): Remove the "new" (v2) footer once the v3 footer -// is permanently enabled. -.edx-footer-new { - background: $edx-footer-bg-color; - - @media print { - @include padding(10px, 10px, 0, 10px); - } - - // NOTE: resetting older footer styles - can be removed once not needed - box-shadow: none; - padding: ($baseline*2) $baseline; - - // about - // -------------------- - .footer-about { - @extend %edx-footer-reset; - @extend %edx-footer-section; - width: flex-grid(6,12); - - @media print { - @include margin-right(0); - @include padding-right(0); - width: flex-grid(12,12); - border: none; - min-height: 0; - } - } - - .footer-about-title { - @extend %edx-footer-title; - @extend %ui-print-excluded; - } - - .footer-about-logo, .footer-about-openedx { - margin-bottom: $edx-footer-spacing; - - img { - height: 47px; - } - - a { - display: block; - - &:hover { - border-bottom: 0; - } - } - } - - .footer-about-logo { - @include float(left); - @extend %ui-print-excluded; - } - - .footer-about-openedx-logo { - @include float(right); - @media print { - @include float(left); - } - } - - .footer-about-copy { - @extend %t-copy-sub1; - @extend %ui-print-excluded; - margin-bottom: $edx-footer-spacing; - color: rgb(61, 62, 63); - clear: both; - - p { - // NOTE: needed for poor LMS span styling - color: inherit; - } - } - - .footer-about-copyright { - @extend %t-copy-sub1; - margin-bottom: $edx-footer-spacing; - color: rgb(138, 140, 143); - - p { - // NOTE: needed for poor LMS span styling - color: inherit; - } - - a { - @extend %edx-footer-link; - display: inline-block; - margin-bottom: ($edx-footer-spacing/2); - } - - @media print { - margin-bottom: 0; - } - } - - .footer-about-links { - @extend %ui-print-excluded; - - a { - @extend %edx-footer-link; - margin-bottom: ($edx-footer-spacing/2); - } - - .note { - color: rgb(138, 140, 143); - } - } - - // nav (learn more links) - // -------------------- - .footer-nav { - @extend %edx-footer-reset; - @extend %edx-footer-section; - @extend %ui-print-excluded; - width: flex-grid(3,12); - } - - .footer-nav-title { - @extend %edx-footer-title; - margin-top: $baseline; - } - - .footer-nav-links { - margin-bottom: ($edx-footer-spacing*2.25); - - a { - @extend %edx-footer-link; - } - } - - // follow (social media) - // -------------------- - .footer-follow { - @extend %edx-footer-reset; - @extend %edx-footer-section; - @extend %ui-print-excluded; - width: flex-grid(3,12); - } - - .footer-follow-title { - @extend %edx-footer-title; - margin-top: $baseline; - } - - .footer-follow-links { - - a { - @extend %edx-footer-link; - margin-top: $baseline; - - .icon, .copy { - display: inline-block; - vertical-align: middle; - } - - .icon { - @extend %t-icon3; - margin-right: ($baseline/4); - text-align: center; - min-width: ($baseline*1.5); - } - - .copy { - // NOTE: needed for poor LMS span styling - color: inherit; - } - } - } - - &.rwd { - @include box-sizing(border-box); - @include outer-container; - - &.wrapper-footer footer { - min-width: 0; - } - - .footer-about, - .footer-nav, - .footer-follow { - @include span-columns(12); - } - - @include media( $edx-bp-medium ) { - } - - @include media( $edx-bp-large ) { - .footer-about { - @include span-columns(6); - } - - .footer-nav, - .footer-follow { - @include span-columns(3); - } - } - } - - // App links - // -------------------- - .footer-mobile-apps { - padding-top: 20px; - - .mobile-app-wrapper { - margin: 0 0 10px 0; - } - - a { - display: inline-block; - - &:hover { - border: none; - } - } - - .app-store { - height: auto; - width: 129px; - } - - .google-play { - height: auto; - width: 129px; - } - } -} diff --git a/lms/templates/footer-edx-v2.html b/lms/templates/footer-edx-v2.html deleted file mode 100644 index 2a611519cb..0000000000 --- a/lms/templates/footer-edx-v2.html +++ /dev/null @@ -1,120 +0,0 @@ -## mako -## TODO (ECOM-1339): Delete this template once the V3 footer is enabled -<%namespace name='static' file='static_content.html'/> -<%! -from django.core.urlresolvers import reverse -from django.utils.translation import ugettext as _ -%> -## WARNING: These files are specific to edx.org and are not used in installations outside of that domain. Open edX users will want to use the file "footer.html" for any changes or overrides. - - - - diff --git a/lms/templates/main.html b/lms/templates/main.html index bd1f5239b6..d61516acd3 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -149,12 +149,7 @@ from branding import api as branding_api % if theme_enabled() and not is_microsite(): <%include file="theme-footer.html" /> % elif settings.FEATURES.get('IS_EDX_DOMAIN', False) and not is_microsite(): - ## TODO (ECOM-1339): Remove this check to permanently enable the V3 footer. - % if branding_api.is_enabled(): <%include file="footer-edx-v3.html" /> - % else: - <%include file="footer-edx-v2.html" /> - % endif % else: <%include file="${microsite.get_template_path('footer.html')}" /> % endif diff --git a/lms/templates/main_django.html b/lms/templates/main_django.html index 5f660c8005..6c79a09b31 100644 --- a/lms/templates/main_django.html +++ b/lms/templates/main_django.html @@ -42,12 +42,7 @@ {% if IS_REQUEST_IN_MICROSITE %} {# For now we don't support overriden Django templates in microsites. Leave footer blank for now which is better than saying Edx.#} {% elif IS_EDX_DOMAIN %} - {# TODO (ECOM-1339): Remove this check once we switch to the v3 footer permanently. #} - {% if ENABLE_BRANDING_API %} - {% include "footer-edx-v3.html" %} - {% else %} - {% include "footer-edx-v2.html" %} - {% endif %} + {% include "footer-edx-v3.html" %} {% else %} {% include "footer.html" %} {% endif %}