mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 17:18:54 +01:00
"fixed error if FCKeditorAPI was not loaded (no FCK on the page), which cause the selected tab no longer be returned to the app"
This commit is contained in:
parent
defef645e2
commit
8c71320f44
@ -72,16 +72,19 @@ function activate_tab(tab,all_tabs,name)
|
|||||||
// activate FCK in newly activated tab for Gecko browsers
|
// activate FCK in newly activated tab for Gecko browsers
|
||||||
if (!document.all)
|
if (!document.all)
|
||||||
{
|
{
|
||||||
var t = document.getElementById(tab);
|
try {
|
||||||
var inputs = t.getElementsByTagName('input');
|
var t = document.getElementById(tab);
|
||||||
for (i = 0; i < inputs.length;i++) {
|
var inputs = t.getElementsByTagName('input');
|
||||||
editor = FCKeditorAPI.GetInstance(inputs[i].name);
|
for (i = 0; i < inputs.length;i++) {
|
||||||
if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
|
editor = FCKeditorAPI.GetInstance(inputs[i].name);
|
||||||
editor.SwitchEditMode();
|
if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
|
||||||
editor.SwitchEditMode();
|
editor.SwitchEditMode();
|
||||||
break;
|
editor.SwitchEditMode();
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch(e) { } // ignore the error if FCKeditorAPI is not loaded
|
||||||
}
|
}
|
||||||
if (name) {
|
if (name) {
|
||||||
set_element(document.eTemplate,name,tab);
|
set_element(document.eTemplate,name,tab);
|
||||||
|
Loading…
Reference in New Issue
Block a user