Created
January 14, 2020 12:59
-
-
Save camilamoreiradev/792fb02bb03afb8229c1d2dfc61fc62d to your computer and use it in GitHub Desktop.
Código para um widget dentro do dashboard atualizar o outro widget
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//COLOCAR ESSE CÓDIGO NA GRID QUE IRÁ REALIZAR A ATUALIZAÇÃO DO SEGUNDO WIDGET - ONSCRIPTINIT | |
?> | |
<style> | |
.css_id_label, .css_id_grid_line { | |
display: none; | |
} | |
</style> | |
<script> | |
$(document).ready(function(){ | |
$(".css_nome_grid_line").on("click", function(){ | |
var id = $(this).parent().children().eq(1).find("span").text(), | |
iframe = parent.document.getElementById('id-iframe-1'); | |
iframe.src = '../grid_orcamento/grid_orcamento.php?glo_filter_where=' + id; | |
}); | |
}); | |
</script> | |
<?php | |
//COLOCAR ESSE CÓDIGO NA SEGUNDA GRID, WIDGET QUE SERÁ ATUALIZADO - ONSCRIPTINIT | |
if( !empty([glo_filter_where]) ){ | |
sc_select_where(add) = "where cliente_id = [glo_filter_where]"; | |
} else { | |
sc_select_where(add) = ""; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment