Created
August 7, 2017 21:37
-
-
Save diogoan/81d7828e2c3ab1ba5bfaee837a34af4c 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
//////////////////// Função adaptada para excluir acompanhamento de projeto | |
function delete_acomp(id) { | |
var ret = window.confirm(msgtext("Please_confirm_this_delete_req")); | |
if (!ret) | |
return; | |
var num = id.substr(id.indexOf(":") + 1); | |
var wc = "id=" + num; | |
var query_string = cfgCgi + | |
"?SID=" + cfgSID + | |
"+FID=" + fid_generator() + | |
"+OP=DELETE_RECORD_AJAX+FACTORY=zacompanhamento_projeto"; | |
query_string += "+WHERE_CLAUSE=" + wc; | |
var reply = SyncAjaxCall(query_string); | |
if (reply.substring(0, 2) == "OK") { | |
clear_response(); | |
refreshForm(); | |
} else { | |
show_response(msgtext("An_error_occured_while_trying_13")); | |
} | |
} | |
//////////////////// Função original retirada do arquivo nr_ops.js | |
//////////////////// que é usada na página list_slatpl.htmpl | |
// Delete sdsc event template | |
function delete_slatpl_sdsc(in_sdsc_persid, id) { | |
var ret = window.confirm(msgtext("Please_confirm_this_delete_req")); | |
if (!ret) | |
return; | |
var num = id.substr(id.indexOf(":") + 1); | |
var sdsc_num = in_sdsc_persid.substr(in_sdsc_persid.indexOf(":") + 1); | |
var wc = "id=" + num; | |
var query_string = cfgCgi + | |
"?SID=" + cfgSID + | |
"+FID=" + fid_generator() + | |
"+OP=DELETE_RECORD_AJAX+FACTORY=slatpl"; | |
query_string += "+WHERE_CLAUSE=" + wc; | |
var reply = SyncAjaxCall(query_string); | |
if (reply.substring(0, 2) == "OK") { | |
clear_response(); | |
refreshForm(); | |
} else { | |
show_response(msgtext("An_error_occured_while_trying_13")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment