Skip to content
Snippets Groups Projects
Commit b41c176c authored by Alexander Purr's avatar Alexander Purr Committed by Dorian Merz
Browse files

refs #19260 [fid_adlr] add JS that only belongs to adlr theme

* comes originally from ticket 17831
* run script each time if content of getitbox changes
parent d2410724
Branches
Tags
No related merge requests found
...@@ -47,4 +47,22 @@ $this->headTitle($this->driver->getBreadcrumb() . ' -'); ...@@ -47,4 +47,22 @@ $this->headTitle($this->driver->getBreadcrumb() . ' -');
</div> </div>
<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$(document).ready(recordDocReady);', 'SET');?> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$(document).ready(recordDocReady);', 'SET');?>
<!-- fid_adlr: record - view - END -->
<?php /* #17831 */ ?>
<?php $script = <<<JS
$(document).ready(function() {
$("body").on('DOMSubtreeModified', ".getitbox", function (){
if ($(window).width() >= 1200) {
var contentHeight = $('.media').height();
var getitboxHeight = $('.getitbox').height();
if (getitboxHeight > contentHeight) {
$('.media').css('min-height', getitboxHeight+'px');
}
}
})
});
JS;
?>
<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?>
<?php /* #17831 END */ ?>
<!-- fid_adlr: record - view - END -->
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment