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-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>
|
|
|
|
|
<BTN_CANCEL type="button" onclick="cancel();triggerFromLibrary()">
|
|
|
|
|
<en>Cancel</en>
|
|
|
|
|
</BTN_CANCEL>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<JS type="JavaScript"><![CDATA[
|
2013-04-02 09:39:03 -04:00
|
|
|
/*var triggerEditor = CodeMirror.fromTextArea('form[TRI_WEBBOT]', {
|
2013-03-25 11:01:48 -04:00
|
|
|
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" ],
|
2013-04-02 09:39:03 -04:00
|
|
|
path: "js/", lineNumbers: true, continuousScanning: 500, parserConfig: { phpOnly:true} });*/
|
2013-04-02 10:46:53 -04:00
|
|
|
|
|
|
|
|
CodeMirror.commands.autocomplete = function(cm) {
|
|
|
|
|
CodeMirror.showHint(cm, CodeMirror.phpHint);
|
|
|
|
|
}
|
|
|
|
|
|
2013-04-02 09:39:03 -04:00
|
|
|
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"}
|
|
|
|
|
});
|
|
|
|
|
triggerEditor.setSize(400,250);
|
2013-03-25 11:01:48 -04:00
|
|
|
|
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-04-02 09:39:03 -04:00
|
|
|
if (triggerEditor.getSelection() == "") {
|
|
|
|
|
triggerEditor.replaceRange(sValue, triggerEditor.getCursor());
|
2013-03-25 11:01:48 -04:00
|
|
|
} else {
|
|
|
|
|
triggerEditor.replaceSelection(sValue);
|
|
|
|
|
}
|
|
|
|
|
_oVarsPanel_.remove();
|
|
|
|
|
triggerEditor.focus();
|
2010-12-02 23:34:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function cancel(){
|
|
|
|
|
currentPopupWindow.remove();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
]]></JS>
|
2011-01-17 13:53:45 +00:00
|
|
|
</dynaForm>
|