From 50998ecb29d1943e1688494e8bd097803bb50e4d Mon Sep 17 00:00:00 2001 From: Ali Hassan Date: Wed, 22 Feb 2023 15:50:22 +0500 Subject: [PATCH 1/6] Adds changes to redirects --- home/static/js/global/admin.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/home/static/js/global/admin.js b/home/static/js/global/admin.js index 42134b889..f008ab64a 100644 --- a/home/static/js/global/admin.js +++ b/home/static/js/global/admin.js @@ -22,4 +22,16 @@ $(document).ready(function () { 'Giving a Group the EDIT permission will also allow them to download data for Polls, Surveys, and Quizzes ' + 'for the Pages they can access.') + if (window.location.pathname.indexOf('/admin/redirects/') === 0) { + if (window.location.pathname.indexOf('/admin/redirects/add/') === 0){ + $('#id_is_permanent').removeAttr('checked'); + } + $('#id_is_permanent').parent().next('p').html('Recommendation: Do not use permanent redirects if you are setting ' + + 'up a promotion, QR code, or similar. Use permanent redirects if you are permanently moving the location of ' + + 'content on your site.
Cons: If you change or even delete a permanent redirect after you create it, the ' + + 'users who already accessed it will still continue to behave as if the original redirect is in place. This is' + + 'because permanent redirects are normally stored by the user\'s browser until they delete their browser cache.' + + 'Your browser may also store the permanent redirect until you clear its cache.
Pros: Permanent redirects' + + 'ensure search engines forget the old page (the \'Redirect from\') and index the new page instead.'); + } }); From 15062cfb193ea3a2ab3e507cd99a4400ecfeaa87 Mon Sep 17 00:00:00 2001 From: Ali Hassan Date: Wed, 22 Feb 2023 15:59:48 +0500 Subject: [PATCH 2/6] Fixed minor formatting issue --- home/static/js/global/admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/static/js/global/admin.js b/home/static/js/global/admin.js index f008ab64a..9ab7a7da7 100644 --- a/home/static/js/global/admin.js +++ b/home/static/js/global/admin.js @@ -23,9 +23,9 @@ $(document).ready(function () { 'for the Pages they can access.') if (window.location.pathname.indexOf('/admin/redirects/') === 0) { - if (window.location.pathname.indexOf('/admin/redirects/add/') === 0){ + if (window.location.pathname.indexOf('/admin/redirects/add/') === 0){ $('#id_is_permanent').removeAttr('checked'); - } + } $('#id_is_permanent').parent().next('p').html('Recommendation: Do not use permanent redirects if you are setting ' + 'up a promotion, QR code, or similar. Use permanent redirects if you are permanently moving the location of ' + 'content on your site.
Cons: If you change or even delete a permanent redirect after you create it, the ' + From fc1cb86693505843b0d8573614f37396a65d95bf Mon Sep 17 00:00:00 2001 From: Ali Hassan Date: Wed, 22 Feb 2023 17:01:38 +0500 Subject: [PATCH 3/6] changed recommendation color --- home/static/js/global/admin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home/static/js/global/admin.js b/home/static/js/global/admin.js index 9ab7a7da7..553528389 100644 --- a/home/static/js/global/admin.js +++ b/home/static/js/global/admin.js @@ -32,6 +32,7 @@ $(document).ready(function () { 'users who already accessed it will still continue to behave as if the original redirect is in place. This is' + 'because permanent redirects are normally stored by the user\'s browser until they delete their browser cache.' + 'Your browser may also store the permanent redirect until you clear its cache.
Pros: Permanent redirects' + - 'ensure search engines forget the old page (the \'Redirect from\') and index the new page instead.'); + 'ensure search engines forget the old page (the \'Redirect from\') and index the new page instead.' + ).css({'color': 'red'}); } }); From c69ce593dfac3e3f029380c251c00162d63ab700 Mon Sep 17 00:00:00 2001 From: Ali Hassan Date: Thu, 23 Feb 2023 10:36:06 +0500 Subject: [PATCH 4/6] update wagtail menus package --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3109799af..1196ae1e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,7 +19,7 @@ Markdown==3.3.7 wagtail==2.15.* wagtail-cache~=1.2.1 wagtailmedia==0.10.* -wagtailmenus~=3.0 +wagtailmenus==3.1.3 wagtailsvg==0.0.14 whitenoise==5.2.* django-health-check==3.16.5 From 3a3908cf808ea5b947c01c9f6f7ed9912292dd56 Mon Sep 17 00:00:00 2001 From: Ali Hassan Date: Thu, 23 Feb 2023 10:43:06 +0500 Subject: [PATCH 5/6] Minor changes --- home/static/js/global/admin.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/home/static/js/global/admin.js b/home/static/js/global/admin.js index 553528389..3e2edc150 100644 --- a/home/static/js/global/admin.js +++ b/home/static/js/global/admin.js @@ -22,17 +22,17 @@ $(document).ready(function () { 'Giving a Group the EDIT permission will also allow them to download data for Polls, Surveys, and Quizzes ' + 'for the Pages they can access.') - if (window.location.pathname.indexOf('/admin/redirects/') === 0) { - if (window.location.pathname.indexOf('/admin/redirects/add/') === 0){ + $('#id_is_permanent').parent().next('p').html('Recommendation: Do not use permanent redirects if you are setting ' + + 'up a promotion, QR code, or similar. Use permanent redirects if you are permanently moving the location of ' + + 'content on your site.
Cons: If you change or even delete a permanent redirect after you create it, the ' + + 'users who already accessed it will still continue to behave as if the original redirect is in place. This is' + + 'because permanent redirects are normally stored by the user\'s browser until they delete their browser cache.' + + 'Your browser may also store the permanent redirect until you clear its cache.
Pros: Permanent redirects' + + 'ensure search engines forget the old page (the \'Redirect from\') and index the new page instead.' + ).css({'color': 'red'}); + + if (window.location.pathname.indexOf('/admin/redirects/add/') === 0){ $('#id_is_permanent').removeAttr('checked'); - } - $('#id_is_permanent').parent().next('p').html('Recommendation: Do not use permanent redirects if you are setting ' + - 'up a promotion, QR code, or similar. Use permanent redirects if you are permanently moving the location of ' + - 'content on your site.
Cons: If you change or even delete a permanent redirect after you create it, the ' + - 'users who already accessed it will still continue to behave as if the original redirect is in place. This is' + - 'because permanent redirects are normally stored by the user\'s browser until they delete their browser cache.' + - 'Your browser may also store the permanent redirect until you clear its cache.
Pros: Permanent redirects' + - 'ensure search engines forget the old page (the \'Redirect from\') and index the new page instead.' - ).css({'color': 'red'}); } + }); From 02bf38d06b28770438430b1fa3ffdee2986e0c3b Mon Sep 17 00:00:00 2001 From: Ali Hassan Date: Thu, 23 Feb 2023 11:39:49 +0500 Subject: [PATCH 6/6] Fixes minor formatting issue --- home/static/js/global/admin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/static/js/global/admin.js b/home/static/js/global/admin.js index 3e2edc150..968eb710f 100644 --- a/home/static/js/global/admin.js +++ b/home/static/js/global/admin.js @@ -25,9 +25,9 @@ $(document).ready(function () { $('#id_is_permanent').parent().next('p').html('Recommendation: Do not use permanent redirects if you are setting ' + 'up a promotion, QR code, or similar. Use permanent redirects if you are permanently moving the location of ' + 'content on your site.
Cons: If you change or even delete a permanent redirect after you create it, the ' + - 'users who already accessed it will still continue to behave as if the original redirect is in place. This is' + - 'because permanent redirects are normally stored by the user\'s browser until they delete their browser cache.' + - 'Your browser may also store the permanent redirect until you clear its cache.
Pros: Permanent redirects' + + 'users who already accessed it will still continue to behave as if the original redirect is in place. This is ' + + 'because permanent redirects are normally stored by the user\'s browser until they delete their browser cache. ' + + 'Your browser may also store the permanent redirect until you clear its cache.
Pros: Permanent redirects ' + 'ensure search engines forget the old page (the \'Redirect from\') and index the new page instead.' ).css({'color': 'red'});