Procházet zdrojové kódy

Ticket #3335 - Usage in Decorous and Lucid

AntonLV před 5 roky
rodič
revize
d3131fba7a

+ 1 - 1
modules/boonex/decorous/data/template/system/_header_js_custom.html

@@ -9,7 +9,7 @@
             sidebar = $('.cd-side-nav'),
             sidebarTrigger = $('.cd-nav-trigger');
 
-        var mq = checkMQ();            
+        var mq = bx_check_mq();            
         if (mq != 'mobile') {
             $(window).scroll(function () {
                 $.each($('.content-wrapper-wrp, .cd-side-nav'), function (index, val) {

+ 4 - 10
modules/boonex/decorous/data/template/system/_header_js_toolbar.html

@@ -1,14 +1,9 @@
 <script type="text/javascript" language="javascript">
-    function checkMQ() {
-        //check if mobile or desktop device
-        return window.getComputedStyle(document.querySelector('.cd-main-content'), '::before').getPropertyValue('content').replace(/'/g, "").replace(/"/g, "");
-    }
-
     $(document).ready(function () {
-		var mq = checkMQ();
-		if (mq != 'mobile')
-			$("#bx-logo-container").prependTo("#bx-sliding-menu-sys_site .bx-sliding-menu-main-cnt");
-		
+        var mq = bx_check_mq();
+        if (mq != 'mobile')
+            $("#bx-logo-container").prependTo("#bx-sliding-menu-sys_site .bx-sliding-menu-main-cnt");
+	
         if(mq == 'mobile') {
             // hide toolbar on scrolldown, show - on scroll up
             new Headroom($('#bx-toolbar').get(0), {
@@ -28,7 +23,6 @@
                     var sidebar = $('.cd-side-nav');
                     if(sidebar.hasClass('nav-is-visible'))
                         sidebar.toggleClass('nav-is-visible');
-
                 }
             }).init();
         }

+ 3 - 17
modules/boonex/decorous/data/template/system/css/general.css

@@ -27,24 +27,10 @@
     min-height: 100vh;
     right: 100%;
 }
-.cd-main-content::before {
-    /* never visible - used to check MQ in jQuery */
-    display: none;
-    content: 'mobile';
-}
-@media only screen and (min-width: 720px) {
-    .cd-main-content::before {
-        content: 'tablet';
-    }
-}
-
 @media only screen and (min-width: 1025px) {
-	#bx-sliding-menu-search{
-		padding-left: 200px;
-		width:calc(100% - 200px);
-	}
-    .cd-main-content::before {
-        content: 'desktop';
+    #bx-sliding-menu-search{
+        padding-left: 200px;
+        width:calc(100% - 200px);
     }
 }
 

+ 1 - 6
modules/boonex/lucid/data/template/system/_header_js_toolbar.html

@@ -1,11 +1,6 @@
 <script language="javascript">
     var iToolbarSubmenuTopOffset = -2;
 
-    function checkMQ() {
-        //check if mobile or desktop device
-        return window.getComputedStyle(document.querySelector('.cd-main-content'), '::before').getPropertyValue('content').replace(/'/g, "").replace(/"/g, "");
-    }
-
     $(document).ready(function () {
 
         // hide toolbar on scrolldown, show - on scroll up
@@ -25,7 +20,7 @@
             }
         }).init();
 
-        var mq = checkMQ();
+        var mq = bx_check_mq();
         if(mq == 'mobile') {
             //process submenu in top menu
             $('.bx-menu-floating-blocks-big:visible > li:has(.bx-sliding-smenu-submenu) > a').bind('click', function() {

+ 0 - 15
modules/boonex/lucid/data/template/system/css/general.css

@@ -52,21 +52,6 @@
     min-height: 100%;
     min-height: 100vh;
 }
-.cd-main-content::before {
-  /* never visible - used to check MQ in jQuery */
-  display: none;
-  content: 'mobile';
-}
-@media only screen and (min-width: 720px) {
-  .cd-main-content::before {
-    content: 'tablet';
-  }
-}
-@media only screen and (min-width: 1024px) {
-  .cd-main-content::before {
-    content: 'desktop';
-  }
-}
 
 /*--- Header ---*/
 .cd-main-header {