From f967094f8a1c63acbbc9fa2c7300028c4d2e0fd9 Mon Sep 17 00:00:00 2001 From: Zambom Date: Thu, 29 Dec 2016 16:20:28 -0200 Subject: [PATCH] Adjusting category list accordion --- amadeus/static/css/base/amadeus.css | 13 ++++++++----- amadeus/static/js/course.js | 22 ++++++++++++++++++++++ categories/templates/categories/home.html | 23 +++++++++++------------ categories/templates/categories/list.html | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------------- 4 files changed, 118 insertions(+), 116 deletions(-) diff --git a/amadeus/static/css/base/amadeus.css b/amadeus/static/css/base/amadeus.css index 5a6c9de..b630d58 100755 --- a/amadeus/static/css/base/amadeus.css +++ b/amadeus/static/css/base/amadeus.css @@ -32,10 +32,11 @@ } .category-header i{ - color: white; - float:right; - font-size: 25px; - margin-right: 10px; + color: white; +} + +.cat-selector { + margin: 0; } #create-category{ @@ -655,10 +656,12 @@ ul, li { margin-bottom: 1%; } .data_register_course p{ color: grey; } + .category-course-link{ font-size: 16px; color: #FFFFFF !important; - font-family: Roboto Regular; + font-family: Roboto; + font-weight: normal; } .category-course-link:hover{ diff --git a/amadeus/static/js/course.js b/amadeus/static/js/course.js index 540053f..20cbadf 100755 --- a/amadeus/static/js/course.js +++ b/amadeus/static/js/course.js @@ -85,6 +85,7 @@ var delete_course = { }); } }; + /* * * Function to load create course's form @@ -99,3 +100,24 @@ function replicate_course(url, course) { } }); } + +/* +* +* Functions to control category marker +* +*/ +$('.collapse').on('show.bs.collapse', function (e) { + if($(this).is(e.target)){ + var btn = $(this).parent().find('.fa-angle-right'); + + btn.switchClass("fa-angle-right", "fa-angle-down", 250, "easeInOutQuad"); + } +}); + +$('.collapse').on('hide.bs.collapse', function (e) { + if($(this).is(e.target)){ + var btn = $(this).parent().find('.fa-angle-down'); + + btn.switchClass("fa-angle-down", "fa-angle-right", 250, "easeInOutQuad"); + } +}); \ No newline at end of file diff --git a/categories/templates/categories/home.html b/categories/templates/categories/home.html index 5890cb9..bf4fc02 100755 --- a/categories/templates/categories/home.html +++ b/categories/templates/categories/home.html @@ -2,29 +2,28 @@ {% load static i18n django_bootstrap_breadcrumbs permission_tags %} - - {% block breadcrumbs %} - {% clear_breadcrumbs %} - {% breadcrumb 'Home' 'categories:index' %} + {% clear_breadcrumbs %} + {% breadcrumb 'Home' 'categories:index' %} {% endblock %} {% block render_breadcrumbs %} - {% render_breadcrumbs %} + {% render_breadcrumbs %} {% endblock %} {% block content %} {% if user|has_role:'system_admin' %} -

{% trans 'categories' %}

-
- {% include page_template %} -
+

{% trans 'categories' %}

+
+ {% include page_template %} +
{% else %} -
- {% include page_template %} -
+
+ {% include page_template %} +
{% endif %} +