All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.flowlogix.web.mixins.CalendarPopupPatch Maven / Gradle / Ivy

There is a newer version: 4.0.9
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.flowlogix.web.mixins;

import com.flowlogix.web.base.UserEnvironment;
import com.flowlogix.web.services.AssetMinimizer;
import org.apache.tapestry5.Asset;
import org.apache.tapestry5.annotations.Environmental;
import org.apache.tapestry5.annotations.Path;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.javascript.JavaScriptSupport;

/**
 * Overrides Calendar to have "October 2011" and such on the popup label,
* Fixes the JIRA issue TAP5-805
* Fixes the JIRA issue TAP5-1697 * * See Documentation * * @author lprimak */ public class CalendarPopupPatch extends UserEnvironment { @Override public void setupRender() { super.setupRender(); js.addScript(calPopupScript); js.addScript(dateFieldParserScript); } public void afterRender() { if(isWindows()) { js.importStylesheet(datefieldWinPatch); } } private @Environmental JavaScriptSupport js; private @Inject @Path("CalendarPopupPatch.js") Asset calPopupScriptAsset; private @Inject @Path("DateFieldParserPatch.js") Asset dateFieldParserscriptAsset; private @Inject @Path("DateFieldWindowsPatch.css") Asset datefieldWinPatch; private @Inject AssetMinimizer minimizer; private final String calPopupScript = minimizer.minimize(calPopupScriptAsset); private final String dateFieldParserScript = minimizer.minimize(dateFieldParserscriptAsset); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy