BUGFIX Checking for existence of $('SwitchView') (fixes #5282)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@108436 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-07-25 21:00:15 +00:00 committed by Sam Minnee
parent 2e25aa2bdf
commit 155a04578d

View File

@ -25,7 +25,7 @@ CMSForm.prototype = {
ajaxActionsAtTop(this.id, 'form_actions_' + this.formName, this.formName);
// Update the nav items down the bottom
if($('AjaxSwitchView')) {
if($('SwitchView') && $('AjaxSwitchView')) {
$('SwitchView').innerHTML = $('AjaxSwitchView').innerHTML;
$('AjaxSwitchView').innerHTML = '';
Behaviour.apply('SwitchView'); // This is needed so calendar still works