-
-
Save wilcorrea/1a0c930dab354cea4db43a1723ecf9ce to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* @param {string} id | |
* @param {string} form | |
*/ | |
function Gerador (id, form) | |
{ | |
this.__id = id | |
this.__form = form || 'formUsuario' | |
/** | |
* @param {string} hidden | |
* @param {string} page | |
* @param {string} div | |
* @param {boolean} clear | |
*/ | |
this.gerarGrid = function(hidden, page, div, clear) { | |
const $element = $(this.__id) | |
$element.val(hidden); | |
this.gerarGridJSON(this.__form, page, div); | |
if (clear) { | |
$element.val(''); | |
} | |
} | |
/** | |
*/ | |
this.gerarGridAcesso() { | |
this.gerarGrid('searchACE', 'transactionAcesso.php', 'div_manutencao_acesso', true) | |
} | |
/** | |
*/ | |
this.gerarGridDocumentosPendentes() { | |
this.gerarGrid('searchUXD', 'transactionUsuariosxDocumentoPendente.php', 'div_manutencao_pendente') | |
} | |
/* ... */ | |
} | |
const gerador = new Gerador('#hdn_metodo_search') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment