Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updade application/views/arquivos.php #2228

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion application/views/arquivos/arquivos.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
<td><?= $r->idDocumentos ?></td>
<td>
<?php if (@getimagesize($r->path)) : ?>
<a href="<?= $r->url ?>"> <img src="<?= $r->url ?> "></a>
<a href="#" class="miniatura-link" data-miniatura-url="<?= $r->url ?>">
<img src="<?= $r->url ?>" class="miniatura-imagem">
<?php else : ?>
<span>-</span>
<?php endif ?>
Expand Down Expand Up @@ -89,6 +90,35 @@
</div>
</div>
</div>
<!-- Modal Visualizar imagem -->
<div id="modal-miniatura" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h5 id="myModalLabel">Visualizr</h5>
</div>
<div class="modal-body">
<img id="miniatura-grande" src="" alt="Miniatura" style="max-width: 100%; height: auto;">
</div>
</div>

<script type="text/javascript">
$(document).ready(function() {
// Adicione um evento de clique nas miniaturas
$(document).on('click', 'a.miniatura-link', function(event) {
event.preventDefault();
var miniaturaUrl = $(this).attr('data-miniatura-url');
$('#miniatura-grande').attr('src', miniaturaUrl);
$('#modal-miniatura').modal('show');
});

$(".datepicker").datepicker({
dateFormat: 'dd/mm/yy'
});
});
</script>




<?= $this->pagination->create_links() ?>

Expand Down
Loading