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

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