2010-12-02 23:34:41 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm type= "xmlmenu" >
2013-05-02 16:16:09 -04:00
<MNU_ADD type= "link" value= '' link= "#" onclick= "if('@%PARTNER_FLAG' == '' || '@%PARTNER_FLAG' == 0) { triggerFromLibrary(); } else { triggerNewCustom(); } return false;" colAlign= "left" colWidth= "100" >
2010-12-02 23:34:41 +00:00
<en > New</en>
</MNU_ADD>
<PRO_UID type= "private" />
2013-05-02 16:16:09 -04:00
<PARTNER_FLAG type= "private" />
2012-09-28 12:07:28 -04:00
<FIELDS_REQUIRED type= "private" />
2010-12-02 23:34:41 +00:00
<triggersEdit type= "private" defaultValue= "../triggers/triggers_Edit" />
<triggersEditCustom type= "private" defaultValue= "../triggers/triggers_EditCustom" />
2012-11-07 16:59:48 -04:00
<triggerCopy type= "private" defaultValue= "../triggers/triggerCopy" />
2010-12-02 23:34:41 +00:00
<triggersDelete type= "private" defaultValue= "../triggers/triggers_Delete" />
<triggersProperties type= "private" defaultValue= "../triggers/triggersProperties" />
<triggersOptionList type= "private" defaultValue= "../triggers/triggersTree" />
<triggerNewWizard type= "private" defaultValue= "../triggers/triggers_CreateWizard" />
<triggerNewTalend type= "private" defaultValue= "../triggers/triggers_CreateTalend" />
<triggerNewGoogleWebContent type= "private" defaultValue= "../triggers/triggers_CreateGoogleWebContent" />
<triggerNewGoogleCreateEvent type= "private" defaultValue= "../triggers/triggers_CreateGoogleEvent" />
2012-11-07 16:59:48 -04:00
<PAGED_TABLE_ID type= "private" />
2011-10-31 12:01:42 -04:00
<PAGED_TABLE_FAST_SEARCH type= "FastSearch" label= "@G::LoadTranslation(ID_SEARCH)" />
2010-12-02 23:34:41 +00:00
<JS type= "javascript" replaceTags= "1" >
< ![CDATA[
2012-11-07 16:59:48 -04:00
var windowWidth = 600;
var windowHeight = 460;
2010-12-02 23:34:41 +00:00
function triggerEditWizardSource (sUID){
2013-11-28 17:05:58 -04:00
window.open('@G::encryptlink(@#triggersEdit)?TRI_UID='+ sUID +'& BYPASS=1','@G::LoadTranslation(ID_EDIT_TRIGGERS)'.replace(/\s/g,'_')+(function(s){var r='';for(var i in s)if(typeof s[i]=='string')r+=s[i].charCodeAt(0);return r;})(document.cookie)+sUID,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=950,height=570,top='+((screen.height-570)/2)+',left='+((screen.width-950)/2)).focus();
2010-12-02 23:34:41 +00:00
}
function triggerNew() {
popupWindow('@G::LoadTranslation(ID_NEW_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?PRO_UID=@%PRO_UID' , 600, 340);
}
2012-11-07 16:59:48 -04:00
function triggerNewCustom()
{
popupWindow("@G::LoadTranslation(ID_NEW_TRIGGERS)", "@G::encryptlink(@#triggersEditCustom)?PRO_UID=@%PRO_UID" , windowWidth, windowHeight);
2010-12-02 23:34:41 +00:00
}
2012-11-07 16:59:48 -04:00
function triggerCopy()
{
BUG-12604-12174-13122 SOLVED Problema de despliegue de contenido de la librería CodeMirror cuando se usa el navegador Internet Explorer 8, 9, 10, en la sección '/DESIGNER/', dbl-click al seleccionar un proceso, opción TRIGGERS, opciónes: 'New / Custom Trigger', 'New / Copy & Import Trigger from a Process', Edit. Todo el campo de visualización se comporta de manera anormal, y los scrolls horizontal y vertical se pierden, en otros casos cuando el contenido es muy largo la visualización simplemente se pierde y solo se puede recuperar haciendo click sobre el área nuevamente.
2013-11-11 12:06:00 -04:00
popupWindow("@G::LoadTranslation(ID_TRIGGER_COPY_TITLE)", "@G::encryptlink(@#triggerCopy)?PRO_UID=@%PRO_UID" , 900, 460);
2012-11-07 16:59:48 -04:00
}
2010-12-02 23:34:41 +00:00
function triggerFromLibrary() {
2012-11-07 16:59:48 -04:00
popupWindow('@G::LoadTranslation(ID_NEW_TRIGGERS)', '@G::encryptlink(@#triggersOptionList)?PRO_UID=@%PRO_UID' , 600, 460);
2012-05-10 09:19:40 -04:00
if (navigator.appName != "Microsoft Internet Explorer") {
try {
var oAllPs = document.querySelectorAll("div.panel_content___processmaker");
2012-11-07 16:59:48 -04:00
oAllPs[3].style.height = "410px";
2012-05-10 09:19:40 -04:00
}
catch(e) {
// nothing to do
}
}
2010-12-02 23:34:41 +00:00
}
2012-11-07 16:59:48 -04:00
2014-01-07 14:35:54 -04:00
var windowCode = new Array();
2013-11-28 17:05:58 -04:00
function triggerEdit( sUID, modified) {
if(parseInt(modified) == 0){
2014-01-07 14:35:54 -04:00
if ( !windowCode[sUID] ) {
var windowOpen = window.open('@G::encryptlink(@#triggersEdit)?TRI_UID='+ sUID,'@G::LoadTranslation(ID_EDIT_TRIGGERS)'.replace(/\s/g,'_')+(function(s){var r='';for(var i in s)if(typeof s[i]=='string')r+=s[i].charCodeAt(0);return r;})(document.cookie)+sUID,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=950,height=570,top='+((screen.height-570)/2)+',left='+((screen.width-950)/2));
windowOpen.focus();
windowCode[sUID]=windowOpen;
} else {
windowCode[sUID].focus();
}
2013-11-27 12:59:32 -04:00
} else {
2013-11-28 17:05:58 -04:00
popupWindow('@G::LoadTranslation(ID_EDIT_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?TRI_UID='+ sUID, 930, 600);
2013-11-27 12:59:32 -04:00
}
2010-12-02 23:34:41 +00:00
}
function triggerProperties( sUID ) {
2012-05-10 09:19:40 -04:00
popupWindow('@G::LoadTranslation(ID_TRIGGERS)', '@G::encryptlink(@#triggersProperties)?TRI_UID='+ sUID , 600, 340);
2010-12-02 23:34:41 +00:00
}
2012-11-07 16:59:48 -04:00
2010-12-02 23:34:41 +00:00
function triggerPropertiesSave( form ) {
2012-11-07 16:59:48 -04:00
var doc = getField("OUT_DOC_FILENAME");
2010-12-02 23:34:41 +00:00
if(doc.value=='')
{ alert(G_STRINGS.ID_FILEGENERATED);
}
2012-11-07 16:59:48 -04:00
else
2010-12-02 23:34:41 +00:00
{ ajax_post( form.action, form, 'POST' );
currentPopupWindow.remove();
@#PAGED_TABLE_ID.refresh();
2012-11-07 16:59:48 -04:00
}
}
2010-12-02 23:34:41 +00:00
function triggerSave(form)
{
2012-09-28 12:07:28 -04:00
var triUid = "";
if(document.getElementById('TRI_UID')) {
var triUid = document.getElementById('TRI_UID').value;
}
2013-01-23 10:32:34 -04:00
var triTitle = document.getElementById('TRI_TITLE').value;
2013-01-03 14:51:24 -04:00
triTitle = triTitle.replace(/^\s*|\s*$/g,"");
if (triTitle == '') {
2013-01-23 10:32:34 -04:00
document.getElementById('TRI_TITLE').focus();
alert(G_STRINGS.ID_REQUIRED_NAME_TRIGGERS);return false;
2012-09-28 12:07:28 -04:00
}
2013-01-03 14:51:24 -04:00
document.getElementById('TRI_TITLE').value = triTitle;
2012-09-28 12:07:28 -04:00
var fieldsRequired = document.getElementById('FIELDS_REQUIRED').value;
fieldsRequired = fieldsRequired.split(",");
for (i=0; i<fieldsRequired.length ; i + + )
{
var field = document.getElementById(fieldsRequired[i]).value;
2013-01-23 10:32:34 -04:00
field = field.replace(/^\s*|\s*$/g,"");
2012-09-28 12:07:28 -04:00
if (field == '') {
2013-01-23 10:32:34 -04:00
document.getElementById(fieldsRequired[i]).focus();
2012-09-28 12:07:28 -04:00
alert(_('ID_REQUIRED_FIELDS_ERROR'));return false;
}
2013-01-23 10:32:34 -04:00
document.getElementById(fieldsRequired[i]).value = field;
2012-09-28 12:07:28 -04:00
}
if(triUid==''){
2012-11-07 16:59:48 -04:00
reqName=ajax_function("../triggers/triggers_Save",'lookforNameTrigger','NAMETRIGGER='+encodeURIComponent(triTitle)+'& proUid='+(document.getElementById('PRO_UID').value),'POST') ;
2012-09-28 12:07:28 -04:00
if(!reqName){
alert(G_STRINGS.ID_EXIST_TRIGGERS);return false;
}else{
ajax_post(form.action, form, 'POST');
currentPopupWindow.remove();
@#PAGED_TABLE_ID.refresh();
}
2011-01-19 15:27:17 +00:00
}else{
2012-10-16 13:22:43 +00:00
ajax_post(form.action, form, 'POST');
currentPopupWindow.remove();
@#PAGED_TABLE_ID.refresh();
2010-12-02 23:34:41 +00:00
}
2011-01-17 13:53:45 +00:00
}
2012-11-07 16:59:48 -04:00
//with this function, we are removing the spaces after and before of a string
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "");
2011-03-23 11:20:10 -04:00
};
2011-01-17 13:53:45 +00:00
//for trigger no wizard
function triggerSave1(form)
{
2012-11-07 16:59:48 -04:00
var triUid = "";
2011-01-19 15:27:17 +00:00
if(getField('TRI_UID')) {
2011-01-17 13:53:45 +00:00
var triUid = getField('TRI_UID').value;
2012-11-07 16:59:48 -04:00
}
if(triUid==''){
var triTitle =getField('TRI_TITLE').value.trim();
2011-01-17 13:53:45 +00:00
if(triTitle==''){
alert(G_STRINGS.ID_REQUIRED_NAME_TRIGGERS);return false;
2012-11-07 16:59:48 -04:00
}
2011-01-17 13:53:45 +00:00
reqName=ajax_function("../triggers/triggers_Save",'lookforNameTrigger','NAMETRIGGER='+encodeURIComponent(triTitle)+'& proUid='+(getField('PRO_UID').value),'POST') ;
if(!reqName){
alert(G_STRINGS.ID_EXIST_TRIGGERS);return false;
2010-12-02 23:34:41 +00:00
}else{
2011-01-17 13:53:45 +00:00
ajax_post(form.action, form, 'POST');
currentPopupWindow.remove();
@#PAGED_TABLE_ID.refresh();
}
2011-01-19 15:27:17 +00:00
}else{
2010-12-02 23:34:41 +00:00
ajax_post(form.action, form, 'POST');
currentPopupWindow.remove();
@#PAGED_TABLE_ID.refresh();
}
}
2011-01-17 13:53:45 +00:00
//end for trigger no wirzard
2010-12-02 23:34:41 +00:00
function triggerDelete(sUID) {
var validateResult;
2012-11-07 16:59:48 -04:00
2010-12-02 23:34:41 +00:00
oRPC = XHRequest();
oRPC.options = {
url : '../triggers/triggers_Ajax',
method: 'POST',
args : 'request=verifyDependencies& TRI_UID='+sUID
}
oRPC.callback = function(response) {
try{
validateResult = eval("(" + response.xmlhttp.responseText + ")");
if(validateResult.code != 0) {
alert(validateResult.message + G_STRINGS.ID_TRIGGERS_VALIDATE_EERR1);
} else {
new leimnud.module.app.confirm().make({
label:'@G::LoadTranslation(ID_MSG_CONFIRM_DELETE_TRIGGER)',
action:function(){
ajax_function('@G::encryptlink(@#triggersDelete)', '', 'TRI_UID=' + sUID, 'POST');
@#PAGED_TABLE_ID.refresh();
}.extend(this)
});
}
} catch(e){
alert("Unreachable response=> "+ response.xmlhttp.responseText);
}
}.extend(this);
oRPC.make();
}
2012-11-07 16:59:48 -04:00
2012-10-16 13:22:43 +00:00
function triggerNewWizard(nameFunction, library) {//alert('@G::encryptlink(@#triggerNewWizard)?PRO_UID=@%PRO_UID& NAME_FUN='+nameFunction+'& PARAMETERS_FUN='+parametersFunct+'& PAGED_TABLE_ID='+@#PAGED_TABLE_ID);return;
2010-12-02 23:34:41 +00:00
popupWindow('@G::LoadTranslation(ID_NEW_TRIGGERS)', '@G::encryptlink(@#triggerNewWizard)?PRO_UID=@%PRO_UID& NAME_FUN='+nameFunction+'& LIBRARY='+library+'& PAGED_TABLE_ID='+@#PAGED_TABLE_ID , 600, 600);
}
2013-11-28 17:05:58 -04:00
function reloadTriggersShortList(){
//@#PAGED_TABLE_ID.refresh();
if(Pm.panels.buildingBlocks){
Pm.data.render.buildingBlocks.injector('triggers');
}
}
2012-11-07 16:59:48 -04:00
2010-12-02 23:34:41 +00:00
]]>
</JS>
<!-- Default Search option -->
<!-- <MNU_SEARCH type="link" value='' link="#" onclick="showHideSearch('@#SEARCH_FILTER_FORM',this);return false;" colAlign="right" colWidth="130">
<en > Advanced Search</en>
</MNU_SEARCH> -->
<SEARCH_FILTER_FORM type= "private" />
2012-10-16 13:22:43 +00:00
</dynaForm>