You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2023/03/28 16:53:18 UTC
[allura] branch gc/8504 updated: [#8504] moved a couple of js event listeners to its own template
This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a commit to branch gc/8504
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/gc/8504 by this push:
new 87f1427dc [#8504] moved a couple of js event listeners to its own template
87f1427dc is described below
commit 87f1427dca53c44e65827d8d5682edece9c2acda
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Tue Mar 28 11:53:02 2023 -0500
[#8504] moved a couple of js event listeners to its own template
---
.../ext/user_profile/templates/profile_section_base.html | 5 +++++
.../allura/ext/user_profile/templates/sections/projects.html | 8 ++++++++
Allura/allura/templates/jinja_master/sidebar_menu.html | 11 +++++++++++
Allura/allura/templates/neighborhood_admin_accolades.html | 2 --
Allura/allura/templates/widgets/vote.html | 3 +++
.../templates_responsive/jinja_master/sidebar_menu.html | 10 ++++++++++
6 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/Allura/allura/ext/user_profile/templates/profile_section_base.html b/Allura/allura/ext/user_profile/templates/profile_section_base.html
index 7e15dad40..0cff1984d 100644
--- a/Allura/allura/ext/user_profile/templates/profile_section_base.html
+++ b/Allura/allura/ext/user_profile/templates/profile_section_base.html
@@ -26,3 +26,8 @@
{% block content %}{% endblock %}
</div>
</div>
+
+
+{% block extra_js %}
+
+{% endblock %}
diff --git a/Allura/allura/ext/user_profile/templates/sections/projects.html b/Allura/allura/ext/user_profile/templates/sections/projects.html
index 90acd3822..e774111d6 100644
--- a/Allura/allura/ext/user_profile/templates/sections/projects.html
+++ b/Allura/allura/ext/user_profile/templates/sections/projects.html
@@ -65,3 +65,11 @@
{% endif %}
{% endblock %}
+
+{% block extra_js %}
+ <script>
+ $('#show-more-profile-projects').on('click', function(e){
+ $(this).hide().closest('.section-body').find('li.hidden').show();
+ });
+ </script>
+{% endblock %}
diff --git a/Allura/allura/templates/jinja_master/sidebar_menu.html b/Allura/allura/templates/jinja_master/sidebar_menu.html
index 2c4cc37d2..be668fd4f 100644
--- a/Allura/allura/templates/jinja_master/sidebar_menu.html
+++ b/Allura/allura/templates/jinja_master/sidebar_menu.html
@@ -99,3 +99,14 @@
</script>
{% endif %}
</div>
+
+
+{% block extra_js %}
+<script>
+$('#sidebar-admin-header').on('click', function(e){
+ $("#sidebar-admin-menu").toggleClass("hidden");
+ $(this).toggleClass("expanded");
+ e.preventDefault();
+});
+</script>
+{% endblock %}
diff --git a/Allura/allura/templates/neighborhood_admin_accolades.html b/Allura/allura/templates/neighborhood_admin_accolades.html
index 74f89e0f2..8269a1c84 100644
--- a/Allura/allura/templates/neighborhood_admin_accolades.html
+++ b/Allura/allura/templates/neighborhood_admin_accolades.html
@@ -144,14 +144,12 @@
<script>
$('.delete-accolades, .revoke-award').each(function(el,index){
$(this).on('submit', function(e){
- e.preventDefault();
if ($(this).attr('class') === 'delete-accolades') {
return confirm('Continue to delete this award?');
}
if ($(this).attr('class') === 'revoke-award') {
return confirm('Continue to revoke this award?');
}
- }
})
})
</script>
diff --git a/Allura/allura/templates/widgets/vote.html b/Allura/allura/templates/widgets/vote.html
index 3dc856bf3..08b6e5aa8 100644
--- a/Allura/allura/templates/widgets/vote.html
+++ b/Allura/allura/templates/widgets/vote.html
@@ -51,3 +51,6 @@
{% endif %}
</div>
{% endif %}
+{% block extra_js %}
+
+{% endblock %}
diff --git a/Allura/allura/templates_responsive/jinja_master/sidebar_menu.html b/Allura/allura/templates_responsive/jinja_master/sidebar_menu.html
index c98cf6a7b..b079a4c8d 100644
--- a/Allura/allura/templates_responsive/jinja_master/sidebar_menu.html
+++ b/Allura/allura/templates_responsive/jinja_master/sidebar_menu.html
@@ -99,3 +99,13 @@
</script>
{% endif %}
</div>
+
+{% block extra_js %}
+<script>
+$('#sidebar-admin-header').on('click', function(e){
+ $("#sidebar-admin-menu").toggleClass("hidden");
+ $(this).toggleClass("expanded");
+ e.preventDefault();
+});
+</script>
+{% endblock %}