From 4263aa510c71b2373e88b13ca50d82ca76befafe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Arag=C3=B3n?= Date: Tue, 5 Mar 2019 13:53:17 -0500 Subject: [PATCH] New navigation menu for mobile - refs #2755 --- app/Resources/public/css/scorm.css | 79 ++++++++++++++++++++++-- main/lp/scorm_api.php | 9 ++- main/template/default/learnpath/view.tpl | 71 ++++++++++++--------- 3 files changed, 123 insertions(+), 36 deletions(-) diff --git a/app/Resources/public/css/scorm.css b/app/Resources/public/css/scorm.css index 9079c046aa..9b22491fb2 100644 --- a/app/Resources/public/css/scorm.css +++ b/app/Resources/public/css/scorm.css @@ -509,15 +509,77 @@ See https://support.chamilo.org/issues/6976 text-align: center; } -.navegation-bar { +/** MENU FLOAT **/ + +.circular-menu { + height: auto; + left: 0; + top: 50px; + position: fixed; + z-index: 5; +} + +.circle { + width: 100%; + height: 40px; + opacity: 0; + margin-top: 0; + padding-top: 50px; + + -webkit-transform: scale(0); + -moz-transform: scale(0); + -transform: scale(0); + + -webkit-transition: all 0.4s ease-out; + -moz-transition: all 0.4s ease-out; + transition: all 0.4s ease-out; +} + +.open.circle { + opacity: 1; + + -webkit-transform: scale(1); + -moz-transform: scale(1); + -transform: scale(1); +} + +.circle a { + text-decoration: none; + color: #fff; display: block; - padding: 0; - right: 5px; - top: 5px; + height: 40px; + width: 40px; + line-height: 40px; + text-align: center; + border-radius: 100%; + margin-left: 5px; +} + +.circle a:hover { + color: #eef; +} + +.menu-button { position: absolute; - z-index: 9999; + top: 5px; + left: 5px; + text-align: center; + border-radius: 50%; + display: block; + height: 40px; + width: 40px; + line-height: 18px; + padding: 10px; + background: #ffffff; + font-size: 18px; + border: 2px solid #8dcbf3; +} + +.menu-button:hover { + background-color: #ffffff; } + /* LP VIEW COLLAPSE */ .scorm-collapse .panel:hover { box-shadow: 0 3px 1px 0 rgba(20, 23, 28, .1); @@ -608,7 +670,12 @@ See https://support.chamilo.org/issues/6976 .scorm_item_normal.scorm_highlight a { color: #FFFFFF; } - +.tab-none-forum{ + top: 0 !important; +} +.circular-menu.none-forum{ + top: 0 !important; +} /* END LP VIEW COLLAPSE */ /* Small devices (tablets, 768px and up) */ @media (min-width: 768px) { diff --git a/main/lp/scorm_api.php b/main/lp/scorm_api.php index 09410b01f0..1278a89893 100755 --- a/main/lp/scorm_api.php +++ b/main/lp/scorm_api.php @@ -338,10 +338,11 @@ function LMSInitialize() { logit_scorm('LMSInitialize() with params: '+log); if(olms.lms_item_type == 'sco'){ - $("#tab-iframe").removeClass("tab-content"); + $("#tab-iframe").removeClass(); $("#tab-iframe").addClass("tab-content iframe_"+olms.lms_item_type); } - if (olms.lms_lp_type == 1 || olms.lms_item_type == 'asset' || olms.lms_item_type == 'document') { + + if (olms.lms_lp_type == 1 || olms.lms_item_type == 'asset' || olms.lms_item_type == 'document') { xajax_start_timer(); } @@ -1757,11 +1758,15 @@ var loadForumThread = function(lpId, lpItemId) { var tabForumLink = $('.lp-view-tabs a[href="#lp-view-forum"]'), tabForum = tabForumLink.parent(); $("#navTabs").show(); + $("#tab-iframe").removeClass("tab-none-forum"); + $("#btn-menu-float").removeClass("none-forum"); if (forumThreadData.error) { tabForumLink.removeAttr('data-toggle'); tabForum.addClass('disabled'); $("#navTabs").hide(); + $("#tab-iframe").addClass("tab-none-forum"); + $("#btn-menu-float").addClass("none-forum"); $('#lp-view-forum').html(''); return; diff --git a/main/template/default/learnpath/view.tpl b/main/template/default/learnpath/view.tpl index 81f9470c83..132c7bdfea 100644 --- a/main/template/default/learnpath/view.tpl +++ b/main/template/default/learnpath/view.tpl @@ -1,4 +1,4 @@ -
+
{% if show_left_column == 1 %}