2010-12-02 23:34:41 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<dynaForm name="triggers_Edit" type="xmlform" width="100%" labelWidth="2px" enableTemplate="1" >
|
|
|
|
|
|
|
|
|
|
<PRO_UID type="hidden"/>
|
|
|
|
|
|
|
|
|
|
<TRI_UID type="hidden"/>
|
|
|
|
|
|
|
|
|
|
<TRI_TYPE type="hidden"/>
|
|
|
|
|
|
2013-11-28 17:05:58 -04:00
|
|
|
<STEP_UID type="hidden"/>
|
|
|
|
|
|
|
|
|
|
<ST_TYPE type="hidden"/>
|
|
|
|
|
|
2012-10-16 13:22:43 +00:00
|
|
|
<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>
|
|
|
|
|
|
2011-01-19 15:36:31 +00:00
|
|
|
<BTN_CANCEL type="button" onclick="cancel();">
|
|
|
|
|
<en>Cancel</en>
|
|
|
|
|
</BTN_CANCEL>
|
|
|
|
|
|
2013-04-02 09:39:03 -04:00
|
|
|
<SAVE type="button" onclick="document.getElementById('form[TRI_WEBBOT]').value = triggerEditor.getValue();
|
|
|
|
|
triggerSave1(this.form);">
|
2010-12-02 23:34:41 +00:00
|
|
|
<en>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,
|
|
|
|
|
mode: "application/x-httpd-php",
|
|
|
|
|
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
|
|
|
|
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
|
|
|
function triggerSave1(form){
|
|
|
|
|
ajax_post(form.action, form, 'POST');
|
2013-12-05 13:41:36 -04:00
|
|
|
if(opener) {
|
|
|
|
|
if(@QSTEP_UID!="" && @QST_TYPE!="" && opener.showTriggers)
|
|
|
|
|
opener.showTriggers(@QSTEP_UID,@QST_TYPE);
|
|
|
|
|
if(opener.reloadTriggersShortList)
|
|
|
|
|
opener.reloadTriggersShortList();
|
|
|
|
|
}
|
2013-11-28 17:05:58 -04:00
|
|
|
window.close();
|
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
|
|
|
}
|
|
|
|
|
|
2010-12-02 23:34:41 +00:00
|
|
|
]]></JS>
|
2013-03-22 15:52:26 -04:00
|
|
|
</dynaForm>
|