mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-19 21:19:29 +00:00
Click2Dial-Funktion auf InfocenterDetails
Addon-JS injection FHC-Header
This commit is contained in:
Regular → Executable
+1
@@ -10,6 +10,7 @@
|
||||
'tablesorter' => true,
|
||||
'tinymce' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'addons' => true,
|
||||
'customCSSs' =>
|
||||
array(
|
||||
'skin/admintemplate.css',
|
||||
|
||||
Regular → Executable
+3
-1
@@ -58,6 +58,7 @@
|
||||
<tr>
|
||||
<td><?php echo ucfirst($kontakt->kontakttyp); ?></td>
|
||||
<td>
|
||||
<?php echo '<span class="'.$kontakt->kontakttyp.'">';?>
|
||||
<?php if ($kontakt->kontakttyp === 'email'): ?>
|
||||
<a href="mailto:<?php echo $kontakt->kontakt; ?>" target="_top">
|
||||
<?php
|
||||
@@ -67,6 +68,7 @@
|
||||
?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php echo '</span>'?>
|
||||
</td>
|
||||
<td><?php echo $kontakt->anmerkung; ?></td>
|
||||
</tr>
|
||||
@@ -106,4 +108,4 @@
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Regular → Executable
+33
@@ -15,6 +15,7 @@ $fontawesome = isset($fontawesome) ? $fontawesome : false;
|
||||
$tablesorter = isset($tablesorter) ? $tablesorter : false;
|
||||
$tinymce = isset($tinymce) ? $tinymce : false;
|
||||
$sbadmintemplate = isset($sbadmintemplate) ? $sbadmintemplate : false;
|
||||
$addons = isset($addons) ? $addons : false;
|
||||
|
||||
/**
|
||||
* Print the given title of the page
|
||||
@@ -76,6 +77,16 @@ function _generateJSsInclude($JSs)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates global JS-Object to pass parms to addon-js-functions
|
||||
*/
|
||||
function _generateAddonDataStorageObject()
|
||||
{
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'var FHC_ADDON_DATA_STORAGE_OBJECT = {app_root:"'.APP_ROOT.'"};';
|
||||
echo "</script>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- Header start -->
|
||||
<!DOCTYPE HTML>
|
||||
@@ -142,6 +153,28 @@ function _generateJSsInclude($JSs)
|
||||
_generateJSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/dist/js/sb-admin-2.min.js');
|
||||
}
|
||||
|
||||
// load addon hooks JS
|
||||
if ($addons === true)
|
||||
{
|
||||
_generateAddonDataStorageObject();
|
||||
|
||||
$aktive_addons = array_filter(explode(";", ACTIVE_ADDONS));
|
||||
$called_from = $this->router->directory.$this->router->class.'/'.$this->router->method;
|
||||
foreach ($aktive_addons as $addon)
|
||||
{
|
||||
$hookfile = DOC_ROOT.'addons/'.$addon.'/hooks.config.inc.php';
|
||||
if (file_exists($hookfile))
|
||||
{
|
||||
include($hookfile);
|
||||
if (key_exists($called_from, $js_hooks))
|
||||
{
|
||||
foreach ($js_hooks[$called_from] as $js_file)
|
||||
_generateJSsInclude('addons/'.$addon.'/'.$js_file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Eventually required JS
|
||||
_generateJSsInclude($customJSs);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user