2010-12-02 23:34:41 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2014-04-21 10:21:01 -04:00
|
|
|
<dynaForm name="triggers_Edit" type="xmlform" width="100%" labelWidth="2px" enableTemplate="1">
|
|
|
|
|
<PRO_UID type="hidden"/>
|
|
|
|
|
<TRI_UID type="hidden"/>
|
|
|
|
|
<TRI_TYPE type="hidden"/>
|
|
|
|
|
<STEP_UID type="hidden"/>
|
|
|
|
|
<ST_TYPE type="hidden"/>
|
|
|
|
|
<TRI_WEBBOT type="textareapm" class="formLabel" cols="115" rows="28" width="100%" height="380px" showVars="1" process="@#PRO_UID">
|
2010-12-02 23:34:41 +00:00
|
|
|
</TRI_WEBBOT>
|
2014-04-21 10:21:01 -04:00
|
|
|
<BTN_CANCEL type="button" onclick="cancel();">
|
|
|
|
|
<en><![CDATA[Cancel]]></en>
|
|
|
|
|
</BTN_CANCEL>
|
|
|
|
|
<SAVE type="button" onclick="document.getElementById('form[TRI_WEBBOT]').value = triggerEditor.getValue(); triggerSave1(this.form);">
|
|
|
|
|
<en><![CDATA[Save]]></en>
|
|
|
|
|
</SAVE>
|
|
|
|
|
<JS type="JavaScript"><![CDATA[
|
2011-01-19 15:36:31 +00:00
|
|
|
|
2013-04-02 09:39:03 -04:00
|
|
|
CodeMirror.commands.autocomplete = function(cm) {
|
|
|
|
|
CodeMirror.showHint(cm, CodeMirror.phpHint);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var triggerEditor = CodeMirror.fromTextArea(document.getElementById("form[TRI_WEBBOT]"), {
|
|
|
|
|
lineNumbers: true,
|
|
|
|
|
matchBrackets: true,
|
2014-12-05 14:17:18 -04:00
|
|
|
mode: "application/x-httpd-php-open",
|
2013-04-02 09:39:03 -04:00
|
|
|
PMEnabled: true,
|
|
|
|
|
indentUnit: 2,
|
|
|
|
|
indentWithTabs: false,
|
|
|
|
|
extraKeys: {"Ctrl-Space": "autocomplete"}
|
|
|
|
|
});
|
2013-04-19 12:01:46 -04:00
|
|
|
triggerEditor.setSize(890, 440);
|
2013-03-22 15:52:26 -04:00
|
|
|
|
2011-01-19 15:36:31 +00:00
|
|
|
var _oVarsPanel_;
|
|
|
|
|
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
|
|
|
|
|
_oVarsPanel_ = new leimnud.module.panel();
|
|
|
|
|
_oVarsPanel_.options = {
|
|
|
|
|
limit : true,
|
2012-11-28 21:20:41 +00:00
|
|
|
size : {w:600,h:420},
|
2011-01-19 15:36:31 +00:00
|
|
|
position : {x:0,y:0,center:true},
|
|
|
|
|
title : '',
|
|
|
|
|
theme : 'processmaker',
|
|
|
|
|
statusBar: false,
|
|
|
|
|
control : {drag:false,resize:true,close:true},
|
|
|
|
|
fx : {opacity:true,rolled:false,modal:true}
|
|
|
|
|
};
|
|
|
|
|
_oVarsPanel_.make();
|
|
|
|
|
_oVarsPanel_.events = {
|
|
|
|
|
remove:function() {
|
|
|
|
|
delete _oVarsPanel_;
|
|
|
|
|
}.extend(this)
|
|
|
|
|
};
|
|
|
|
|
_oVarsPanel_.loader.show();
|
|
|
|
|
oRPC = new leimnud.module.rpc.xmlhttp({
|
|
|
|
|
url : sAjaxServer,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
args : 'sFieldName=' + sFieldName + '&sProcess=' + sProcess + '&sSymbol=' + sSymbol
|
|
|
|
|
});
|
|
|
|
|
oRPC.callback = function(oRPC) {
|
|
|
|
|
_oVarsPanel_.loader.hide();
|
|
|
|
|
var scs = oRPC.xmlhttp.responseText.extractScript();
|
|
|
|
|
_oVarsPanel_.addContent(oRPC.xmlhttp.responseText);
|
|
|
|
|
scs.evalScript();
|
|
|
|
|
}.extend(this);
|
|
|
|
|
oRPC.make();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var insertFormVar = function(sFieldName, sValue) {
|
2013-04-02 09:39:03 -04:00
|
|
|
if (triggerEditor.getSelection() == "") {
|
|
|
|
|
triggerEditor.replaceRange(sValue, triggerEditor.getCursor());
|
2013-03-22 15:52:26 -04:00
|
|
|
} else {
|
|
|
|
|
triggerEditor.replaceSelection(sValue);
|
|
|
|
|
}
|
|
|
|
|
_oVarsPanel_.remove();
|
|
|
|
|
triggerEditor.focus();
|
2011-01-19 15:36:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function cancel(){
|
2014-01-07 14:35:54 -04:00
|
|
|
if(opener) {
|
|
|
|
|
opener.windowCode[document.getElementById('form[TRI_UID]').value] = false;
|
|
|
|
|
}
|
BUG-12604-12174-13122 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 el visualización simplemente se pierde y solo se puede recuperar haciendo un click sobre el area.
2013-11-08 17:39:53 -04:00
|
|
|
window.close();
|
2011-01-19 15:36:31 +00:00
|
|
|
}
|
2014-01-07 14:35:54 -04:00
|
|
|
window.onbeforeunload=function(){
|
|
|
|
|
if(opener) {
|
|
|
|
|
opener.windowCode[document.getElementById('form[TRI_UID]').value] = false;
|
|
|
|
|
}
|
|
|
|
|
};
|
2011-01-19 15:36:31 +00:00
|
|
|
|
2014-11-19 16:47:22 -04:00
|
|
|
function triggerSave1(form)
|
|
|
|
|
{
|
|
|
|
|
ajax_post(
|
|
|
|
|
form.action,
|
|
|
|
|
form,
|
|
|
|
|
"POST",
|
|
|
|
|
function (responseText)
|
|
|
|
|
{
|
|
|
|
|
var dataResponse = eval("(" + responseText + ")"); //json
|
|
|
|
|
|
|
|
|
|
if (dataResponse.success) {
|
|
|
|
|
if (opener) {
|
|
|
|
|
if (@QSTEP_UID != "" && @QST_TYPE != "" && opener.showTriggers) {
|
|
|
|
|
opener.showTriggers(@QSTEP_UID, @QST_TYPE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (opener.reloadTriggersShortList) {
|
|
|
|
|
opener.reloadTriggersShortList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.close();
|
|
|
|
|
} else {
|
|
|
|
|
new leimnud.module.app.alert().make({
|
|
|
|
|
label: dataResponse.msg
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
true
|
|
|
|
|
);
|
BUG-12604-12174-13122 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 el visualización simplemente se pierde y solo se puede recuperar haciendo un click sobre el area.
2013-11-08 17:39:53 -04:00
|
|
|
}
|
2014-11-19 16:47:22 -04:00
|
|
|
]]>
|
|
|
|
|
</JS>
|
2014-04-21 10:21:01 -04:00
|
|
|
</dynaForm>
|
2014-11-19 16:47:22 -04:00
|
|
|
|