mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Create loadFooterScripts(), update page_actions + formatting
This commit is contained in:
parent
66b3b20bf4
commit
0116d87445
@ -819,3 +819,15 @@ function getTooltip($msg, $id, $visible = true, $data_html = false)
|
||||
echo '<i class="fas fa-question-circle text-muted ' .$opt1.'" id="' .$id. '" data-toggle="tooltip" ' .$opt2. ' data-placement="auto" title="' . _($msg). '"></i>';
|
||||
}
|
||||
|
||||
// Load non default JS/ECMAScript in footer
|
||||
function loadFooterScripts($extraFooterScripts)
|
||||
{
|
||||
foreach ($extraFooterScripts as $script) {
|
||||
echo '<script type="text/javascript" src="' , $script['src'] , '"';
|
||||
if ($script['defer']) {
|
||||
echo ' defer="defer"';
|
||||
}
|
||||
echo '></script>' , PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
DisplayWPAConfig();
|
||||
break;
|
||||
case "/network_conf":
|
||||
DisplayNetworkingConfig($extraFooterScripts);
|
||||
DisplayNetworkingConfig();
|
||||
break;
|
||||
case "/hostapd_conf":
|
||||
DisplayHostAPDConfig();
|
||||
@ -30,12 +30,6 @@
|
||||
case "/torproxy_conf":
|
||||
DisplayTorProxyConfig();
|
||||
break;
|
||||
case "/firewall_conf":
|
||||
DisplayFirewallConfig();
|
||||
break;
|
||||
case "/ddclient_conf":
|
||||
DisplayDDClientConfig();
|
||||
break;
|
||||
case "/auth_conf":
|
||||
DisplayAuthConfig($_SESSION['user_id']);
|
||||
break;
|
||||
@ -55,3 +49,4 @@
|
||||
DisplayDashboard($extraFooterScripts);
|
||||
}
|
||||
?>
|
||||
|
||||
|
15
index.php
15
index.php
@ -9,7 +9,7 @@
|
||||
* in the README and original post by @SirLagz. For a quick run through, the packages required for the WebGUI are:
|
||||
* lighttpd (version 1.4.59 installed via apt)
|
||||
* php-cgi (version 7.4.33 installed via apt)
|
||||
* along with their supporting packages, php7.3 will also need to be enabled.
|
||||
* along with their supporting packages, php7.4 will also need to be enabled.
|
||||
*
|
||||
* @author Lawrence Yau <sirlagz@gmail.com>
|
||||
* @author Bill Zimmerman <billzimmerman@gmail.com>
|
||||
@ -104,10 +104,8 @@ initializeApp();
|
||||
<!-- Sidebar -->
|
||||
<?php require_once 'includes/sidebar.php'; ?>
|
||||
<!-- End of Sidebar -->
|
||||
|
||||
<!-- Content Wrapper -->
|
||||
<div id="content-wrapper" class="d-flex flex-column">
|
||||
|
||||
<!-- Main Content -->
|
||||
<div id="content">
|
||||
<!-- Topbar -->
|
||||
@ -152,15 +150,6 @@ initializeApp();
|
||||
<!-- Custom RaspAP JS -->
|
||||
<script src="app/js/custom.js"></script>
|
||||
|
||||
<?php
|
||||
// Load non default JS/ECMAScript in footer.
|
||||
foreach ($extraFooterScripts as $script) {
|
||||
echo '<script type="text/javascript" src="' , $script['src'] , '"';
|
||||
if ($script['defer']) {
|
||||
echo ' defer="defer"';
|
||||
}
|
||||
echo '></script>' , PHP_EOL;
|
||||
}
|
||||
?>
|
||||
<?php loadFooterScripts($extraFooterScripts); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user