diff --git a/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js b/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js index 6942f3b59..6427c8d2a 100644 --- a/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js +++ b/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js @@ -260,7 +260,7 @@ if($('span.close-col-btn', this).length) return true; - $(this).append($('') + $(this).children('.wrapper').prepend($('') .addClass('close-col-btn') .on('click', function(e){ // check for theme attribute and emmit event @@ -271,9 +271,10 @@ } // remove the col $col.remove(); - // if row is empty call closeAllModals() - if(!$('.col', _$row).length){ - backToFrontPage(); + // if row is empty and we are not in productions call closeAllModals() + if(!$('.col', _$row).length + && !_$body.is('.entity-type-node.bundle-page')){ + backToFrontPage(); } }) ); diff --git a/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css b/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css index d4f250cd7..776a57578 100644 --- a/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css +++ b/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css @@ -1327,14 +1327,15 @@ main[role="main"] ul, main[role="main"] li, main[role="main"] ul.inline li:first main[role="main"] span.close-col-btn { pointer-events: all; cursor: pointer; - position: absolute; - top: 0; - right: 16px; + position: -webkit-sticky; + position: sticky; + top: 0.5em; padding: 0 !important; margin: 0.5em; display: block; width: 10px; height: 10px; + float: right; background-image: url(../img/close.svg); background-repeat: no-repeat; background-position: center; diff --git a/sites/all/themes/custom/edlptheme/assets/scripts/main.js b/sites/all/themes/custom/edlptheme/assets/scripts/main.js index 6942f3b59..6427c8d2a 100644 --- a/sites/all/themes/custom/edlptheme/assets/scripts/main.js +++ b/sites/all/themes/custom/edlptheme/assets/scripts/main.js @@ -260,7 +260,7 @@ if($('span.close-col-btn', this).length) return true; - $(this).append($('') + $(this).children('.wrapper').prepend($('') .addClass('close-col-btn') .on('click', function(e){ // check for theme attribute and emmit event @@ -271,9 +271,10 @@ } // remove the col $col.remove(); - // if row is empty call closeAllModals() - if(!$('.col', _$row).length){ - backToFrontPage(); + // if row is empty and we are not in productions call closeAllModals() + if(!$('.col', _$row).length + && !_$body.is('.entity-type-node.bundle-page')){ + backToFrontPage(); } }) ); diff --git a/sites/all/themes/custom/edlptheme/assets/styles/app.scss b/sites/all/themes/custom/edlptheme/assets/styles/app.scss index 40c514b1f..c22733890 100644 --- a/sites/all/themes/custom/edlptheme/assets/styles/app.scss +++ b/sites/all/themes/custom/edlptheme/assets/styles/app.scss @@ -266,12 +266,14 @@ main[role="main"]{ // z-index: 10; pointer-events: all; cursor: pointer; - position:absolute; - top:0; right:16px; - padding:0!important; margin:0.5em; + position:sticky; + top:0.5em; + padding:0!important; + margin:0.5em; display: block; $s:10px; width:$s; height:$s; + float: right; background-image: url(../img/close.svg); background-repeat: no-repeat; background-position: center;