package net.bootsfaces.component.fullCalendar;

import javax.el.ValueExpression;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.FacesComponent;

import net.bootsfaces.listeners.AddResourcesListener;
import net.bootsfaces.render.Tooltip;
import net.bootsfaces.utils.BsfUtils;

/**
 *
 * @author jottyfan
 *
 */
@ResourceDependencies({ @ResourceDependency(library = "bsf", name = "js/moment.min.js", target = "head"),
		@ResourceDependency(library = "bsf", name = "js/fullcalendar.min.js", target = "head"),
		@ResourceDependency(library = "bsf", name = "css/fullcalendar.min.css", target = "head"),
		@ResourceDependency(library = "bsf", name = "js/fullcalendar-lang-all.js", target = "head")})
@FacesComponent("net.bootsfaces.component.fullCalendar.FullCalendar")
public class FullCalendar extends FullCalendarCore implements net.bootsfaces.render.IHasTooltip, net.bootsfaces.render.IResponsive {

    public static final String COMPONENT_TYPE = "net.bootsfaces.component.fullCalendar.FullCalendar";

    public static final String COMPONENT_FAMILY = "net.bootsfaces.component";

    public static final String DEFAULT_RENDERER = "net.bootsfaces.component.fullCalendar.FullCalendar";

    public FullCalendar() {
        Tooltip.addResourceFiles();
        AddResourcesListener.addThemedCSSResource("core.css");
        //AddResourcesListener.addThemedCSSResource("bsf.css");
        setRendererType(DEFAULT_RENDERER);
    }

    public String getFamily() {
        return COMPONENT_FAMILY;
    }

    /**
     * Manage EL-expression for snake-case attributes
     */
    public void setValueExpression(String name, ValueExpression binding) {
        name = BsfUtils.snakeCaseToCamelCase(name);
        super.setValueExpression(name, binding);
    }

	public void setWeekMode(String weekMode) {
		if ("liquid".equals(weekMode) || "fixed".equals(weekMode) || "variable".equals(weekMode)) {
			getStateHelper().put(PropertyKeys.weekMode, weekMode);
		} else {
			getStateHelper().put(PropertyKeys.weekMode, "liquid");
		}
	}


}

@@ -589,100 +589,8 @@
 %22),%0A
-%09%09@ResourceDependency(library = %22bsf%22, name = %22css/fullcalendar.min.css%22, target = %22head%22),%0A
 %09%09@R
@@ -1355,32 +1355,100 @@
 rce(%22bsf.css%22);%0A
+%09%09%09%09AddResourcesListener.addExtCSSResource(%22fullcalendar.min.css%22);%0A
         setRende

Fix FullCalendar