WYSIWYG EDITOR resize popup Variable Picker
WYSIWYG EDITOR Variable Picker
This commit is contained in:
0
gulliver/js/maborak/core/maborak.js
Executable file → Normal file
0
gulliver/js/maborak/core/maborak.js
Executable file → Normal file
0
gulliver/js/maborak/core/maborak.loader.js
Executable file → Normal file
0
gulliver/js/maborak/core/maborak.loader.js
Executable file → Normal file
@@ -5,9 +5,8 @@
|
|||||||
(function(){
|
(function(){
|
||||||
var strPluginURL;
|
var strPluginURL;
|
||||||
tinymce.create('tinymce.plugins.pmVariablePickerPlugin', {
|
tinymce.create('tinymce.plugins.pmVariablePickerPlugin', {
|
||||||
|
|
||||||
init: function(ed, url)
|
init: function(ed, url)
|
||||||
{
|
{
|
||||||
strPluginURL = url; // store the URL for future use..
|
strPluginURL = url; // store the URL for future use..
|
||||||
ed.addCommand('mcepmVariablePicker', function() {
|
ed.addCommand('mcepmVariablePicker', function() {
|
||||||
pmVariablePicker();
|
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
|
// 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
|
// with the path of the uploaded file
|
||||||
function pmVariablePicker(field_name, url, type, win) {
|
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 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 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)
|
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
|
if (strUploaderURL.indexOf("?") < 0){ // if we were called without any GET params
|
||||||
strUploaderURL = strUploaderURL + "?type=" + type + "&d=" + strUploadPath + "&subs=" + strSubstitutePath; // add our own params
|
strUploaderURL = strUploaderURL + "?type=" + type + "&d=" + strUploadPath + "&subs=" + strSubstitutePath; // add our own params
|
||||||
} else {
|
} else {
|
||||||
strUploaderURL = strUploaderURL + "&type=" + type + "&d=" + strUploadPath + "&subs=" + strSubstitutePath;
|
strUploaderURL = strUploaderURL + "&type=" + type + "&d=" + strUploadPath + "&subs=" + strSubstitutePath;
|
||||||
}
|
}
|
||||||
|
//tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker'
|
||||||
tinyMCE.activeEditor.windowManager.open({ // open the plugin popup
|
tinyMCE.activeEditor.windowManager.open({ // open the plugin popup
|
||||||
file : '/sysworkflow/en/classic/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@',
|
//file : '/sysworkflow/en/classic/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@',
|
||||||
title : 'Upload Variable',
|
file : loc,
|
||||||
width : '400px',
|
title : 'Upload Variable',
|
||||||
height : '350px',
|
width : '600px',
|
||||||
|
height : '330px',
|
||||||
resizable : "yes",
|
resizable : "yes",
|
||||||
|
scrollbars : "no",
|
||||||
overflow : false,
|
overflow : false,
|
||||||
inline : 1, // This parameter only has an effect if you use the inlinepopups plugin!
|
inline : 1, // This parameter only has an effect if you use the inlinepopups plugin!
|
||||||
close_previous : "no"
|
close_previous : "no"
|
||||||
@@ -56,7 +64,7 @@ function pmVariablePicker(field_name, url, type, win) {
|
|||||||
window : win,
|
window : win,
|
||||||
input : field_name
|
input : field_name
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// This function will get called when the uploader is done uploading the file and ready to update
|
// 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){
|
function updateEditorContent(serializedHTML){
|
||||||
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
|
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
|
||||||
}
|
}
|
||||||
|
|
||||||
function insertFormVar(fieldName,serializedHTML){
|
function insertFormVar(fieldName,serializedHTML){
|
||||||
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
|
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
|
||||||
closePluginPopup();
|
closePluginPopup();
|
||||||
}
|
}
|
||||||
@@ -21,10 +21,13 @@
|
|||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* 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 = '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" onLoad="onLoad()" method="post" enctype="multipart/form-data" onsubmit="">';
|
||||||
|
|
||||||
$html .= '<div id="d_variables">';
|
$html .= '<div id="d_variables">';
|
||||||
|
|
||||||
$html .= '<table width="90%" align="center">';
|
$html .= '<table width="90%" align="center">';
|
||||||
|
|
||||||
$html .= '<tr style="display:none; visibility:hidden;">';
|
$html .= '<tr style="display:none; visibility:hidden;">';
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:550,h:675},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:550,h:675},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:400,h:600},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -38,9 +38,9 @@
|
|||||||
<en>Tags</en>
|
<en>Tags</en>
|
||||||
</INP_DOC_TAGS>
|
</INP_DOC_TAGS>
|
||||||
|
|
||||||
<BTN_CANCEL type="button" onclick="cancel();">
|
<BTN_CANCEL type="button" onclick="cancel();">
|
||||||
<en>Cancel</en>
|
<en>Cancel</en>
|
||||||
</BTN_CANCEL>
|
</BTN_CANCEL>
|
||||||
|
|
||||||
<ACCEPT type="button" onclick="inputdocsSave( this.form );">
|
<ACCEPT type="button" onclick="inputdocsSave( this.form );">
|
||||||
<en>Save</en>
|
<en>Save</en>
|
||||||
@@ -48,74 +48,74 @@
|
|||||||
|
|
||||||
<JS type="javascript"><![CDATA[
|
<JS type="javascript"><![CDATA[
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
leimnud.event.add(getField('INP_DOC_FORM_NEEDED'), 'change', function() {
|
leimnud.event.add(getField('INP_DOC_FORM_NEEDED'), 'change', function() {
|
||||||
if (getField('INP_DOC_FORM_NEEDED').value == 'VIRTUAL') {
|
if (getField('INP_DOC_FORM_NEEDED').value == 'VIRTUAL') {
|
||||||
hideRow('INP_DOC_ORIGINAL');
|
hideRow('INP_DOC_ORIGINAL');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showRow('INP_DOC_ORIGINAL');
|
showRow('INP_DOC_ORIGINAL');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (getField('INP_DOC_FORM_NEEDED').value == 'VIRTUAL') {
|
if (getField('INP_DOC_FORM_NEEDED').value == 'VIRTUAL') {
|
||||||
hideRow('INP_DOC_ORIGINAL');
|
hideRow('INP_DOC_ORIGINAL');
|
||||||
}
|
}
|
||||||
|
|
||||||
var _oVarsPanel_;
|
var _oVarsPanel_;
|
||||||
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
|
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
|
||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:400,h:410},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
statusBar: false,
|
statusBar: false,
|
||||||
control : {drag:false,resize:true,close:true},
|
control : {drag:false,resize:true,close:true},
|
||||||
fx : {opacity:true,rolled:false,modal:true}
|
fx : {opacity:true,rolled:false,modal:true}
|
||||||
};
|
};
|
||||||
_oVarsPanel_.make();
|
_oVarsPanel_.make();
|
||||||
_oVarsPanel_.events = {
|
_oVarsPanel_.events = {
|
||||||
remove:function() {
|
remove:function() {
|
||||||
delete _oVarsPanel_;
|
delete _oVarsPanel_;
|
||||||
}.extend(this)
|
}.extend(this)
|
||||||
};
|
};
|
||||||
_oVarsPanel_.loader.show();
|
_oVarsPanel_.loader.show();
|
||||||
oRPC = new leimnud.module.rpc.xmlhttp({
|
oRPC = new leimnud.module.rpc.xmlhttp({
|
||||||
url : sAjaxServer,
|
url : sAjaxServer,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
args : 'sFieldName=' + sFieldName + '&sProcess=' + sProcess + '&sSymbol=' + sSymbol + '&sType=2'
|
args : 'sFieldName=' + sFieldName + '&sProcess=' + sProcess + '&sSymbol=' + sSymbol + '&sType=2'
|
||||||
});
|
});
|
||||||
oRPC.callback = function(oRPC) {
|
oRPC.callback = function(oRPC) {
|
||||||
_oVarsPanel_.loader.hide();
|
_oVarsPanel_.loader.hide();
|
||||||
var scs = oRPC.xmlhttp.responseText.extractScript();
|
var scs = oRPC.xmlhttp.responseText.extractScript();
|
||||||
_oVarsPanel_.addContent(oRPC.xmlhttp.responseText);
|
_oVarsPanel_.addContent(oRPC.xmlhttp.responseText);
|
||||||
scs.evalScript();
|
scs.evalScript();
|
||||||
}.extend(this);
|
}.extend(this);
|
||||||
oRPC.make();
|
oRPC.make();
|
||||||
};
|
};
|
||||||
|
|
||||||
var insertFormVar = function(sFieldName, sValue) {
|
var insertFormVar = function(sFieldName, sValue) {
|
||||||
oAux = document.getElementById(sFieldName);
|
oAux = document.getElementById(sFieldName);
|
||||||
if (oAux.setSelectionRange) {
|
if (oAux.setSelectionRange) {
|
||||||
var rangeStart = oAux.selectionStart;
|
var rangeStart = oAux.selectionStart;
|
||||||
var rangeEnd = oAux.selectionEnd;
|
var rangeEnd = oAux.selectionEnd;
|
||||||
var tempStr1 = oAux.value.substring(0,rangeStart);
|
var tempStr1 = oAux.value.substring(0,rangeStart);
|
||||||
var tempStr2 = oAux.value.substring(rangeEnd);
|
var tempStr2 = oAux.value.substring(rangeEnd);
|
||||||
oAux.value = tempStr1 + sValue + tempStr2;
|
oAux.value = tempStr1 + sValue + tempStr2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (document.selection) {
|
if (document.selection) {
|
||||||
oAux.focus();
|
oAux.focus();
|
||||||
document.selection.createRange().text = sValue;
|
document.selection.createRange().text = sValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_oVarsPanel_.remove();
|
_oVarsPanel_.remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
function cancel(){
|
function cancel(){
|
||||||
currentPopupWindow.remove();
|
currentPopupWindow.remove();
|
||||||
}
|
}
|
||||||
]]></JS>
|
]]></JS>
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:400,h:600},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:400,h:410},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:350,h:400},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -36,11 +36,8 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {
|
size : {w:600,h:420},
|
||||||
w : 350,
|
position : {
|
||||||
h : 400
|
|
||||||
},
|
|
||||||
position : {
|
|
||||||
x : 0,
|
x : 0,
|
||||||
y : 0,
|
y : 0,
|
||||||
center : true
|
center : true
|
||||||
|
|||||||
@@ -40,134 +40,134 @@
|
|||||||
<en>Variables In</en>
|
<en>Variables In</en>
|
||||||
</SUBTITLE2>
|
</SUBTITLE2>
|
||||||
<grid2 type="grid" xmlgrid="processes/processes_subProcess_In" addrow="1" deleterow="1" mode="edit"/>
|
<grid2 type="grid" xmlgrid="processes/processes_subProcess_In" addrow="1" deleterow="1" mode="edit"/>
|
||||||
|
|
||||||
<BTN_CANCEL type="button" onclick="cancel();">
|
<BTN_CANCEL type="button" onclick="cancel();">
|
||||||
<en>Cancel</en>
|
<en>Cancel</en>
|
||||||
</BTN_CANCEL>
|
</BTN_CANCEL>
|
||||||
|
|
||||||
<SAVE type="button" onclick="processes_subProcessSave(this.form);">
|
<SAVE type="button" onclick="processes_subProcessSave(this.form);">
|
||||||
<en>Save</en>
|
<en>Save</en>
|
||||||
</SAVE>
|
</SAVE>
|
||||||
|
|
||||||
<JS type="javascript"><![CDATA[
|
<JS type="javascript"><![CDATA[
|
||||||
|
|
||||||
if(getField('SP_SYNCHRONOUS').value!=1){
|
if(getField('SP_SYNCHRONOUS').value!=1){
|
||||||
hideRowById('SUBTITLE2')
|
hideRowById('SUBTITLE2')
|
||||||
hideRowById('grid2');
|
hideRowById('grid2');
|
||||||
}
|
}
|
||||||
leimnud.event.add(getField('SP_SYNCHRONOUS'), 'change', function() {
|
leimnud.event.add(getField('SP_SYNCHRONOUS'), 'change', function() {
|
||||||
if (getField('SP_SYNCHRONOUS').value==1)
|
if (getField('SP_SYNCHRONOUS').value==1)
|
||||||
{ showRowById('grid1');
|
{ showRowById('grid1');
|
||||||
showRowById('grid2');
|
showRowById('grid2');
|
||||||
showRowById('SUBTITLE1');
|
showRowById('SUBTITLE1');
|
||||||
showRowById('SUBTITLE2');
|
showRowById('SUBTITLE2');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //hideRowById(grid1);
|
{ //hideRowById(grid1);
|
||||||
hideRowById('grid2');
|
hideRowById('grid2');
|
||||||
//hideRowById(SUBTITLE1);
|
//hideRowById(SUBTITLE1);
|
||||||
hideRowById('SUBTITLE2');
|
hideRowById('SUBTITLE2');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var processes_subProcessSave = function(oForm) {
|
var processes_subProcessSave = function(oForm) {
|
||||||
//var a = getField('TASKS');
|
//var a = getField('TASKS');
|
||||||
var a = getField('SPROCESS_NAME');
|
var a = getField('SPROCESS_NAME');
|
||||||
ans = ajax_post('../processes/processes_checkProperties', oForm, 'POST');
|
ans = ajax_post('../processes/processes_checkProperties', oForm, 'POST');
|
||||||
if(ans==1){
|
if(ans==1){
|
||||||
msgBox("@G::LoadTranslation(ID_ASSIGN_RULES)", "alert");
|
msgBox("@G::LoadTranslation(ID_ASSIGN_RULES)", "alert");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ajax_post(oForm.action, oForm, 'POST');
|
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.options[a.selectedIndex].text;
|
||||||
Pm.data.db.task[getField('INDEX').value].object.elements.label.innerHTML = a.value;
|
Pm.data.db.task[getField('INDEX').value].object.elements.label.innerHTML = a.value;
|
||||||
Pm.tmp.subProcessPanel.remove();
|
Pm.tmp.subProcessPanel.remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
//var dynaformOnload = function(){
|
//var dynaformOnload = function(){
|
||||||
/*var grid1 = getField('grid1');
|
/*var grid1 = getField('grid1');
|
||||||
var grid2 = getField('grid2');
|
var grid2 = getField('grid2');
|
||||||
var SUBTITLE1 = getField('SUBTITLE1');
|
var SUBTITLE1 = getField('SUBTITLE1');
|
||||||
var SUBTITLE2 = getField('SUBTITLE2');
|
var SUBTITLE2 = getField('SUBTITLE2');
|
||||||
|
|
||||||
if(getField('SP_SYNCHRONOUS').value==1)
|
if(getField('SP_SYNCHRONOUS').value==1)
|
||||||
{ showRowById('grid1');
|
{ showRowById('grid1');
|
||||||
showRowById('grid2');
|
showRowById('grid2');
|
||||||
showRowById('SUBTITLE1');
|
showRowById('SUBTITLE1');
|
||||||
showRowById('SUBTITLE2');
|
showRowById('SUBTITLE2');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hideRowById('SUBTITLE2');
|
hideRowById('SUBTITLE2');
|
||||||
hideRowById(grid2);
|
hideRowById(grid2);
|
||||||
|
|
||||||
|
|
||||||
}*/
|
}*/
|
||||||
//};
|
//};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var _oVarsPanel_;
|
var _oVarsPanel_;
|
||||||
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
|
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
|
||||||
if (sProcess == '') {
|
if (sProcess == '') {
|
||||||
var sAux = getField('PROCESSES').options[getField('TASKS').selectedIndex].value;
|
var sAux = getField('PROCESSES').options[getField('TASKS').selectedIndex].value;
|
||||||
var aAux = sAux.split('_');
|
var aAux = sAux.split('_');
|
||||||
sProcess = aAux[0];
|
sProcess = aAux[0];
|
||||||
}
|
}
|
||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:400,h:600},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
statusBar: false,
|
statusBar: false,
|
||||||
control : {drag:false,resize:true,close:true},
|
control : {drag:false,resize:true,close:true},
|
||||||
fx : {opacity:true,rolled:false,modal:true}
|
fx : {opacity:true,rolled:false,modal:true}
|
||||||
};
|
};
|
||||||
_oVarsPanel_.make();
|
_oVarsPanel_.make();
|
||||||
_oVarsPanel_.events = {
|
_oVarsPanel_.events = {
|
||||||
remove:function() {
|
remove:function() {
|
||||||
delete _oVarsPanel_;
|
delete _oVarsPanel_;
|
||||||
}.extend(this)
|
}.extend(this)
|
||||||
};
|
};
|
||||||
_oVarsPanel_.loader.show();
|
_oVarsPanel_.loader.show();
|
||||||
oRPC = new leimnud.module.rpc.xmlhttp({
|
oRPC = new leimnud.module.rpc.xmlhttp({
|
||||||
url : sAjaxServer,
|
url : sAjaxServer,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
args : 'sFieldName=' + sFieldName + '&sProcess=' + sProcess + '&sSymbol=' + sSymbol + '&sNoShowLeyend=1&bIncMulSelFields=1'
|
args : 'sFieldName=' + sFieldName + '&sProcess=' + sProcess + '&sSymbol=' + sSymbol + '&sNoShowLeyend=1&bIncMulSelFields=1'
|
||||||
});
|
});
|
||||||
oRPC.callback = function(oRPC) {
|
oRPC.callback = function(oRPC) {
|
||||||
_oVarsPanel_.loader.hide();
|
_oVarsPanel_.loader.hide();
|
||||||
var scs = oRPC.xmlhttp.responseText.extractScript();
|
var scs = oRPC.xmlhttp.responseText.extractScript();
|
||||||
_oVarsPanel_.addContent(oRPC.xmlhttp.responseText);
|
_oVarsPanel_.addContent(oRPC.xmlhttp.responseText);
|
||||||
scs.evalScript();
|
scs.evalScript();
|
||||||
}.extend(this);
|
}.extend(this);
|
||||||
oRPC.make();
|
oRPC.make();
|
||||||
};
|
};
|
||||||
|
|
||||||
var insertFormVar = function(sFieldName, sValue) {
|
var insertFormVar = function(sFieldName, sValue) {
|
||||||
oAux = document.getElementById(sFieldName);
|
oAux = document.getElementById(sFieldName);
|
||||||
if (oAux.setSelectionRange) {
|
if (oAux.setSelectionRange) {
|
||||||
oAux.value = '';
|
oAux.value = '';
|
||||||
var rangeStart = oAux.selectionStart;
|
var rangeStart = oAux.selectionStart;
|
||||||
var rangeEnd = oAux.selectionEnd;
|
var rangeEnd = oAux.selectionEnd;
|
||||||
var tempStr1 = oAux.value.substring(0,rangeStart);
|
var tempStr1 = oAux.value.substring(0,rangeStart);
|
||||||
var tempStr2 = oAux.value.substring(rangeEnd);
|
var tempStr2 = oAux.value.substring(rangeEnd);
|
||||||
oAux.value = tempStr1 + sValue + tempStr2;
|
oAux.value = tempStr1 + sValue + tempStr2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (document.selection) {
|
if (document.selection) {
|
||||||
oAux.focus();
|
oAux.focus();
|
||||||
document.selection.createRange().text = sValue;
|
document.selection.createRange().text = sValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_oVarsPanel_.remove();
|
_oVarsPanel_.remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
function cancel(){
|
function cancel(){
|
||||||
Pm.tmp.subProcessPanel.remove();
|
Pm.tmp.subProcessPanel.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
]]></JS>
|
]]></JS>
|
||||||
</dynaForm>
|
</dynaForm>
|
||||||
@@ -22,7 +22,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:350,h:400},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:350,h:400},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:400,h:600},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:400,h:600},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:400,h:600},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:400,h:600},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:400,h:600},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
//size : {w:550,h:645},
|
size : {w:600,h:420},
|
||||||
size : {w:600,h:340},
|
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -17,72 +17,71 @@
|
|||||||
<TRI_WEBBOT type="textareapm" rows="18" cols="80" showVars="1" process="@#PRO_UID">
|
<TRI_WEBBOT type="textareapm" rows="18" cols="80" showVars="1" process="@#PRO_UID">
|
||||||
<en/>
|
<en/>
|
||||||
</TRI_WEBBOT>
|
</TRI_WEBBOT>
|
||||||
|
|
||||||
<BTN_CANCEL type="button" onclick="cancel();">
|
<BTN_CANCEL type="button" onclick="cancel();">
|
||||||
<en>Cancel</en>
|
<en>Cancel</en>
|
||||||
</BTN_CANCEL>
|
</BTN_CANCEL>
|
||||||
|
|
||||||
<SAVE type="button" onclick="eventsTriggerSave(this.form);">
|
<SAVE type="button" onclick="eventsTriggerSave(this.form);">
|
||||||
<en>Save</en>
|
<en>Save</en>
|
||||||
</SAVE>
|
</SAVE>
|
||||||
<JS type="JavaScript"><![CDATA[
|
<JS type="JavaScript"><![CDATA[
|
||||||
|
|
||||||
var _oVarsPanel_;
|
var _oVarsPanel_;
|
||||||
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
|
var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol) {
|
||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
//size : {w:550,h:645},
|
size : {w:600,h:420},
|
||||||
size : {w:600,h:340},
|
position : {x:0,y:0,center:true},
|
||||||
position : {x:0,y:0,center:true},
|
title : '',
|
||||||
title : '',
|
theme : 'processmaker',
|
||||||
theme : 'processmaker',
|
statusBar: false,
|
||||||
statusBar: false,
|
control : {drag:false,resize:true,close:true},
|
||||||
control : {drag:false,resize:true,close:true},
|
fx : {opacity:true,rolled:false,modal:true}
|
||||||
fx : {opacity:true,rolled:false,modal:true}
|
};
|
||||||
};
|
_oVarsPanel_.make();
|
||||||
_oVarsPanel_.make();
|
_oVarsPanel_.events = {
|
||||||
_oVarsPanel_.events = {
|
remove:function() {
|
||||||
remove:function() {
|
delete _oVarsPanel_;
|
||||||
delete _oVarsPanel_;
|
}.extend(this)
|
||||||
}.extend(this)
|
};
|
||||||
};
|
_oVarsPanel_.loader.show();
|
||||||
_oVarsPanel_.loader.show();
|
oRPC = new leimnud.module.rpc.xmlhttp({
|
||||||
oRPC = new leimnud.module.rpc.xmlhttp({
|
url : sAjaxServer,
|
||||||
url : sAjaxServer,
|
method: 'POST',
|
||||||
method: 'POST',
|
args : 'sFieldName=' + sFieldName + '&sProcess=' + sProcess + '&sSymbol=' + sSymbol
|
||||||
args : 'sFieldName=' + sFieldName + '&sProcess=' + sProcess + '&sSymbol=' + sSymbol
|
});
|
||||||
});
|
oRPC.callback = function(oRPC) {
|
||||||
oRPC.callback = function(oRPC) {
|
_oVarsPanel_.loader.hide();
|
||||||
_oVarsPanel_.loader.hide();
|
var scs = oRPC.xmlhttp.responseText.extractScript();
|
||||||
var scs = oRPC.xmlhttp.responseText.extractScript();
|
_oVarsPanel_.addContent(oRPC.xmlhttp.responseText);
|
||||||
_oVarsPanel_.addContent(oRPC.xmlhttp.responseText);
|
scs.evalScript();
|
||||||
scs.evalScript();
|
}.extend(this);
|
||||||
}.extend(this);
|
oRPC.make();
|
||||||
oRPC.make();
|
};
|
||||||
};
|
|
||||||
|
var insertFormVar = function(sFieldName, sValue) {
|
||||||
var insertFormVar = function(sFieldName, sValue) {
|
oAux = document.getElementById(sFieldName);
|
||||||
oAux = document.getElementById(sFieldName);
|
if (oAux.setSelectionRange) {
|
||||||
if (oAux.setSelectionRange) {
|
var rangeStart = oAux.selectionStart;
|
||||||
var rangeStart = oAux.selectionStart;
|
var rangeEnd = oAux.selectionEnd;
|
||||||
var rangeEnd = oAux.selectionEnd;
|
var tempStr1 = oAux.value.substring(0,rangeStart);
|
||||||
var tempStr1 = oAux.value.substring(0,rangeStart);
|
var tempStr2 = oAux.value.substring(rangeEnd);
|
||||||
var tempStr2 = oAux.value.substring(rangeEnd);
|
oAux.value = tempStr1 + sValue + tempStr2;
|
||||||
oAux.value = tempStr1 + sValue + tempStr2;
|
}
|
||||||
}
|
else {
|
||||||
else {
|
if (document.selection) {
|
||||||
if (document.selection) {
|
oAux.focus();
|
||||||
oAux.focus();
|
document.selection.createRange().text = sValue;
|
||||||
document.selection.createRange().text = sValue;
|
}
|
||||||
}
|
}
|
||||||
}
|
_oVarsPanel_.remove();
|
||||||
_oVarsPanel_.remove();
|
};
|
||||||
};
|
|
||||||
|
function cancel(){
|
||||||
function cancel(){
|
currentPopupWindow.remove();
|
||||||
currentPopupWindow.remove();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
]]></JS>
|
]]></JS>
|
||||||
</dynaForm>
|
</dynaForm>
|
||||||
@@ -26,8 +26,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
//size : {w:550,h:645},
|
size : {w:600,h:420},
|
||||||
size : {w:600,h:340},
|
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
|||||||
_oVarsPanel_ = new leimnud.module.panel();
|
_oVarsPanel_ = new leimnud.module.panel();
|
||||||
_oVarsPanel_.options = {
|
_oVarsPanel_.options = {
|
||||||
limit : true,
|
limit : true,
|
||||||
size : {w:600,h:440},
|
size : {w:600,h:420},
|
||||||
position : {x:0,y:0,center:true},
|
position : {x:0,y:0,center:true},
|
||||||
title : '',
|
title : '',
|
||||||
theme : 'processmaker',
|
theme : 'processmaker',
|
||||||
|
|||||||
Reference in New Issue
Block a user