mirror of https://github.com/itflow-org/itflow
Update and move pretty tables function to a seperate js file and also add img-fluid to <img> tags so images dont run off the page and also update ticket details page with prettyContent function
This commit is contained in:
parent
1a5cd14208
commit
51489c2420
|
|
@ -66,7 +66,7 @@ $document_parent = intval($row['document_parent']);
|
|||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" id="formatTables">
|
||||
<div class="card-body prettyContent">
|
||||
<?php echo $document_content; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -285,14 +285,7 @@ $document_parent = intval($row['document_parent']);
|
|||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function(){
|
||||
let tables = document.querySelectorAll('div#formatTables');
|
||||
tables.forEach(function(table){
|
||||
table.classList.add('table');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script src="js/pretty_content.js"></script>
|
||||
|
||||
<?php
|
||||
|
||||
|
|
@ -304,5 +297,3 @@ require_once("client_document_link_software_modal.php");
|
|||
require_once("client_document_link_vendor_modal.php");
|
||||
require_once("share_modal.php");
|
||||
require_once("footer.php");
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -48,22 +48,14 @@ $document_updated_at = nullable_htmlentities($row['document_updated_at']);
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" id="formatTables">
|
||||
<div class="card-body prettyContent">
|
||||
<?php echo $document_content; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function(){
|
||||
let tables = document.querySelectorAll('div#formatTables');
|
||||
tables.forEach(function(table){
|
||||
table.classList.add('table');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script src="js/pretty_content.js"></script>
|
||||
|
||||
<?php
|
||||
|
||||
require_once("document_template_edit_modal.php");
|
||||
|
||||
require_once("footer.php");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
$(document).ready(function(){
|
||||
// Add class to tables
|
||||
$('div.prettyContent table').addClass('table');
|
||||
|
||||
// Add img-responsive class to img tags
|
||||
$('div.prettyContent img').addClass('img-fluid');
|
||||
});
|
||||
16
ticket.php
16
ticket.php
|
|
@ -269,7 +269,7 @@ if (isset($_GET['ticket_id'])) {
|
|||
<h3 class="card-title text-bold"><?php echo $ticket_subject; ?></h3>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="card-body prettyContent">
|
||||
<?php echo $ticket_details; ?>
|
||||
|
||||
<?php
|
||||
|
|
@ -402,11 +402,13 @@ if (isset($_GET['ticket_id'])) {
|
|||
|
||||
<div class="media-body">
|
||||
<?php echo $ticket_reply_by_display; ?>
|
||||
<br>
|
||||
<small class="text-muted"><?php echo $ticket_reply_created_at; ?> <?php if (!empty($ticket_reply_updated_at)) { echo "modified: $ticket_reply_updated_at"; } ?></small>
|
||||
<br>
|
||||
<div>
|
||||
<small class="text-muted"><?php echo $ticket_reply_created_at; ?> <?php if (!empty($ticket_reply_updated_at)) { echo "modified: $ticket_reply_updated_at"; } ?></small>
|
||||
</div>
|
||||
<?php if ($ticket_reply_type !== "Client") { ?>
|
||||
<small class="text-muted">Time worked: <?php echo date_format($ticket_reply_time_worked, 'H:i:s'); ?></small>
|
||||
<div>
|
||||
<small class="text-muted">Time worked: <?php echo date_format($ticket_reply_time_worked, 'H:i:s'); ?></small>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -435,7 +437,7 @@ if (isset($_GET['ticket_id'])) {
|
|||
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="card-body prettyContent">
|
||||
<?php echo $ticket_reply; ?>
|
||||
|
||||
<?php
|
||||
|
|
@ -823,3 +825,5 @@ if ($ticket_status !== "Closed") { ?>
|
|||
<?php } ?>
|
||||
|
||||
<script src="js/ticket_add_remove_watchers.js"></script>
|
||||
|
||||
<script src="js/pretty_content.js"></script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue