Browse Source

Fix fluid style see BT#15952

Julio Montoya 5 years ago
parent
commit
492173dadf

+ 64 - 28
app/Resources/public/css/scorm.css

@@ -8,10 +8,11 @@ See https://support.chamilo.org/issues/6976
 body{
     background: #FFF !important;
 }
-.audio-scorm #container{
+.audio-scorm #container {
     min-height: 45px;
     margin-bottom: 5px;
 }
+
 #author_image {
     border: 1px solid #CCCCCC;
     float: left;
@@ -20,31 +21,38 @@ body{
     position: relative;
     width: 100%;
 }
+
 #author_name {
     float: left;
-    text-align:center;
+    text-align: center;
     width: 100%;
     font-size: 11px;
     color: #888;
     margin-top: 2px;
 }
-#learning_path_left_zone #scorm-gamification{
+
+#learning_path_left_zone #scorm-gamification {
 }
-#scorm-gamification .fa-star{
+
+#scorm-gamification .fa-star {
     font-size: 20px;
     color: #C2C2C2;
 }
-#scorm-gamification .fa-star.level{
+
+#scorm-gamification .fa-star.level {
     color: #D9534F;
 }
-#learning_path_left_zone .navegation-bar .buttons{
+
+#learning_path_left_zone .navegation-bar .buttons {
     padding-top: 5px;
     padding-bottom: 5px;
 }
-#learning_path_left_zone .description-autor{
+
+#learning_path_left_zone .description-autor {
     text-align: left;
     padding-top: 10px;
 }
+
 .inner_lp_toc .scorm_item a {
     font-weight: bold;
     font-size: 14px;
@@ -53,10 +61,12 @@ body{
     text-decoration: none;
     color: #2F3E46;
 }
+
 .inner_lp_toc .scorm_item a.chapter_module {
     font-weight: normal;
     margin-right: 10px;
 }
+
 .inner_lp_toc .scorm_item_highlight {
     border: 1px solid #999;
     background:#999;
@@ -72,12 +82,14 @@ body{
     padding: 10px 0px 10px 0px;
     text-decoration: none;
 }
+
 .inner_lp_toc .scorm_item_highlight a {
-    color:#fff;
+    color: #fff;
     margin-right: 1px;
     text-decoration: none;
     font-weight: bold;
 }
+
 .inner_lp_toc .scorm_item {
     font-size: 16px;
     margin-left: 10px;
@@ -85,64 +97,76 @@ body{
     text-decoration: none;
     border-color: rgba(255, 255, 255, 0.3);
 }
+
 .inner_lp_toc .scorm_item_section .scorm_item:before {
     content : url('../../main/img/lp_section.png');  /* path from main/lp/lp_controller.php file */
     vertical-align: text-top;
     margin-right : 5px;
 }
+
 /* learning path's classes for section and item for 5 levels of depth */
 .scorm_section_level_0 {
     margin: 0 0 0 0;
 }
+
 .scorm_section_level_1 {
     margin: 0 0.5em 0 20px;
 }
+
 .scorm_section_level_2 {
     margin: 0 0.5em 0 40px;
 }
+
 .scorm_section_level_3 {
     margin: 0 0.5em 0 60px;
 }
+
 .scorm_section_level_4 {
     margin: 0 0.5em 0 70px;
 }
+
 .scorm_section_level_5 {
     margin: 0 0.5em 0 10em;
 }
-.scorm_item_normal{
+
+.scorm_item_normal {
     line-height: 25px;
     border-bottom: 1px solid #DDD;
     padding: 5px 0;
 }
+
 .level_0 {
     margin: 0;
     padding-left: 30px;
 }
+
 .level_1 {
     margin: 0 0.5em 0 20px;
     padding-left: 30px;
 }
+
 .level_2 {
     margin: 0 0.5em 0 40px;
     padding-left: 30px;
 }
+
 .level_3 {
     margin: 0 0.5em 0 60px;
-    padding-left: 30px;
-    padding-top: 5px;
-    padding-bottom: 5px;
-    padding-right: 5px;
+    padding: 5px 5px 5px 30px;
     line-height: 14px;
 }
+
 .level_4 {
     margin: 0 0.5em 0 70px;
     padding-left: 30px;
 }
+
 .level_5 {
     margin: 0 0.5em 0 90px;
     padding-left: 30px;
 }
-#learning_path_breadcrumb_zone .breadcrumb{
+
+#learning_path_breadcrumb_zone .breadcrumb {
     background-color: #2b3d53;
     border-radius: 0;
     -moz-border-radius: 0;
@@ -150,46 +174,57 @@ body{
     color: #ffffff;
     font-size: 12px;
 }
-#learning_path_breadcrumb_zone .breadcrumb a{
+
+#learning_path_breadcrumb_zone .breadcrumb a {
     color: #ffffff;
     text-decoration: none;
 }
-#learning_path_breadcrumb_zone .breadcrumb a:hover{
+
+#learning_path_breadcrumb_zone .breadcrumb a:hover {
     color: #dddddd;
 }
-.total{
+
+.total {
     width: 100%;
 }
-.view-options{
+
+.view-options {
     padding-top: 3px;
     margin-right: 5px;
 }
-.panel-default .panel-heading .btn{
+
+.panel-default .panel-heading .btn {
     top: -25px;
 }
-.panel-default .panel-heading .dropdown-menu{
+
+.panel-default .panel-heading .dropdown-menu {
     top: 30%;
 }
-#content-scorm .breadcrumb{
+
+#content-scorm .breadcrumb {
     padding: 5px;
 }
-.scorm-heading{
+
+.scorm-heading {
     font-size: 14px;
     padding-top: 5px;
     padding-bottom: 5px;
 }
-#control-bottom{
+
+#control-bottom {
     position: fixed;
     bottom: 0;
     width: 100%;
     text-align: center;
     left: 0;
 }
-#control-bottom.well{
+
+#control-bottom.well {
     margin-bottom: 0;
 }
+
 /*SCORM CSS BASE */
-#learning_path_left_zone .home{
+#learning_path_left_zone .home {
     display: inline-block;
     width: 94%;
     margin-bottom: .5em;
@@ -229,6 +264,7 @@ body{
     background-color: #F5F5F5;
     color: #000;
 }
+
 .scorm_completed .item {
     background:url("../../main/img/scorm/scorm_completed.png") no-repeat 10px center;
 }
@@ -322,7 +358,7 @@ body{
 #learning_path_right_zone .lp-view-zone-container {
     bottom: 0;
     left: 0;
-    padding: 5px;
+    padding: 0px;
     position: absolute;
     right: 0;
     top: 0;
@@ -470,7 +506,7 @@ body{
         padding-right: 5px;
     }
     #learning_path_right_zone .lp-view-zone-container {
-        padding-left: 5px;
+        padding-left: 0px;
     }
 
     #learning_path_right_zone .lp-view-tabs .tab-content {
@@ -596,4 +632,4 @@ body{
     #scorm-info hr {
         display: none;
     }
-}
+}

+ 7 - 3
app/Resources/public/css/themes/rainbow/learnpath.css

@@ -64,11 +64,11 @@
     background-color: #ffffff;
 }
 .title-learnpath{
-    padding-left: 30px;
+    padding-left: 0px;
     padding-top: 10px;
 }
 #learning_path_right_zone .tab-pane iframe {
-    padding-left: 15px;
+    padding-left: 0px;
     margin-top: 20px;
 }
 .title-learnpath h4,
@@ -483,9 +483,13 @@ table.lp_overview img {
 }
 /* nuevo css */
 
+.container-fluid {
+    padding-left: 0px;
+}
+
 #learning_path_right_zone .lp-view-tabs .tab-content {
     bottom: 5px;
-    left: 5px;
+    left: 0px;
     position: absolute;
     right: 5px;
     top: 84px;

+ 25 - 1
main/inc/lib/template.lib.php

@@ -75,9 +75,9 @@ class Template
         $this->title = $title;
         $this->show_learnpath = $show_learnpath;
         $this->setResponseCode($responseCode);
+        $origin = api_get_origin();
 
         if (empty($this->show_learnpath)) {
-            $origin = api_get_origin();
             if ($origin === 'learnpath') {
                 $this->show_learnpath = true;
                 $show_footer = false;
@@ -229,6 +229,30 @@ class Template
         $this->assign('template', $this->templateFolder);
         $this->assign('locale', api_get_language_isocode());
         $this->assign('login_class', null);
+        $this->assign('origin', $origin);
+        // ofaj
+        $fluid = '';
+        $baseName = basename(api_get_self());
+        $dirName = basename(dirname(api_get_self()));
+
+        $fluidPages = [
+            'exercise_submit.php',
+            'result.php',
+            'overview.php',
+        ];
+        // ofaj
+        /*$fluidPagesInLearnPath = [
+            'viewthread.php',
+            'viewforum.php',
+        ];*/
+        if (in_array($baseName, $fluidPages)) {
+            $fluid = true;
+        }
+        if ($origin === 'learnpath' && $dirName === 'forum') {
+            $fluid = true;
+        }
+
+        $this->assign('fluid', $fluid);
 
         $allow = api_get_configuration_value('show_language_selector_in_menu');
         if ($allow) {

+ 1 - 1
main/template/default/layout/page.tpl

@@ -46,7 +46,7 @@
 
             <!-- START CONTENT -->
             <section id="cm-content">
-                <div class="container">
+                <div class="container{{ fluid == true ? '-fluid':'' }}">
                     {% if show_course_shortcut is not null %}
                         <!-- TOOLS SHOW COURSE -->
                         <div id="cm-tools" class="nav-tools">

+ 1 - 5
main/template/rainbow/layout/show_header.tpl

@@ -52,11 +52,7 @@
 
     <!-- START CONTENT -->
     <section id="cm-content">
-        {% if (_p.self_basename == 'exercise_submit.php' or _p.self_basename == 'result.php') %}
-            <div class="container-fluid">
-        {% else %}
-            <div class="container">
-        {% endif %}
+        <div class="container{{ fluid == true ? '-fluid':'' }}">
             {% block breadcrumb %}
                 {{ breadcrumb }}
             {% endblock %}