Fixed dragula css and js to not prepend /

This commit is contained in:
johnnyq 2025-02-22 12:47:26 -05:00
parent 2a974c28b0
commit 8a13207327
13 changed files with 43 additions and 31 deletions

View File

@ -30,7 +30,7 @@ $ticket_template_updated_at = nullable_htmlentities($row['ticket_template_update
$sql_task_templates = mysqli_query($mysqli, "SELECT * FROM task_templates WHERE task_template_ticket_template_id = $ticket_template_id ORDER BY task_template_order ASC, task_template_id ASC");
?>
<link rel="stylesheet" href="/plugins/dragula/dragula.min.css">
<link rel="stylesheet" href="plugins/dragula/dragula.min.css">
<ol class="breadcrumb d-print-none">
<li class="breadcrumb-item">

View File

@ -180,7 +180,11 @@ $sql_related_software = mysqli_query(
$software_count = mysqli_num_rows($sql_related_software);
if (isset($_GET['client_id'])) {
$client_url = "client_id=$client_id&";
} else {
$client_url = '';
}
// Generate the HTML form content using output buffering.
ob_start();
@ -848,7 +852,7 @@ ob_start();
</div>
<div class="modal-footer bg-white">
<a href="asset_details.php?asset_id=<?php echo $asset_id; ?>" class="btn btn-primary text-bold"><span class="text-white">More Details</span></a>
<a href="asset_details.php?<?php echo $client_url; ?>asset_id=<?php echo $asset_id; ?>" class="btn btn-primary text-bold"><span class="text-white">More Details</span></a>
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Close</button>
</div>

View File

@ -142,7 +142,11 @@ $file_count = mysqli_num_rows($sql_linked_files);
$linked_files = array();
if (isset($_GET['client_id'])) {
$client_url = "client_id=$client_id&";
} else {
$client_url = '';
}
// Generate the HTML form content using output buffering.
ob_start();
@ -844,7 +848,7 @@ ob_start();
</div>
<div class="modal-footer bg-white">
<a href="contact_details.php?contact_id=<?php echo $contact_id; ?>" class="btn btn-primary text-bold"><span class="text-white">More Details</span></a>
<a href="contact_details.php?<?php echo $client_url; ?>contact_id=<?php echo $contact_id; ?>" class="btn btn-primary text-bold"><span class="text-white">More Details</span></a>
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Close</button>
</div>

View File

@ -533,7 +533,7 @@ if (mysqli_num_rows($os_sql) > 0) {
<a class="text-dark" href="#"
data-toggle="ajax-modal"
data-modal-size="lg"
data-ajax-url="ajax/ajax_asset_details.php"
data-ajax-url="ajax/ajax_asset_details.php?<?php echo $client_url; ?>"
data-ajax-id="<?php echo $asset_id; ?>">
<div class="media">
<i class="fa fa-fw fa-2x fa-<?php echo $device_icon; ?> mr-3 mt-1"></i>

View File

@ -399,7 +399,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<a class="text-dark" href="#"
data-toggle="ajax-modal"
data-modal-size="lg"
data-ajax-url="ajax/ajax_contact_details.php"
data-ajax-url="ajax/ajax_contact_details.php?<?php echo $client_url; ?>"
data-ajax-id="<?php echo $contact_id; ?>">
<div class="media">
<?php if ($contact_photo) { ?>

View File

@ -19,55 +19,55 @@
<li class="nav-item">
<a href="contacts.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "contacts.php" || basename($_SERVER["PHP_SELF"]) == "contact_details.php") { echo "active"; } ?>">
<i class="nav-icon fas fa-address-book"></i>
<p><strong>ALL</strong> Contacts</p>
<p>Contacts</p>
</a>
</li>
<li class="nav-item">
<a href="locations.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "locations.php") { echo "active"; } ?>">
<i class="nav-icon fas fa-map-marker-alt"></i>
<p><strong>ALL</strong> Locations</p>
<p>Locations</p>
</a>
</li>
<li class="nav-item">
<a href="assets.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "assets.php") { echo "active"; } ?>">
<i class="nav-icon fas fa-desktop"></i>
<p><strong>ALL</strong> Assets</p>
<p>Assets</p>
</a>
</li>
<li class="nav-item">
<a href="software.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "software.php") { echo "active"; } ?>">
<i class="nav-icon fas fa-cube"></i>
<p><strong>ALL</strong> Licenses</p>
<p>Licenses</p>
</a>
</li>
<li class="nav-item">
<a href="credentials.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "credentials.php") { echo "active"; } ?>">
<i class="nav-icon fas fa-key"></i>
<p><strong>ALL</strong> Credentials</p>
<p>Credentials</p>
</a>
</li>
<li class="nav-item">
<a href="networks.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "networks.php") { echo "active"; } ?>">
<i class="nav-icon fas fa-network-wired"></i>
<p><strong>ALL</strong> Networks</p>
<p>Networks</p>
</a>
</li>
<li class="nav-item">
<a href="certificates.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "certificates.php") { echo "active"; } ?>">
<i class="nav-icon fas fa-lock"></i>
<p><strong>ALL</strong> Certificates</p>
<p>Certificates</p>
</a>
</li>
<li class="nav-item">
<a href="domains.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "domains.php") { echo "active"; } ?>">
<i class="nav-icon fas fa-globe"></i>
<p><strong>ALL</strong> Domains</p>
<p>Domains</p>
</a>
</li>
<li class="nav-item">
<a href="services.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "services.php") { echo "active"; } ?>">
<i class="nav-icon fas fa-stream"></i>
<p><strong>ALL</strong> Services</p>
<p>Services</p>
</a>
</li>
<?php } ?>

View File

@ -32,6 +32,13 @@
</p>
</a>
</li>
<li class="nav-item">
<a href="contacts.php" class="nav-link">
<i class="fas fa-users nav-icon"></i>
<p>Overview</p>
<i class="fas fa-angle-right nav-icon float-right"></i>
</a>
</li>
<?php } ?>
<?php if (lookupUserPermission("module_support") >= 1) { ?>

View File

@ -6,11 +6,6 @@
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" data-enable-remember="TRUE" href="#"><i class="fas fa-bars"></i></a>
</li>
<li class="nav-item" title="Client Overview">
<a href="contacts.php" class="nav-link">
<i class="fas fa-users nav-icon mr-2"></i>Client Overview
</a>
</li>
</ul>
<!-- Center navbar links -->

View File

@ -157,7 +157,7 @@ if (isset($_GET['invoice_id'])) {
?>
<link rel="stylesheet" href="/plugins/dragula/dragula.min.css">
<link rel="stylesheet" href="plugins/dragula/dragula.min.css">
<ol class="breadcrumb d-print-none">
<?php if (isset($_GET['client_id'])) { ?>

View File

@ -115,7 +115,7 @@ if (isset($_GET['quote_id'])) {
);
?>
<link rel="stylesheet" href="/plugins/dragula/dragula.min.css">
<link rel="stylesheet" href="plugins/dragula/dragula.min.css">
<ol class="breadcrumb d-print-none">
<?php if (isset($_GET['client_id'])) { ?>

View File

@ -480,7 +480,7 @@ require_once "includes/footer.php";
});
</script>
<link rel="stylesheet" href="/plugins/dragula/dragula.min.css">
<link rel="stylesheet" href="plugins/dragula/dragula.min.css">
<script src="plugins/dragula/dragula.min.js"></script>
<script>
$(document).ready(function() {

View File

@ -3,8 +3,10 @@
// If client_id is in URI then show client Side Bar and client header
if (isset($_GET['client_id'])) {
require_once "includes/inc_all_client.php";
$client_url = "client_id=$client_id&";
} else {
require_once "includes/inc_all.php";
$client_url = '';
}
// Perms
@ -337,7 +339,7 @@ if (isset($_GET['ticket_id'])) {
$ticket_collaborators = nullable_htmlentities($row['user_names']);
?>
<link rel="stylesheet" href="/plugins/dragula/dragula.min.css">
<link rel="stylesheet" href="plugins/dragula/dragula.min.css">
<!-- Breadcrumbs-->
<ol class="breadcrumb d-print-none">
@ -1021,7 +1023,7 @@ if (isset($_GET['ticket_id'])) {
<a href="#"
data-toggle="ajax-modal"
data-modal-size="lg"
data-ajax-url="ajax/ajax_asset_details.php"
data-ajax-url="ajax/ajax_asset_details.php?<?php echo $client_url; ?>"
data-ajax-id="<?php echo $asset_id; ?>">
<i class="fa fa-fw fa-desktop text-secondary mr-2"></i><strong><?php echo $asset_name; ?></strong>
</a>
@ -1166,7 +1168,7 @@ $('#summaryModal').on('shown.bs.modal', function (e) {
</script>
<script src="/plugins/dragula/dragula.min.js"></script>
<script src="plugins/dragula/dragula.min.js"></script>
<script>
$(document).ready(function() {
var container = $('.table tbody')[0];

View File

@ -1,5 +1,5 @@
<link rel="stylesheet" href="/plugins/dragula/dragula.min.css">
<link rel="stylesheet" href="/css/tickets_kanban.css">
<link rel="stylesheet" href="plugins/dragula/dragula.min.css">
<link rel="stylesheet" href="css/tickets_kanban.css">
<?php
@ -153,5 +153,5 @@ echo "const CONFIG_TICKET_MOVING_COLUMNS = " . json_encode($config_ticket_movi
echo "const CONFIG_TICKET_ORDERING = " . json_encode($config_ticket_ordering) . ";";
echo "</script>";
?>
<script src="/plugins/dragula/dragula.min.js"></script>
<script src="/js/tickets_kanban.js"></script>
<script src="plugins/dragula/dragula.min.js"></script>
<script src="js/tickets_kanban.js"></script>