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

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',