From 840896faf03539dfe2c3b089bfdd1615d24f8492 Mon Sep 17 00:00:00 2001 From: benweet Date: Sun, 25 Aug 2013 02:01:49 +0200 Subject: [PATCH] Upgrade to Bootstrap 3 --- js/core.js | 8 ++++---- js/styles/main.less | 2 +- js/utils.js | 9 +++------ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/js/core.js b/js/core.js index a67cae36..04e5417e 100644 --- a/js/core.js +++ b/js/core.js @@ -460,7 +460,7 @@ define([ if(e.target === $menuPanelElt[0]) { isMenuPanelShown = true; menuPanelBackdropElt = utils.createBackdrop('collapse', '.menu-panel'); - $menuPanelElt.addClass('move-to-front'); + //$menuPanelElt.addClass('move-to-front'); } else { // Close all open sub-menus when one submenu opens @@ -470,7 +470,7 @@ define([ if(e.target === $menuPanelElt[0]) { isMenuPanelShown = false; menuPanelBackdropElt.remove(); - $menuPanelElt.removeClass('move-to-front'); + //$menuPanelElt.removeClass('move-to-front'); } }).on('hidden.bs.collapse', function(e) { if(e.target === $menuPanelElt[0]) { @@ -487,7 +487,7 @@ define([ if(e.target === $documentPanelElt[0]) { isDocumentPanelShown = true; documentPanelBackdropElt = utils.createBackdrop('collapse', '.document-panel'); - $documentPanelElt.addClass('move-to-front'); + //$documentPanelElt.addClass('move-to-front'); } else { // Close all open sub-menus when one submenu opens @@ -497,7 +497,7 @@ define([ if(e.target === $documentPanelElt[0]) { isDocumentPanelShown = false; documentPanelBackdropElt.remove(); - $documentPanelElt.removeClass('move-to-front'); + //$documentPanelElt.removeClass('move-to-front'); } }).on('hidden.bs.collapse', function(e) { if(e.target === $documentPanelElt[0]) { diff --git a/js/styles/main.less b/js/styles/main.less index 9b8b2667..91c7930c 100644 --- a/js/styles/main.less +++ b/js/styles/main.less @@ -317,7 +317,7 @@ body { position: absolute; top: 0; height: 100%; - z-index: 10; + z-index: 2000; overflow: initial; .box-shadow(0 6px 12px rgba(0,0,0,.175)); .collapse-button i { diff --git a/js/utils.js b/js/utils.js index f7debdd9..9c29330e 100644 --- a/js/utils.js +++ b/js/utils.js @@ -181,14 +181,11 @@ define([ // Create a backdrop and add to the body utils.createBackdrop = function(toggle, target) { var result = crel('div', { - 'class': 'modal-backdrop in' + 'class': 'modal-backdrop in', + 'data-toggle': toggle, + 'data-target': target, }); document.body.appendChild(result); - if(toggle == 'collapse') { - $(result).click(function() { - $(target).collapse('hide'); - }); - } return result; };