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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <script src="http://code.jquery.com/jquery-2.0.2.min.js"></script> | |
| <script> | |
| jQuery(document).ready(function($) { | |
| $('.produtos input').change(function () { | |
| var total = $(this).closest('div').find('.quantidade').val() * $(this).closest('.produtos').find('.valor').val(); | |
| $(this).closest('.produtos').find('.resultado').val(total); |
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
| <?php | |
| // esta classe contém mais linhas, limpei ela só para servir de exemplo... | |
| namespace Base\Controller; | |
| abstract class CrudController extends AbstractActionController { | |
| public function indexAction(){ | |
| $registros = array(); | |
| /* no meu caso eu recebo o $this->grid['campos] de outro controller | |
| mas isso poderia ser resolvido desta forma $capmosGrid = array('id','nome','email') |
NewerOlder