CMS MADE SIMPLE FORGE

CGCalendar

 

[#10858] Admin events calendar not displayed due to empty holidays ajax return

avatar
Created By: Mathieu Muths (airelibre) (airelibre)
Date Submitted: Tue Jan 26 09:32:18 -0500 2016

Assigned To: Robert Campbell (calguy1000)
Version: 1.15.8
CMSMS Version: None
Severity: Critical
Resolution: Works For Me
State: Closed
Summary:
Admin events calendar not displayed due to empty holidays ajax return
Detailed Description:
Hello Robert,

On admin_events_tab.tpl line 130 :
if( _holidays == null || _holidays.length == 0 ) return;

> The problem is that, when we don't ues the Holidays stuff, the ajax function
gives a blank document with one line, which causes the JS to consider it as not
null or empty.


I suggest:
if( _holidays.trim() == null || _holidays.trim().length == 0 ) return;

And it works now

But maybe the best way to solve this is to clean the ajax function to not return
a single line break

Thank you


History

Comments
avatar
Date: 2016-02-09 19:24
Posted By: Robert Campbell (calguy1000)

just tested with a fresh install, and no holidays url configured.

worked fine.
      
Updates

Updated: 2016-04-23 19:39
state: Open => Closed

Updated: 2016-02-09 19:24
resolution_id: => 11