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
<field name="filter_evento" type="sql" | |
query="SELECT '' AS `id`, '- Selecionar Evento -' AS `val` UNION SELECT `id`, `nome` AS val FROM `#__eventos`" | |
key_field="id" value_field="val" class="inputbox" onchange="this.form.submit()" translate="true"/> |
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
/** | |
* Função para setar elementos previamente selecionadas | |
*/ | |
function setListsOfItem() { | |
js(document).one("ajaxStop", function () { | |
js('input:hidden.listas').each(function () { | |
var name = js(this).attr('name'); | |
if (name.indexOf('listashidden')) { | |
js('#jform_listas option[value="' + js(this).val() + '"]').attr('selected', true); | |
} |
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
<?php | |
$myArray = array(1 => Igor, 2 => Moraes); | |
$string = array_map(function ($key, $value) { | |
return sprintf("('%s', '%s')", $key, $value); | |
}, array_keys($myArray), $myArray | |
); | |
var_dump($string); // (1, Igor), (2, Moraes) |
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
$novaString = str_replace(array('{subtag:mensagem_padrao}', '{subtag:mensagem_custom}'), | |
array($textoFixo, $textoPersonalizado), $minhaString); |
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
/** | |
* Ao clickar no checkbox #check_all irá marcar todos os checkboxes da table mais próxima | |
*/ | |
js(document).on('click', '#check_all', function (e) { | |
var table = js(e.target).closest('table'); | |
js('td input:checkbox', table).prop('checked', this.checked); | |
}); |
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
/** | |
* Marcar os Checkboxes anteriormente selecionados | |
*/ | |
function markResourceColumns(columns) { | |
// Executando apenas uma vez a espera pela finalização dos ajax da página e assim marcar | |
js(document).one("ajaxStop", function () { | |
js.each(columns, function (i, val) { | |
js("input[value='" + val + "']").prop('checked', true); | |
}); | |
}); |
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
/** | |
* Carregar os checkboxes dos Resources (WS) | |
* @param data = as colunas da tabela, vindas do banco de dados | |
*/ | |
function loadColumnsCheckboxes(data) { | |
clearSelectbox('#jform_columns', '---', '#jform_table'); | |
columns = data.data[0]; | |
if (columns == false) { | |
js("#jform_columns").append('<option value="">Unloaded data</option>'); | |
} else { |
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
/*Trigger para INSERT */ | |
DELIMITER $$ | |
CREATE TRIGGER onINSERTanmt_associados | |
AFTER UPDATE ON anmt_associados | |
FOR EACH ROW | |
BEGIN | |
IF ((SELECT `state` FROM anmt_restful_external_senders WHERE `table` = 'anmt_associados') = 1) THEN | |
INSERT INTO anmt_restful_extsender_logs (resource, id_resource_element, change_time, method, request_sent) | |
VALUES ('anmt_associados', NEW.id, NOW(), 'INSERT', 0); | |
END IF; |
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
var str = 'Anamatra Eventos Conamat'; | |
alert(str.replace(/\s/g," e ")); |
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
<?php JFilterOutput::stringURLSafe($string); |
OlderNewer