303
| <![CDATA[<script type="text/javascript">
apex.da.initDaEventList = function(){
apex.da.gEventList = [
{"triggeringElementType":"ITEM","triggeringElement":"P101_BIT_DOC","conditionElement":"P101_BIT_DOC","triggeringConditionType":"NOT_EQUALS","triggeringExpression":"0","bindType":"bind","bindEventType":"change","anyActionsFireOnInit":true,actionList:[{"eventResult":false,"executeOnPageInit":true,"stopExecutionOnError":true,"affectedElementsType":"REGION","affectedRegionId":"R45995939929524301",javascriptFunction:apex.da.hide,"attribute01":"N","action":"NATIVE_HIDE"},{"eventResult":true,"executeOnPageInit":true,"stopExecutionOnError":true,"affectedElementsType":"REGION","affectedRegionId":"R45995939929524301",javascriptFunction:apex.da.show,"attribute01":"N","action":"NATIVE_SHOW"}]},
{"conditionElement":"P101_BIT_DOC","bindEventType":"ready","anyActionsFireOnInit":false,actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,"waitForResult":true,javascriptFunction:apex.da.executePlSqlCode,"ajaxIdentifier":"6AjSX6DrlGMLKw4hSdxow22KMXjtHh72tsD3m8XvoQQ","attribute01":"#DOMINIO_USUARIO","attribute04":"N","action":"NATIVE_EXECUTE_PLSQL_CODE"},{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,"waitForResult":true,javascriptFunction:apex.da.executePlSqlCode,"ajaxIdentifier":"6AjSX6DrlGMLKw4hSdxowz_0B4df1foVwTG48UGPPFA","attribute04":"N","action":"NATIVE_EXECUTE_PLSQL_CODE"}]},
{"conditionElement":"ID_ENTIDADE","triggeringConditionType":"NULL","bindEventType":"ready","anyActionsFireOnInit":true,actionList:[{"eventResult":false,"executeOnPageInit":true,"stopExecutionOnError":true,"affectedElementsType":"REGION","affectedRegionId":"report",javascriptFunction:apex.da.show,"attribute01":"N","action":"NATIVE_SHOW"},{"eventResult":true,"executeOnPageInit":true,"stopExecutionOnError":true,"affectedElementsType":"REGION","affectedRegionId":"report",javascriptFunction:apex.da.hide,"attribute01":"N","action":"NATIVE_HIDE"}]},
{"triggeringElementType":"BUTTON","triggeringButtonId":"btn_login","conditionElement":"ID_ENTIDADE","bindType":"bind","bindEventType":"click","anyActionsFireOnInit":false,actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,"waitForResult":true,javascriptFunction:apex.da.executePlSqlCode,"ajaxIdentifier":"gzjmvnY_Wb6nSbMSepXxaQT65VfQNKwwRjFV_S9WU2M","attribute01":"#P101_USERNAME,#P101_PASSWORD","attribute02":"#P101_HOLD_LOGIN","attribute04":"N","action":"NATIVE_EXECUTE_PLSQL_CODE"},{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){ var json = $v(P101_HOLD_LOGIN);
//Parse
var obj = JSON.parse(json);
//Esse WS está retonando os dados de uma maneira aninhada (chamado Neasted), associei o parse já lendo a linha JSON para que o WS retorne apenas do "Funcionario pra frente
json = obj["Json"];
//Novamente utilizo o parse, assim ele reconhece minha variável como um JSON;
obj = JSON.parse(json);
console.log(obj["Funcionario"]['Matricula']);
//Atribuo o valor do campo "Nome" ao Campo em tela, caso queria outro valor do WS apenas trocar o valor da variavel declarada no começo do código
apex.item(P101_MATRICULA).setValue(obj["Funcionario"]['Matricula']);
apex.item(CODEMPRESA).setValue(obj["Funcionario"]['Empresa']);
apex.item(P101_TROCARSENHA).setValue(obj["Funcionario"]['TrocarSenha']);
},"action":"NATIVE_JAVASCRIPT_CODE"}]},
{"triggeringElementType":"ITEM","triggeringElement":"P101_TROCARSENHA","conditionElement":"P101_TROCARSENHA","triggeringConditionType":"EQUALS","triggeringExpression":"true","bindType":"bind","bindEventType":"change","anyActionsFireOnInit":false,actionList:[{"eventResult":false,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:apex.da.submitPage,"attribute02":"Y","action":"NATIVE_SUBMIT_PAGE"},{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,"waitForResult":true,javascriptFunction:apex.da.executePlSqlCode,"ajaxIdentifier":"bAd1-U21Os68Vdk3oeADfqCzJt14hGV-TWpunVmLR38","attribute01":"#CODEMPRESA","attribute02":"#CODEMPRESA","attribute04":"N","action":"NATIVE_EXECUTE_PLSQL_CODE"},{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){ openModal('alterar_senha');
},"action":"NATIVE_JAVASCRIPT_CODE"}]},
{"triggeringElementType":"BUTTON","triggeringButtonId":"B156875344579618950","conditionElement":"P101_TROCARSENHA","bindType":"bind","bindEventType":"click","anyActionsFireOnInit":false,actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){ var novasenha = $v("P101_NOVASENHA");
var confirmanovasenha = $v("P101_CONFIRMARSENHA");
var senhaatual = $v("P101_SENHAATUAL");
var password = $v("P101_PASSWORD");
if (novasenha == confirmanovasenha) {
apex.server.process (
'ALTERA SENHA'
, { pageItems: "#P101_MATRICULA,#P101_USERNAME,#P101_SENHAATUAL,#P101_CONFIRMARSENHA,#ID_ENTIDADE,#P101_NOVASENHA"}
, { dataType: 'text'
, success: function(pData){
if (senhaatual == password) {
closeModal('alterar_senha');
apex.message.showPageSuccess( "Senha alterada com sucesso!" );
apex.item( "P101_PASSWORD" ).setValue(null);
} else {
apex.message.clearErrors();
apex.message.showErrors([
{
type: "error",
location: "inline",
pageItem: "P101_SENHAATUAL",
message: "Senha atual inválida",
}])}
}
});
}
else {
apex.message.clearErrors();
apex.message.showErrors([
{
type: "error",
location: "inline",
pageItem: "P101_CONFIRMARSENHA",
message: "A senha digitada deve ser a mesma informada no campo Nova Senha!",
}])};
},"action":"NATIVE_JAVASCRIPT_CODE"}]},
{"triggeringElementType":"BUTTON","triggeringButtonId":"esquecisenha","conditionElement":"P101_TROCARSENHA","bindType":"bind","bindEventType":"click","anyActionsFireOnInit":false,actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){ apex.item( "P101_CPF" ).setValue(null);
apex.message.clearErrors();
openModal('esqueci_senha');
},"action":"NATIVE_JAVASCRIPT_CODE"}]},
{"triggeringElementType":"BUTTON","triggeringButtonId":"B158367592782948240","conditionElement":"P101_TROCARSENHA","bindType":"bind","bindEventType":"click","anyActionsFireOnInit":false,actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,"waitForResult":true,javascriptFunction:apex.da.executePlSqlCode,"ajaxIdentifier":"E0ixb-op8TJRZ28VvG9zYkwhwnBksmRTg7r-l2fsgwQ","attribute01":"#P101_CPF","attribute02":"#P101_HOLD_RECSENHA","attribute04":"N","action":"NATIVE_EXECUTE_PLSQL_CODE"},{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){ var json = $v(P101_HOLD_RECSENHA);
//Parse
var obj = JSON.parse(json);
var retornoerro = (obj["FriendlyErrorMessage"]);
var status = (obj["Successfully"]);
var retornosucess = (obj["Json"]);
if (status == true) {
closeModal('esqueci_senha');
apex.message.showPageSuccess(retornosucess);
}else {
apex.message.clearErrors();
apex.message.showErrors([
{
type: "error",
location: "inline",
pageItem: "P101_CPF",
message: retornoerro,
}]);
}
},"action":"NATIVE_JAVASCRIPT_CODE"}]},
{"triggeringElementType":"BUTTON","triggeringButtonId":"B159019509869557903","conditionElement":"P101_TROCARSENHA","bindType":"bind","bindEventType":"click","anyActionsFireOnInit":false,actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){ openModal('info_esquecisenha');
},"action":"NATIVE_JAVASCRIPT_CODE"}]},
{"conditionElement":"P101_TROCARSENHA","bindEventType":"ready","anyActionsFireOnInit":false,actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){ let ajuda = $v('P101_AJUDA');
$('#minhaDiv').html(ajuda);
},"action":"NATIVE_JAVASCRIPT_CODE"}]}];
}
</script>]]>
|
448
| <![CDATA[<script type="text/javascript">
apex.jQuery( document ).ready( function() {
(function(){
var lTimeoutField = document.getElementById("apex_login_throttle_sec"),
lTimeout = lTimeoutField ? +lTimeoutField.innerHTML : 0;
if (lTimeout) {
var lTimer = window.setInterval (
function() {
if (lTimeout > 0) {
lTimeoutField.innerHTML = lTimeout;
lTimeout--;
} else {
window.clearInterval(lTimer);
var lDiv = document.getElementById("apex_login_throttle_div");
if (lDiv) {
lDiv.parentNode.removeChild(lDiv);
return true;
}
}
},
1000 );
}})();
(function(){apex.jQuery('#R45996167121524303_ir').interactiveReport({"regionId":"R45996167121524303","toolbar":false,"searchField":true,"columnSearch":true,"rowsPerPageSelect":false,"reportsSelect":true,"actionsMenu":true,"reportViewMode":"REPORT","selectColumns":true,"filter":true,"rowsPerPage":true,"currentRowsPerPage":50,"maxRowsPerPage":"","maxRowCount":"1000000","sort":true,"controlBreak":true,"highlight":true,"compute":true,"aggregate":true,"chart":true,"groupBy":true,"pivot":true,"flashback":true,"saveReport":false,"saveDefaultReport":false,"reset":true,"help":true,"helpLink":"wwv_flow_utilities.show_ir_help?p_app_id=223\u0026p_worksheet_id=45996242700524304\u0026p_lang=pt-br","download":false,"subscription":false,"pagination":true,"saveReportCategory":false,"detailLink":false,"isControlPanelCollapsed":false,"fixedHeader":"PAGE","actionsMenuStructure":"IG","ajaxIdentifier":"umplrxLXp-ppOSKiU_sB4GpKswdVoAWfafYjcH6YDaQ"});})();
(function(){apex.da.initDaEventList();})();
(function(){apex.da.init();})();
apex.theme42.initializePage.appLogin();
apex.item( 'P101_USERNAME' ).setFocus();
});</script>]]>
|