source: vlo/branches/vlo-3.3/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/JavaScriptResources.java @ 6686

Last change on this file since 6686 was 6686, checked in by Twan Goosen, 9 years ago

Search term highlighting with the highlight JQuery plugin. Added some additional pre-processing of the query terms.

File size: 3.5 KB
Line 
1/*
2 * Copyright (C) 2014 CLARIN
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17package eu.clarin.cmdi.vlo;
18
19import eu.clarin.cmdi.vlo.wicket.pages.RecordPage;
20import eu.clarin.cmdi.vlo.wicket.pages.VloBasePage;
21import org.apache.wicket.request.resource.CssResourceReference;
22import org.apache.wicket.request.resource.JavaScriptResourceReference;
23import org.apache.wicket.request.resource.ResourceReference;
24
25/**
26 *
27 * @author twagoo
28 */
29public final class JavaScriptResources {
30
31    private final static JavaScriptResourceReference VLO_FRONT = new JavaScriptResourceReference(VloBasePage.class, "vlo-front.js");
32    private final static JavaScriptResourceReference VLO_HEADER = new JavaScriptResourceReference(VloBasePage.class, "vlo-header.js");
33    private final static JavaScriptResourceReference VLO_SYNTAX_HELP = new JavaScriptResourceReference(VloBasePage.class, "vlo-syntax-help.js");
34    private final static JavaScriptResourceReference VLO_FACETS = new JavaScriptResourceReference(VloBasePage.class, "vlo-facets.js");
35    private final static JavaScriptResourceReference SEARCH_FORM = new JavaScriptResourceReference(VloBasePage.class, "vlo-searchform.js");
36    private final static JavaScriptResourceReference FIELDS_TABLE = new JavaScriptResourceReference(RecordPage.class, "vlo-fields-table.js");
37    private final static JavaScriptResourceReference JQUERY_UI = new JavaScriptResourceReference(VloBasePage.class, "jquery-ui-1.11.4.custom/jquery-ui.min.js");
38    private final static CssResourceReference JQUERY_UI_CSS = new CssResourceReference(VloBasePage.class, "jquery-ui-1.11.4.custom/jquery-ui.min.css");
39    private final static JavaScriptResourceReference JQUERY_WATERMARK = new JavaScriptResourceReference(VloBasePage.class, "jquery.watermark-3.1.4/jquery.watermark.min.js");
40    private final static JavaScriptResourceReference HIGHLIGHT = new JavaScriptResourceReference(RecordPage.class, "jquery.highlight.js");
41
42    public static JavaScriptResourceReference getVloFrontJS() {
43        return VLO_FRONT;
44    }
45
46    public static JavaScriptResourceReference getVloHeaderJS() {
47        return VLO_HEADER;
48    }
49    public static JavaScriptResourceReference getVloFacetsJS() {
50        return VLO_FACETS;
51    }
52
53    public static JavaScriptResourceReference getJQueryUIJS() {
54        return JQUERY_UI;
55    }
56    public static CssResourceReference getJQueryUICSS() {
57        return JQUERY_UI_CSS;
58    }
59
60    public static JavaScriptResourceReference getJQueryWatermarkJS() {
61        return JQUERY_WATERMARK;
62    }
63
64    public static JavaScriptResourceReference getHighlightJS() {
65        return HIGHLIGHT;
66    }
67
68    public static JavaScriptResourceReference getSyntaxHelpJS() {
69        return VLO_SYNTAX_HELP;
70    }
71   
72    public static JavaScriptResourceReference getSearchFormJS() {
73        return SEARCH_FORM;
74    }
75
76    public static ResourceReference getFieldsTableJS() {
77        return FIELDS_TABLE;
78    }
79   
80}
Note: See TracBrowser for help on using the repository browser.