2012-11-07 16:59:48 -04:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2010-12-02 23:34:41 +00:00
|
|
|
<dynaForm name="triggersProperties" type="xmlform" width="100%" labelWidth="20%" enableTemplate="1">
|
|
|
|
|
<PRO_UID type="hidden"/>
|
2012-09-28 12:07:28 -04:00
|
|
|
<FIELDS_REQUIRED type="hidden"/>
|
2010-12-02 23:34:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<TITLE type="title" group="1">
|
|
|
|
|
<en>Trigger Information</en>
|
|
|
|
|
</TITLE>
|
|
|
|
|
<TRI_UID type="hidden"/>
|
|
|
|
|
|
|
|
|
|
<TRI_TITLE type="text" size="80" maxlength="100">
|
|
|
|
|
<en>Title</en>
|
|
|
|
|
</TRI_TITLE>
|
|
|
|
|
<TRI_PARAM type="hidden" value=""/>
|
|
|
|
|
<TRI_TYPE type="hidden"/>
|
|
|
|
|
|
|
|
|
|
<TRI_DESCRIPTION type="textarea" rows="3" cols="77">
|
|
|
|
|
<en>Description</en>
|
|
|
|
|
</TRI_DESCRIPTION>
|
|
|
|
|
|
2012-11-07 16:59:48 -04:00
|
|
|
<TRI_WEBBOT type="textareapm" class="formLabel" cols="55" rows="13" width="100%" height="380px" showVars="1" process="@#PRO_UID">
|
2010-12-02 23:34:41 +00:00
|
|
|
</TRI_WEBBOT>
|
2013-03-25 11:01:48 -04:00
|
|
|
<SAVE type="button" onclick="document.getElementById('form[TRI_WEBBOT]').value = triggerEditor.getCode(); triggerSave1(this.form);">
|
2010-12-02 23:34:41 +00:00
|
|
|
<en>Save</en>
|
|
|
|
|
</SAVE>
|
|
|
|
|
<BTN_CANCEL type="button" onclick="cancel();triggerFromLibrary()">
|
|
|
|
|
<en>Cancel</en>
|
|
|
|
|
</BTN_CANCEL>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<JS type="JavaScript"><![CDATA[
|
2013-03-25 11:01:48 -04:00
|
|
|
var triggerEditor = CodeMirror.fromTextArea('form[TRI_WEBBOT]', {
|
|
|
|
|
height: "220px",
|
|
|
|
|
width: "80%",
|
|
|
|
|
parserfile: ["parsexml.js", "parsecss.js", "tokenizejavascript.js", "parsejavascript.js",
|
|
|
|
|
"../contrib/php/js/tokenizephp.js", "../contrib/php/js/parsephp.js",
|
|
|
|
|
"../contrib/php/js/parsephphtmlmixed.js"],
|
|
|
|
|
stylesheet: ["css/xmlcolors.css", "css/jscolors.css", "css/csscolors.css", "css/phpcolors.css" ],
|
|
|
|
|
path: "js/", lineNumbers: true, continuousScanning: 500, parserConfig: { phpOnly:true} });
|
|
|
|
|
|
2010-12-02 23:34:41 +00:00
|
|
|
getField('TRI_TITLE').form.onsubmit = function() {return false;};
|
|
|
|
|
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},
|
2010-12-02 23:34:41 +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-03-25 11:01:48 -04:00
|
|
|
//DEPRECATED
|
|
|
|
|
//oAux = document.getElementById(sFieldName);
|
|
|
|
|
//if (oAux.setSelectionRange) {
|
|
|
|
|
// var rangeStart = oAux.selectionStart;
|
|
|
|
|
//var rangeEnd = oAux.selectionEnd;
|
|
|
|
|
//var tempStr1 = oAux.value.substring(0,rangeStart);
|
|
|
|
|
//var tempStr2 = oAux.value.substring(rangeEnd);
|
|
|
|
|
//oAux.value = tempStr1 + sValue + tempStr2;
|
|
|
|
|
//}
|
|
|
|
|
//else {
|
|
|
|
|
// if (document.selection) {
|
|
|
|
|
// oAux.focus();
|
|
|
|
|
// document.selection.createRange().text = sValue;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
if (triggerEditor.selection() == "") {
|
|
|
|
|
pos = triggerEditor.cursorPosition();
|
|
|
|
|
line = triggerEditor.cursorLine();
|
|
|
|
|
triggerEditor.insertIntoLine(line, pos.character, sValue);
|
|
|
|
|
} else {
|
|
|
|
|
triggerEditor.replaceSelection(sValue);
|
|
|
|
|
}
|
|
|
|
|
_oVarsPanel_.remove();
|
|
|
|
|
triggerEditor.focus();
|
|
|
|
|
triggerEditor.focusIfIE();
|
2010-12-02 23:34:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function cancel(){
|
|
|
|
|
currentPopupWindow.remove();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
]]></JS>
|
2011-01-17 13:53:45 +00:00
|
|
|
</dynaForm>
|