mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Disabled js code in CMSMain->switchlanguage() which was assuming wrong DOM structure (TODO: Replace with more robust selectors)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66136 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b5d874dab8
commit
5c97a59a5c
@ -1304,13 +1304,13 @@ HTML;
|
|||||||
$languageIDs = $obj->getDescendantIDList();
|
$languageIDs = $obj->getDescendantIDList();
|
||||||
$notcreatedlist = array_diff($allIDs,$languageIDs);
|
$notcreatedlist = array_diff($allIDs,$languageIDs);
|
||||||
FormResponse::add("$('addpage').getElementsByTagName('button')[0].disabled=true;");
|
FormResponse::add("$('addpage').getElementsByTagName('button')[0].disabled=true;");
|
||||||
FormResponse::add("$('Form_AddPageOptionsForm').getElementsByTagName('div')[1].getElementsByTagName('input')[0].disabled=true;");
|
//FormResponse::add("$('Form_AddPageOptionsForm').getElementsByTagName('div')[1].getElementsByTagName('input')[0].disabled=true;");
|
||||||
FormResponse::add("$('Translating_Message').innerHTML = 'Translating mode - ".i18n::get_language_name($lang)."';");
|
FormResponse::add("$('Translating_Message').innerHTML = 'Translating mode - ".i18n::get_language_name($lang)."';");
|
||||||
FormResponse::add("Element.removeClassName('Translating_Message','nonTranslating');");
|
FormResponse::add("Element.removeClassName('Translating_Message','nonTranslating');");
|
||||||
} else {
|
} else {
|
||||||
Translatable::set_reading_lang($lang);
|
Translatable::set_reading_lang($lang);
|
||||||
FormResponse::add("$('addpage').getElementsByTagName('button')[0].disabled=false;");
|
FormResponse::add("$('addpage').getElementsByTagName('button')[0].disabled=false;");
|
||||||
FormResponse::add("$('Form_AddPageOptionsForm').getElementsByTagName('div')[1].getElementsByTagName('input')[0].disabled=false;");
|
//FormResponse::add("$('Form_AddPageOptionsForm').getElementsByTagName('div')[1].getElementsByTagName('input')[0].disabled=false;");
|
||||||
FormResponse::add("Element.addClassName('Translating_Message','nonTranslating');");
|
FormResponse::add("Element.addClassName('Translating_Message','nonTranslating');");
|
||||||
}
|
}
|
||||||
$obj = singleton($this->stat('tree_class'));
|
$obj = singleton($this->stat('tree_class'));
|
||||||
|
Loading…
Reference in New Issue
Block a user