Search in sources :

Example 1 with JQueryUILibrarySettings

use of com.googlecode.wicket.jquery.ui.settings.JQueryUILibrarySettings in project webanno by webanno.

the class WicketApplicationBase method initJQueryUI.

protected void initJQueryUI() {
    JQueryUILibrarySettings jqueryUiCfg = JQueryUILibrarySettings.get();
    // Here we ensure that bootstrap is loaded before JQuery UI such that the
    // JQuery UI tooltip that we use e.g. on the annotation page takes precedence over
    // the less powerful Bootstrap tooltip (both are JQuery plugins using the same name!)
    jqueryUiCfg.setJavaScriptReference(BootstrapAwareJQueryUIJavaScriptResourceReference.get());
    getComponentInstantiationListeners().add(component -> {
        if (component instanceof Page) {
            component.add(new JQueryUIResourceBehavior());
        }
    });
}
Also used : JQueryUILibrarySettings(com.googlecode.wicket.jquery.ui.settings.JQueryUILibrarySettings) Page(org.apache.wicket.Page) LoginPage(de.tudarmstadt.ukp.clarin.webanno.ui.core.login.LoginPage) WebPage(org.apache.wicket.markup.html.WebPage) JQueryUIResourceBehavior(de.tudarmstadt.ukp.clarin.webanno.ui.config.JQueryUIResourceBehavior)

Example 2 with JQueryUILibrarySettings

use of com.googlecode.wicket.jquery.ui.settings.JQueryUILibrarySettings in project webanno by webanno.

the class WicketApplicationBase method addJQueryUIResourcesToAllPages.

protected void addJQueryUIResourcesToAllPages() {
    JQueryUILibrarySettings jqueryUiCfg = JQueryUILibrarySettings.get();
    // Here we ensure that bootstrap is loaded before JQuery UI such that the
    // JQuery UI tooltip that we use e.g. on the annotation page takes precedence over
    // the less powerful Bootstrap tooltip (both are JQuery plugins using the same name!)
    jqueryUiCfg.setJavaScriptReference(BootstrapAwareJQueryUIJavaScriptResourceReference.get());
    getComponentInstantiationListeners().add(component -> {
        if (component instanceof Page) {
            component.add(new JQueryUIResourceBehavior());
        }
    });
}
Also used : JQueryUILibrarySettings(com.googlecode.wicket.jquery.ui.settings.JQueryUILibrarySettings) Page(org.apache.wicket.Page) LoginPage(de.tudarmstadt.ukp.clarin.webanno.ui.core.login.LoginPage) WebPage(org.apache.wicket.markup.html.WebPage) JQueryUIResourceBehavior(de.tudarmstadt.ukp.clarin.webanno.ui.config.JQueryUIResourceBehavior)

Aggregations

JQueryUILibrarySettings (com.googlecode.wicket.jquery.ui.settings.JQueryUILibrarySettings)2 JQueryUIResourceBehavior (de.tudarmstadt.ukp.clarin.webanno.ui.config.JQueryUIResourceBehavior)2 LoginPage (de.tudarmstadt.ukp.clarin.webanno.ui.core.login.LoginPage)2 Page (org.apache.wicket.Page)2 WebPage (org.apache.wicket.markup.html.WebPage)2