Browse Source

Merge pull request #1337 from aragonc/1.11.x

arrangement scrolling sidebar lessons for 1.11.x - refs BT#11455
Alex Aragon Calixto 8 years ago
parent
commit
eca0ba53a8
1 changed files with 11 additions and 2 deletions
  1. 11 2
      main/template/default/learnpath/view.tpl

+ 11 - 2
main/template/default/learnpath/view.tpl

@@ -133,11 +133,13 @@
 
                         <div class="tab-content">
                             <div role="tabpanel" class="tab-pane active" id="lp-view-content">
+                                <div id="wrapper-iframe" style="width:100%; height:100%">
                                 {% if lp_mode == 'fullscreen' %}
-                                    <iframe id="content_id_blank" name="content_name_blank" src="blank.php" border="0" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
+                                    <iframe id="content_id_blank" name="content_name_blank" style="width:100%; height:100%" src="blank.php" border="0" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
                                 {% else %}
-                                    <iframe id="content_id" name="content_name" src="{{ iframe_src }}" border="0" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
+                                    <iframe id="content_id" name="content_name" style="width:100%; height:100%" src="{{ iframe_src }}" border="0" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
                                 {% endif %}
+                                </div>
                             </div>
                             <div role="tabpanel" class="tab-pane" id="lp-view-forum">
                                 
@@ -162,6 +164,13 @@
         };
 
         $(document).on('ready', function () {
+            if (/iPhone|iPod|iPad/.test(navigator.userAgent)) {
+              $('#wrapper-iframe').css({
+                'overflow' : 'auto',
+                'position' : 'relative',
+                '-webkit-overflow-scrolling': 'touch'
+              });
+            }
             
             {% if lp_mode == 'embedframe' %}
                 //$('#learning_path_main').addClass('lp-view-collapsed');