Fixed problem with save into edit trigger
This commit is contained in:
@@ -9,72 +9,72 @@
|
||||
|
||||
<TRI_WEBBOT type="textareapm" class="formLabel" cols="85" rows="23" width="100%" height="380px" showVars="1" process="@#PRO_UID">
|
||||
</TRI_WEBBOT>
|
||||
|
||||
<BTN_CANCEL type="button" onclick="cancel();">
|
||||
<en>Cancel</en>
|
||||
</BTN_CANCEL>
|
||||
|
||||
<SAVE type="button" onclick="triggerSave(this.form);">
|
||||
<BTN_CANCEL type="button" onclick="cancel();">
|
||||
<en>Cancel</en>
|
||||
</BTN_CANCEL>
|
||||
|
||||
<SAVE type="button" onclick="triggerSave1(this.form);">
|
||||
<en>Save</en>
|
||||
</SAVE>
|
||||
<JS type="JavaScript"><![CDATA[
|
||||
|
||||
var _oVarsPanel_;
|
||||
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
|
||||
_oVarsPanel_ = new leimnud.module.panel();
|
||||
_oVarsPanel_.options = {
|
||||
limit : true,
|
||||
size : {w:550,h:675},
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
_oVarsPanel_.remove();
|
||||
};
|
||||
|
||||
function cancel(){
|
||||
currentPopupWindow.remove();
|
||||
}
|
||||
|
||||
|
||||
var _oVarsPanel_;
|
||||
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
|
||||
_oVarsPanel_ = new leimnud.module.panel();
|
||||
_oVarsPanel_.options = {
|
||||
limit : true,
|
||||
size : {w:550,h:675},
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
_oVarsPanel_.remove();
|
||||
};
|
||||
|
||||
function cancel(){
|
||||
currentPopupWindow.remove();
|
||||
}
|
||||
|
||||
|
||||
]]></JS>
|
||||
</dynaForm>
|
||||
Reference in New Issue
Block a user