From f479314e06ea03791838813322261483d86e94d4 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 1 Jun 2018 10:37:38 +0200 Subject: [PATCH] Allow apps to load JavaScript or CSS files, knowing we're loading the framework or not --- api/src/Framework/Ajax.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/src/Framework/Ajax.php b/api/src/Framework/Ajax.php index 55a8bf60a8..efa7efd64d 100755 --- a/api/src/Framework/Ajax.php +++ b/api/src/Framework/Ajax.php @@ -253,6 +253,12 @@ abstract class Ajax extends Api\Framework $extra['check-framework'] = $_GET['cd'] !== 'no'; } } + // allow apps to load JavaScript or CSS files, knowing we're loading the framework or not + Api\Hooks::process(array( + 'location' => 'framework_header', + 'popup' => !$do_framework, + )); + $this->tpl->set_var($this->_get_header($extra)); $content = $this->tpl->fp('out','head').$content;