The variable picker in the event section is now the same as the rest of ProcessMaker
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
var setVariablePickerJS = function(){
|
||||
|
||||
document.getElementById('_Var_Form_').addEventListener('dblclick', function(){
|
||||
insertFormVar(document.getElementById('selectedField').value, this.value);
|
||||
if (this.getAttribute('displayOption')=='event'){
|
||||
e.insertFormVar(this.value.substring(2), this.value.substring(2), 'dyn' );
|
||||
} else {
|
||||
insertFormVar(document.getElementById('selectedField').value, this.value);
|
||||
}
|
||||
});
|
||||
|
||||
var getVariableList = function (queryText, proUid, varType){
|
||||
|
||||
@@ -161,8 +161,10 @@ var EventCompose = function(t){
|
||||
oPanel.make();
|
||||
oPanel.loader.show();
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : '../events/eventsAjax',
|
||||
args: 'request=showDynavars'
|
||||
// url : '../events/eventsAjax',
|
||||
// args: 'request=showDynavars',
|
||||
url : '../controls/varsAjax',
|
||||
args: 'sSymbol=@@&displayOption=event'
|
||||
});
|
||||
oRPC.callback = function(rpc) {
|
||||
oPanel.loader.hide();
|
||||
@@ -197,6 +199,26 @@ var EventCompose = function(t){
|
||||
newOption.selected=true;
|
||||
o.options[o.options.length] = newOption;
|
||||
}
|
||||
this.insertFormVar= function(id, value, prefix){
|
||||
|
||||
if(this.exists(id)) {
|
||||
new leimnud.module.app.alert().make({label: G_STRINGS.EVENT_EMAILEXISTS});
|
||||
return false;
|
||||
}
|
||||
|
||||
this.deselectAll();
|
||||
o = getField(this.target);
|
||||
|
||||
if(prefix == 'dyn'){
|
||||
var newOption = new Option('@#'+value, prefix+"|"+id);
|
||||
} else {
|
||||
var newOption = new Option(value, prefix+"|"+id);
|
||||
}
|
||||
|
||||
newOption.selected=true;
|
||||
o.options[o.options.length] = newOption;
|
||||
oPanel.remove();
|
||||
}
|
||||
this.dropSel= function(){
|
||||
var o = getField(this.target);
|
||||
c=0;
|
||||
|
||||
Reference in New Issue
Block a user