Browse Source

add type iframe - refs #2755

Alex Aragón 6 years ago
parent
commit
88e095abf3

+ 5 - 1
app/Resources/public/css/scorm.css

@@ -453,7 +453,11 @@ See https://support.chamilo.org/issues/6976
     left: 0;
     width: 100%;
 }
-
+.iframe_sco{
+    background-color: #fffa90;
+    padding: 5px;
+    top: 0 !important;
+}
 .nav-tabs li.active a {
     color: #006A84;
 }

+ 0 - 1
main/lp/lp_view.php

@@ -547,7 +547,6 @@ $template->assign('media_player', $mediaplayer);
 $template->assign('toc_list', $get_toc_list);
 $template->assign('teacher_toc_buttons', $get_teacher_buttons);
 $template->assign('iframe_src', $src);
-$template->assign('type', $lp->get_type());
 $template->assign('navigation_bar_bottom', $navigation_bar_bottom);
 $template->assign('show_left_column', $lp->getHideTableOfContents() == 0);
 

+ 4 - 0
main/lp/scorm_api.php

@@ -238,6 +238,7 @@ $(document).ready(function() {
     olms.info_lms_item[0] = '<?php echo $oItem->get_id(); ?>';
     olms.info_lms_item[1] = '<?php echo $oItem->get_id(); ?>';
 
+
     $("#content_id").load(function() {
         logit_lms('#content_id load event starts');
         olms.info_lms_item[0] = olms.info_lms_item[1];
@@ -336,6 +337,9 @@ function LMSInitialize() {
 
         logit_scorm('LMSInitialize() with params: '+log);
 
+        $("#tab-iframe").removeClass("iframe_"+olms.lms_item_type);
+        $("#tab-iframe").addClass("iframe_"+olms.lms_item_type);
+
     if (olms.lms_lp_type == 1 || olms.lms_item_type == 'asset' || olms.lms_item_type == 'document') {
             xajax_start_timer();
         }

+ 1 - 1
main/template/default/learnpath/scorm_list.tpl

@@ -40,7 +40,7 @@
                 <li id="toc_{{ item.id }}" class="{{ item.class }} item-{{ item.type }}">
                     <div class="sub-item type-{{ item.type }}">
                         <a name="atoc_{{ item.id }}"></a>
-                        <a data-typw="type-{{ item.type }}" class="item-action" href="#"
+                        <a data-type="type-{{ item.type }}" class="item-action" href="#"
                            onclick="switch_item('{{ item.current_id }}','{{ item.id }}'); return false;">
                             <i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
                             {{ item.title }}

+ 1 - 1
main/template/default/learnpath/view.tpl

@@ -196,7 +196,7 @@
                     </ul>
                 </div>
 
-                <div class="tab-content">
+                <div id="tab-iframe" class="tab-content">
                     <div role="tabpanel" class="tab-pane active" id="lp-view-content">
                         <div id="wrapper-iframe">
                         {% if lp_mode == 'fullscreen' %}