BUG-12604-12174-13122 Problema de despliegue de contenido de la librería CodeMirror cuando se usa el navegador Internet Explorer 8, 9, 10, en la sección '/DESIGNER/', dbl-click al seleccionar un proceso, opción TRIGGERS, opciónes: 'New / Custom Trigger', 'New / Copy & Import Trigger from a Process', Edit. Todo el campo de visualización se comporta de manera anormal, y los scrolls horizontal y vertical se pierden, en otros casos cuando el contenido es muy largo el visualización simplemente se pierde y solo se puede recuperar haciendo un click sobre el area.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
G::LoadThirdParty('geshi', 'geshi');
|
||||
$geshi = new GeSHi($_POST["code"], 'php');
|
||||
$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 2);
|
||||
$geshi->set_line_style('background: #f0f0f0;');
|
||||
echo $geshi->parse_code();
|
||||
?>
|
||||
10
workflow/engine/methods/triggers/triggers_Edit.php
Executable file → Normal file
10
workflow/engine/methods/triggers/triggers_Edit.php
Executable file → Normal file
@@ -68,6 +68,8 @@ $G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $xmlform, '', $aFields, $xmlform_action );
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
//$oHeadPublisher->addScriptFile('/js/codemirror/js/codemirror.js', 1);
|
||||
$oHeadPublisher->addCssFile('/js/codemirror/lib/codemirror.css', 1);
|
||||
$oHeadPublisher->addCssFile('/js/codemirror/addon/hint/show-hint.css', 1);
|
||||
$oHeadPublisher->addScriptFile('/js/codemirror/lib/codemirror.js', 1);
|
||||
$oHeadPublisher->addScriptFile("/js/codemirror/addon/edit/matchbrackets.js",1);
|
||||
$oHeadPublisher->addScriptFile("/js/codemirror/mode/htmlmixed/htmlmixed.js",1);
|
||||
@@ -79,5 +81,11 @@ $oHeadPublisher->addScriptFile("/js/codemirror/addon/hint/show-hint.js",1);
|
||||
$oHeadPublisher->addScriptFile("/js/codemirror/addon/hint/php-hint.js",1);
|
||||
$oHeadPublisher->addScriptFile("/js/codemirror/mode/php/php.js",1);
|
||||
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
//Hack: CodeMirror needed to run Internet Explorer
|
||||
$ie = (strrpos($_SERVER['HTTP_USER_AGENT'], "MSIE") === false ) ? false : true;
|
||||
if ($ie) {
|
||||
echo "<!DOCTYPE html>\n";
|
||||
}
|
||||
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
|
||||
|
||||
@@ -74,7 +74,8 @@
|
||||
|
||||
// Additional functions required in triggers
|
||||
function triggerEditWizardSource (sUID){
|
||||
popupWindow('@G::LoadTranslation(ID_EDIT_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?TRI_UID=' + sUID +'&BYPASS=1' , 770, 510);
|
||||
//popupWindow('@G::LoadTranslation(ID_EDIT_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?TRI_UID=' + sUID +'&BYPASS=1' , 770, 510);
|
||||
//window.open('@G::encryptlink(@#triggersEdit)?TRI_UID=' + sUID +'&BYPASS=1','@G::LoadTranslation(ID_EDIT_TRIGGERS)'.replace(/\s/g,'_'),'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=930,height=600,top=85,left=140');
|
||||
}
|
||||
|
||||
function triggerSave(form)
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
|
||||
<triggersEdit type="hidden" defaultValue="../triggers/triggers_Edit"/>
|
||||
|
||||
<EDIT type="link" colWidth="" value="@G::LoadTranslation(ID_EDIT)" link="#" onclick="popupWindow('@G::LoadTranslation(ID_EDIT_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?TRI_UID=' + @QTRI_UID , 930, 600); return false;"/>
|
||||
<EDIT type="link" colWidth="" value="@G::LoadTranslation(ID_EDIT)" link="#" onclick="
|
||||
/*popupWindow('@G::LoadTranslation(ID_EDIT_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?TRI_UID=' + @QTRI_UID , 930, 600); */
|
||||
window.open('@G::encryptlink(@#triggersEdit)?TRI_UID=' + @QTRI_UID,'@G::LoadTranslation(ID_EDIT_TRIGGERS)'.replace(/\s/g,'_'),'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=930,height=600,top=85,left=140');
|
||||
return false;"/>
|
||||
|
||||
<CONDITION type="link" colWidth="" value="@G::LoadTranslation(ID_CONDITION)" link="#" onclick="editTriggerCondition(@QSTEP_UID, @QTRI_UID, 'AFTER');return false;"/>
|
||||
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
|
||||
<triggersEdit type="hidden" defaultValue="../triggers/triggers_Edit"/>
|
||||
|
||||
<EDIT type="link" colWidth="" value="@G::LoadTranslation(ID_EDIT)" link="#" onclick="popupWindow('@G::LoadTranslation(ID_EDIT_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?TRI_UID=' + @QTRI_UID , 930, 600); return false;"/>
|
||||
<EDIT type="link" colWidth="" value="@G::LoadTranslation(ID_EDIT)" link="#" onclick="
|
||||
/*popupWindow('@G::LoadTranslation(ID_EDIT_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?TRI_UID=' + @QTRI_UID , 930, 600); */
|
||||
window.open('@G::encryptlink(@#triggersEdit)?TRI_UID=' + @QTRI_UID,'@G::LoadTranslation(ID_EDIT_TRIGGERS)'.replace(/\s/g,'_'),'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=930,height=600,top=85,left=140');
|
||||
return false;"/>
|
||||
|
||||
<CONDITION type="link" colWidth="" value="@G::LoadTranslation(ID_CONDITION)" link="#" onclick="editTriggerCondition(@QSTEP_UID, @QTRI_UID, 'BEFORE');return false;"/>
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$TRI_WEBBOT}</td>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.TRI_WEBBOT}<label class="FormRequiredTextMessage"><font color="red">*</font>{php} echo " ".(G::LoadTranslation('ID_TRIGGER_EDITOR_HINT_ADVISE_MESSAGE')); {/php}</label></td>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.TRI_WEBBOT}<div id="code"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormButton' colspan="2" align="center">{$form.BTNCOPYSAVE} {$form.BTNCANCEL}</td>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<en>Script</en>
|
||||
</TRI_WEBBOT>
|
||||
|
||||
<BTNCOPYSAVE type="button" onclick="document.getElementById('form[TRI_WEBBOT]').value = triggerEditor.getValue(); triggerSave1(this.form);">
|
||||
<BTNCOPYSAVE type="button" onclick="/*document.getElementById('form[TRI_WEBBOT]').value = triggerEditor.getValue();*/ triggerSave1(this.form);">
|
||||
<en>Copy/Import and Save</en>
|
||||
</BTNCOPYSAVE>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
stylesheet: ["css/xmlcolors.css", "css/jscolors.css", "css/csscolors.css", "css/phpcolors.css" ],
|
||||
path: "js/", lineNumbers: true, continuousScanning: 500, readOnly:true, parserConfig: { phpOnly:true} });
|
||||
*/
|
||||
var triggerEditor = CodeMirror.fromTextArea(document.getElementById("form[TRI_WEBBOT]"), {
|
||||
/*var triggerEditor = CodeMirror.fromTextArea(document.getElementById("form[TRI_WEBBOT]"), {
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
mode: "application/x-httpd-php",
|
||||
@@ -102,7 +102,7 @@
|
||||
indentWithTabs: false,
|
||||
readOnly: true
|
||||
});
|
||||
triggerEditor.setSize(400,200);
|
||||
triggerEditor.setSize(400,200);*/
|
||||
|
||||
function cancel()
|
||||
{
|
||||
@@ -114,8 +114,19 @@
|
||||
var triUid = getField("TRIGGER_UID_AUX").value;
|
||||
|
||||
if (triUid != triUidPrev) {
|
||||
triggerEditor.setValue(document.getElementById("form[TRI_WEBBOT]").value);
|
||||
//triggerEditor.setValue(document.getElementById("form[TRI_WEBBOT]").value);
|
||||
|
||||
triUidPrev = triUid;
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : 'processes_TriggersFormatCode',
|
||||
args : 'code='+document.getElementById("form[TRI_WEBBOT]").value
|
||||
});
|
||||
oRPC.callback = function(rpc) {
|
||||
document.getElementById("form[TRI_WEBBOT]").style.display="none";
|
||||
document.getElementById("code").innerHTML = rpc.xmlhttp.responseText;
|
||||
};
|
||||
oRPC.make();
|
||||
|
||||
} else {
|
||||
setTimeout("triggerCheckWebbotTimer()", 100);
|
||||
}
|
||||
@@ -131,7 +142,7 @@
|
||||
function ()
|
||||
{
|
||||
txtTgrTitle.value = "";
|
||||
triggerEditor.setValue("");
|
||||
//triggerEditor.setValue("");
|
||||
triUidPrev= "";
|
||||
}
|
||||
);
|
||||
@@ -146,7 +157,7 @@
|
||||
setTimeout("triggerCheckWebbotTimer()", 100);
|
||||
} else {
|
||||
txtTgrTitle.value = "";
|
||||
triggerEditor.setValue("");
|
||||
//triggerEditor.setValue("");
|
||||
triUidPrev= "";
|
||||
}
|
||||
}
|
||||
|
||||
5
workflow/engine/xmlform/triggers/triggersCustom.html
Executable file → Normal file
5
workflow/engine/xmlform/triggers/triggersCustom.html
Executable file → Normal file
@@ -31,11 +31,6 @@
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$TRI_DESCRIPTION}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.TRI_DESCRIPTION} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.TRI_DESCRIPTION}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$TRI_WEBBOT}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.TRI_WEBBOT} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.TRI_WEBBOT}<label class="FormRequiredTextMessage"><font color="red">*</font>{php} echo " ".(G::LoadTranslation('ID_TRIGGER_EDITOR_HINT_ADVISE_MESSAGE'));{/php}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormButton' colspan="2" align="center">{$form.SAVE} {$form.BTN_CANCEL}</td>
|
||||
|
||||
12
workflow/engine/xmlform/triggers/triggersCustom.xml
Executable file → Normal file
12
workflow/engine/xmlform/triggers/triggersCustom.xml
Executable file → Normal file
@@ -19,9 +19,9 @@
|
||||
<en>Description</en>
|
||||
</TRI_DESCRIPTION>
|
||||
|
||||
<TRI_WEBBOT type="textareapm" class="formLabel" cols="55" rows="13" width="100%" height="380px" showVars="1" process="@#PRO_UID">
|
||||
<TRI_WEBBOT type="textareapm" class="formLabel" cols="55" rows="13" width="100%" height="380px" showVars="1" process="@#PRO_UID" style="display:none">
|
||||
</TRI_WEBBOT>
|
||||
<SAVE type="button" onclick="document.getElementById('form[TRI_WEBBOT]').value = triggerEditor.getValue(); triggerSave1(this.form);">
|
||||
<SAVE type="button" onclick="/*document.getElementById('form[TRI_WEBBOT]').value = triggerEditor.getValue();*/ triggerSave1(this.form);">
|
||||
<en>Save</en>
|
||||
</SAVE>
|
||||
<PARTNER_FLAG type="private"/>
|
||||
@@ -40,7 +40,7 @@
|
||||
stylesheet: ["css/xmlcolors.css", "css/jscolors.css", "css/csscolors.css", "css/phpcolors.css" ],
|
||||
path: "js/", lineNumbers: true, continuousScanning: 500, parserConfig: { phpOnly:true} });*/
|
||||
|
||||
CodeMirror.commands.autocomplete = function(cm) {
|
||||
/*CodeMirror.commands.autocomplete = function(cm) {
|
||||
CodeMirror.showHint(cm, CodeMirror.phpHint);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ var triggerEditor = CodeMirror.fromTextArea(document.getElementById("form[TRI_WE
|
||||
indentWithTabs: false,
|
||||
extraKeys: {"Ctrl-Space": "autocomplete"}
|
||||
});
|
||||
triggerEditor.setSize(450,245);
|
||||
triggerEditor.setSize(450,245);*/
|
||||
|
||||
getField('TRI_TITLE').form.onsubmit = function() {return false;};
|
||||
var _oVarsPanel_;
|
||||
@@ -90,7 +90,7 @@ var showDynaformsFormVars = function(sFieldName, sAjaxServer, sProcess, sSymbol)
|
||||
oRPC.make();
|
||||
};
|
||||
|
||||
var insertFormVar = function(sFieldName, sValue) {
|
||||
/*var insertFormVar = function(sFieldName, sValue) {
|
||||
if (triggerEditor.getSelection() == "") {
|
||||
triggerEditor.replaceRange(sValue, triggerEditor.getCursor());
|
||||
} else {
|
||||
@@ -98,7 +98,7 @@ var insertFormVar = function(sFieldName, sValue) {
|
||||
}
|
||||
_oVarsPanel_.remove();
|
||||
triggerEditor.focus();
|
||||
};
|
||||
};*/
|
||||
|
||||
function cancel(){
|
||||
currentPopupWindow.remove();
|
||||
|
||||
@@ -90,8 +90,14 @@ var insertFormVar = function(sFieldName, sValue) {
|
||||
};
|
||||
|
||||
function cancel(){
|
||||
currentPopupWindow.remove();
|
||||
//currentPopupWindow.remove();
|
||||
window.close();
|
||||
}
|
||||
|
||||
function triggerSave1(form){
|
||||
window.close();
|
||||
ajax_post(form.action, form, 'POST');
|
||||
}
|
||||
|
||||
]]></JS>
|
||||
</dynaForm>
|
||||
|
||||
5
workflow/engine/xmlform/triggers/triggers_Options.xml
Executable file → Normal file
5
workflow/engine/xmlform/triggers/triggers_Options.xml
Executable file → Normal file
@@ -47,6 +47,7 @@
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*
|
||||
//Add css Codemirror
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
var s = document.createElement('link');
|
||||
@@ -60,6 +61,7 @@
|
||||
s.setAttribute('type', 'text/css');
|
||||
s.setAttribute('rel', 'stylesheet');
|
||||
head.appendChild(s);
|
||||
*/
|
||||
|
||||
var windowWidth = 600;
|
||||
var windowHeight = 460;
|
||||
@@ -96,7 +98,8 @@
|
||||
}
|
||||
|
||||
function triggerEdit(sUID) {
|
||||
popupWindow('@G::LoadTranslation(ID_EDIT_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?TRI_UID='+ sUID , 930, 600);
|
||||
//popupWindow('@G::LoadTranslation(ID_EDIT_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?TRI_UID='+ sUID , 930, 600);
|
||||
window.open('@G::encryptlink(@#triggersEdit)?TRI_UID='+ sUID,'@G::LoadTranslation(ID_EDIT_TRIGGERS)'.replace(/\s/g,'_'),'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=930,height=600,top=85,left=140');
|
||||
}
|
||||
|
||||
function triggerProperties( sUID ) {
|
||||
|
||||
Reference in New Issue
Block a user