瀏覽代碼

fix toolbar

Alex Aragón 6 年之前
父節點
當前提交
067d1b9312

+ 1 - 21
assets/js/app.js

@@ -264,7 +264,7 @@ $(function() {
     $(".advanced_options").on("click", function (event) {
         event.preventDefault();
         var id = $(this).attr('id') + '_options';
-        var button = $(this);
+
         $("#" + id).toggle();
         if($("#card-container").height()>700){
             $("#card-container").css("height","auto");
@@ -335,11 +335,6 @@ $(function() {
         }
     });
 
-    /* For non HTML5 browsers */
-    if ($("#formLogin".length > 1)) {
-        $("input[name=login]").focus();
-    }
-
     // Tool tip (in exercises)
     var tip_options = {
         placement: 'right'
@@ -380,10 +375,6 @@ $(function() {
     $("#notifications").load(webAjax + "online.ajax.php?a=get_users_online");
 });
 
-$(window).resize(function() {
-    checkBrand();
-});
-
 $(document).scroll(function() {
     var valor = $('body').outerHeight() - 700;
     if ($(this).scrollTop() > 100) {
@@ -459,16 +450,6 @@ function get_url_params(q, attribute) {
     }
 }
 
-function checkBrand() {
-    if ($('.subnav').length) {
-        if ($(window).width() >= 969) {
-            $('.subnav .brand').hide();
-        } else {
-            $('.subnav .brand').show();
-        }
-    }
-}
-
 function setCheckbox(value, table_id) {
     var checkboxes = $("#"+table_id+" input:checkbox");
     $.each(checkboxes, function(index, checkbox) {
@@ -658,7 +639,6 @@ function copyTextToClipBoard(elementId)
 // @todo check if there's a better way to expose functions.
 window.expandColumnToogle = expandColumnToogle;
 window.get_url_params = get_url_params;
-window.checkBrand = checkBrand;
 window.setCheckbox = setCheckbox;
 window.action_click = action_click;
 window.hideUnhide = hideUnhide;

+ 4 - 0
main/template/default/course_home/activity.html.twig

@@ -34,9 +34,11 @@
                                 <div class="content pt-2 pb-2">
                                     {{ item.extra|raw }}
                                     {{ item.link|raw }}
+                                    {% if item.visibility is not empty %}
                                     <div class="view">
                                         {{ item.visibility|raw }}
                                     </div>
+                                    {% endif %}
                                 </div>
                             </div>
                         </div>
@@ -60,9 +62,11 @@
                         <div class="content pt-2 pb-2">
                             {{ item.extra|raw }}
                             {{ item.link|raw }}
+                            {% if item.visibility is not empty %}
                             <div class="view">
                                 {{ item.visibility|raw }}
                             </div>
+                            {% endif %}
                         </div>
                     </div>
                 </div>

+ 3 - 6
src/ThemeBundle/Resources/views/Layout/layout_one_col.html.twig

@@ -31,12 +31,6 @@
 
         {% autoescape false %}
 
-        <section class="container-fluid">
-            {% if actions != '' %}
-                {{ actions }}
-            {% endif %}
-        </section>
-
         {% block chamilo_messages %}
             <section class="container-fluid">
                 {% include '@ChamiloTheme/FlashMessage/render.html.twig' %}
@@ -47,6 +41,9 @@
         <section class="container-fluid">
             <div class="card mb-4">
                 <div id="card-container" class="card-body">
+                    {% if actions != '' %}
+                        {{ actions }}
+                    {% endif %}
                     {# Content #}
                     {% block content %}
                         {{ content }}