WYSIWYG EDITOR resize popup Variable Picker

WYSIWYG EDITOR Variable Picker
This commit is contained in:
norahmollo
2012-11-28 21:20:41 +00:00
parent f34e7b8e9f
commit dc2c19f288
24 changed files with 296 additions and 291 deletions

0
gulliver/js/maborak/core/maborak.js Executable file → Normal file
View File

0
gulliver/js/maborak/core/maborak.loader.js Executable file → Normal file
View File

View File

@@ -5,9 +5,8 @@
(function(){
var strPluginURL;
tinymce.create('tinymce.plugins.pmVariablePickerPlugin', {
init: function(ed, url)
{
{
strPluginURL = url; // store the URL for future use..
ed.addCommand('mcepmVariablePicker', function() {
pmVariablePicker();
@@ -33,22 +32,31 @@
// in the latter case, win and type will be set.. In the rist case, we will just update the main editor window
// with the path of the uploaded file
function pmVariablePicker(field_name, url, type, win) {
var strPluginPath = tinyMCE.activeEditor.plugins.pmVariablePicker.getPluginURL(); // get the path to the uploader plugin
var uloc=String(location);
//alert(uloc);
var new_text = uloc.split('/');
var loc='/'+new_text[3]+'/'+new_text[4]+'/'+new_text[5]+'/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@';
var strPluginPath = tinyMCE.activeEditor.plugins.pmVariablePicker.getPluginURL(); // get the path to the uploader plugin
var strUploaderURL = strPluginPath + "/uploader.php"; // generate the path to the uploader script
var strUploadPath = tinyMCE.activeEditor.getParam('plugin_pmVariablePicker_upload_path'); // get the relative upload path
var strSubstitutePath = tinyMCE.activeEditor.getParam('plugin_pmVariablePicker_upload_substitute_path'); // get the path we'll substitute for the for the upload path (i.e. fully qualified)
if (strUploaderURL.indexOf("?") < 0){ // if we were called without any GET params
strUploaderURL = strUploaderURL + "?type=" + type + "&d=" + strUploadPath + "&subs=" + strSubstitutePath; // add our own params
} else {
strUploaderURL = strUploaderURL + "&type=" + type + "&d=" + strUploadPath + "&subs=" + strSubstitutePath;
}
//tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker'
tinyMCE.activeEditor.windowManager.open({ // open the plugin popup
file : '/sysworkflow/en/classic/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@',
title : 'Upload Variable',
width : '400px',
height : '350px',
//file : '/sysworkflow/en/classic/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@',
file : loc,
title : 'Upload Variable',
width : '600px',
height : '330px',
resizable : "yes",
scrollbars : "no",
overflow : false,
inline : 1, // This parameter only has an effect if you use the inlinepopups plugin!
close_previous : "no"
@@ -56,7 +64,7 @@ function pmVariablePicker(field_name, url, type, win) {
window : win,
input : field_name
});
return false;
}
// This function will get called when the uploader is done uploading the file and ready to update
@@ -67,10 +75,10 @@ function closePluginPopup(){
}
function updateEditorContent(serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
}
function insertFormVar(fieldName,serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
closePluginPopup();
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
closePluginPopup();
}

View File

@@ -21,10 +21,13 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$_SERVER["QUERY_STRING"] = isset($_SERVER["QUERY_STRING"])?$_SERVER["QUERY_STRING"]:'';
$_POST["sProcess"] = isset($_POST["sProcess"])?$_POST["sProcess"]:'';
$_POST["sFieldName"] = isset($_POST["sFieldName"])?$_POST["sFieldName"]:'';
$_POST['sSymbol']= isset($_POST["sSymbol"])?$_POST["sSymbol"]:'';
$html = '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" onLoad="onLoad()" method="post" enctype="multipart/form-data" onsubmit="">';
$html .= '<div id="d_variables">';
$html .= '<table width="90%" align="center">';
$html .= '<tr style="display:none; visibility:hidden;">';

View File

@@ -43,7 +43,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:550,h:675},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -48,7 +48,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:550,h:675},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -75,7 +75,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:400,h:600},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -38,9 +38,9 @@
<en>Tags</en>
</INP_DOC_TAGS>
<BTN_CANCEL type="button" onclick="cancel();">
<en>Cancel</en>
</BTN_CANCEL>
<BTN_CANCEL type="button" onclick="cancel();">
<en>Cancel</en>
</BTN_CANCEL>
<ACCEPT type="button" onclick="inputdocsSave( this.form );">
<en>Save</en>
@@ -48,74 +48,74 @@
<JS type="javascript"><![CDATA[
leimnud.event.add(getField('INP_DOC_FORM_NEEDED'), 'change', function() {
if (getField('INP_DOC_FORM_NEEDED').value == 'VIRTUAL') {
hideRow('INP_DOC_ORIGINAL');
}
else {
showRow('INP_DOC_ORIGINAL');
}
});
if (getField('INP_DOC_FORM_NEEDED').value == 'VIRTUAL') {
hideRow('INP_DOC_ORIGINAL');
}
var _oVarsPanel_;
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:400,h:410},
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 + '&sType=2'
});
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();
leimnud.event.add(getField('INP_DOC_FORM_NEEDED'), 'change', function() {
if (getField('INP_DOC_FORM_NEEDED').value == 'VIRTUAL') {
hideRow('INP_DOC_ORIGINAL');
}
else {
showRow('INP_DOC_ORIGINAL');
}
});
if (getField('INP_DOC_FORM_NEEDED').value == 'VIRTUAL') {
hideRow('INP_DOC_ORIGINAL');
}
var _oVarsPanel_;
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:600,h:420},
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 + '&sType=2'
});
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>

View File

@@ -57,7 +57,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:400,h:600},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -119,7 +119,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:400,h:410},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -35,7 +35,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:350,h:400},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -36,11 +36,8 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {
w : 350,
h : 400
},
position : {
size : {w:600,h:420},
position : {
x : 0,
y : 0,
center : true

View File

@@ -40,134 +40,134 @@
<en>Variables In</en>
</SUBTITLE2>
<grid2 type="grid" xmlgrid="processes/processes_subProcess_In" addrow="1" deleterow="1" mode="edit"/>
<BTN_CANCEL type="button" onclick="cancel();">
<en>Cancel</en>
</BTN_CANCEL>
<BTN_CANCEL type="button" onclick="cancel();">
<en>Cancel</en>
</BTN_CANCEL>
<SAVE type="button" onclick="processes_subProcessSave(this.form);">
<en>Save</en>
</SAVE>
<JS type="javascript"><![CDATA[
if(getField('SP_SYNCHRONOUS').value!=1){
hideRowById('SUBTITLE2')
hideRowById('grid2');
}
leimnud.event.add(getField('SP_SYNCHRONOUS'), 'change', function() {
if (getField('SP_SYNCHRONOUS').value==1)
{ showRowById('grid1');
showRowById('grid2');
showRowById('SUBTITLE1');
showRowById('SUBTITLE2');
}
else
{ //hideRowById(grid1);
hideRowById('grid2');
//hideRowById(SUBTITLE1);
hideRowById('SUBTITLE2');
}
});
var processes_subProcessSave = function(oForm) {
//var a = getField('TASKS');
var a = getField('SPROCESS_NAME');
ans = ajax_post('../processes/processes_checkProperties', oForm, 'POST');
if(ans==1){
msgBox("@G::LoadTranslation(ID_ASSIGN_RULES)", "alert");
return false;
}
ajax_post(oForm.action, oForm, 'POST');
//Pm.data.db.task[getField('INDEX').value].object.elements.label.innerHTML = a.options[a.selectedIndex].text;
Pm.data.db.task[getField('INDEX').value].object.elements.label.innerHTML = a.value;
Pm.tmp.subProcessPanel.remove();
};
//var dynaformOnload = function(){
/*var grid1 = getField('grid1');
var grid2 = getField('grid2');
var SUBTITLE1 = getField('SUBTITLE1');
var SUBTITLE2 = getField('SUBTITLE2');
if(getField('SP_SYNCHRONOUS').value==1)
{ showRowById('grid1');
showRowById('grid2');
showRowById('SUBTITLE1');
showRowById('SUBTITLE2');
}
else
{
hideRowById('SUBTITLE2');
hideRowById(grid2);
}*/
//};
var _oVarsPanel_;
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
if (sProcess == '') {
var sAux = getField('PROCESSES').options[getField('TASKS').selectedIndex].value;
var aAux = sAux.split('_');
sProcess = aAux[0];
}
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:400,h:600},
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 + '&sNoShowLeyend=1&bIncMulSelFields=1'
});
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) {
oAux.value = '';
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(){
Pm.tmp.subProcessPanel.remove();
}
if(getField('SP_SYNCHRONOUS').value!=1){
hideRowById('SUBTITLE2')
hideRowById('grid2');
}
leimnud.event.add(getField('SP_SYNCHRONOUS'), 'change', function() {
if (getField('SP_SYNCHRONOUS').value==1)
{ showRowById('grid1');
showRowById('grid2');
showRowById('SUBTITLE1');
showRowById('SUBTITLE2');
}
else
{ //hideRowById(grid1);
hideRowById('grid2');
//hideRowById(SUBTITLE1);
hideRowById('SUBTITLE2');
}
});
var processes_subProcessSave = function(oForm) {
//var a = getField('TASKS');
var a = getField('SPROCESS_NAME');
ans = ajax_post('../processes/processes_checkProperties', oForm, 'POST');
if(ans==1){
msgBox("@G::LoadTranslation(ID_ASSIGN_RULES)", "alert");
return false;
}
ajax_post(oForm.action, oForm, 'POST');
//Pm.data.db.task[getField('INDEX').value].object.elements.label.innerHTML = a.options[a.selectedIndex].text;
Pm.data.db.task[getField('INDEX').value].object.elements.label.innerHTML = a.value;
Pm.tmp.subProcessPanel.remove();
};
//var dynaformOnload = function(){
/*var grid1 = getField('grid1');
var grid2 = getField('grid2');
var SUBTITLE1 = getField('SUBTITLE1');
var SUBTITLE2 = getField('SUBTITLE2');
if(getField('SP_SYNCHRONOUS').value==1)
{ showRowById('grid1');
showRowById('grid2');
showRowById('SUBTITLE1');
showRowById('SUBTITLE2');
}
else
{
hideRowById('SUBTITLE2');
hideRowById(grid2);
}*/
//};
var _oVarsPanel_;
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
if (sProcess == '') {
var sAux = getField('PROCESSES').options[getField('TASKS').selectedIndex].value;
var aAux = sAux.split('_');
sProcess = aAux[0];
}
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:600,h:420},
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 + '&sNoShowLeyend=1&bIncMulSelFields=1'
});
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) {
oAux.value = '';
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(){
Pm.tmp.subProcessPanel.remove();
}
]]></JS>
</dynaForm>

View File

@@ -22,7 +22,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:350,h:400},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -28,7 +28,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:350,h:400},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -37,7 +37,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:400,h:600},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -245,7 +245,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:400,h:600},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -69,7 +69,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:400,h:600},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -39,7 +39,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:400,h:600},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -155,7 +155,7 @@
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:400,h:600},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -36,8 +36,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
//size : {w:550,h:645},
size : {w:600,h:340},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -17,72 +17,71 @@
<TRI_WEBBOT type="textareapm" rows="18" cols="80" showVars="1" process="@#PRO_UID">
<en/>
</TRI_WEBBOT>
<BTN_CANCEL type="button" onclick="cancel();">
<en>Cancel</en>
</BTN_CANCEL>
<BTN_CANCEL type="button" onclick="cancel();">
<en>Cancel</en>
</BTN_CANCEL>
<SAVE type="button" onclick="eventsTriggerSave(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:645},
size : {w:600,h:340},
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:600,h:420},
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>

View File

@@ -26,8 +26,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
//size : {w:550,h:645},
size : {w:600,h:340},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',

View File

@@ -24,7 +24,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
_oVarsPanel_ = new leimnud.module.panel();
_oVarsPanel_.options = {
limit : true,
size : {w:600,h:440},
size : {w:600,h:420},
position : {x:0,y:0,center:true},
title : '',
theme : 'processmaker',