template.jquery.head.ftl Maven / Gradle / Ivy
<#--
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
-->
<#if !jQueryVersion?? >
<#assign jQueryVersion="1.5.2">
#if>
<#if parameters.scriptPath?if_exists != "">
<#assign javaScriptBasePath="${parameters.scriptPath?string}">
<#else>
<#assign javaScriptBasePath="${base}/struts/">
#if>
<#assign googlePath="http://ajax.googleapis.com/ajax/libs/jquery/${jQueryVersion}">
<#assign googleUiPath="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14">
<#if parameters.customBasepath?if_exists != "">
<#assign basePath="${parameters.customBasepath?string}">
<#else>
<#assign basePath="${javaScriptBasePath}themes">
#if>
<#if parameters.compressed?default(true)>
<#assign jqueryFile="jquery-${jQueryVersion}.min.js">
<#assign jqueryForm="jquery.form.min.js">
<#assign jqueryUIFile="jquery-ui.min.js">
<#assign jqueryUICoreFile="jquery.ui.core.min.js">
<#assign jqueryRequireFile="jquery.require.min.js">
<#assign jquerySubscribeFile="jquery.subscribe.min.js">
<#assign jqueryHistoryFile="jquery.ba-bbq.min.js">
<#assign jqueryCompat13File="jquery.compat-1.3.min.js">
<#assign jqueryStrutsFile="jquery.struts2-3.1.0.min.js">
<#assign jqueryGoogle="${googlePath}/jquery.min.js">
<#assign jqueryUiGoogle="${googleUiPath}/jquery-ui.min.js">
<#else>
<#assign jqueryFile="jquery-${jQueryVersion}.js">
<#assign jqueryForm="jquery.form.js">
<#assign jqueryUIFile="jquery-ui.js">
<#assign jqueryUICoreFile="jquery.ui.core.js">
<#assign jqueryRequireFile="jquery.require.js">
<#assign jquerySubscribeFile="jquery.subscribe.js">
<#assign jqueryHistoryFile="jquery.ba-bbq.js">
<#assign jqueryCompat13File="jquery.compat-1.3.js">
<#assign jqueryStrutsFile="jquery.struts2-3.1.0.js">
<#assign jqueryGoogle="${googlePath}/jquery.js">
<#assign jqueryUiGoogle="${googleUiPath}/jquery-ui.js">
#if>
<#if parameters.loadFromGoogle?default(false)>
<#if parameters.jqueryui?default(true)>
<#if parameters.jqueryLocale?if_exists != "" && parameters.jqueryLocale?if_exists != "en">
#if>
#if>
<#else>
<#if parameters.jqueryui?default(true)>
<#if parameters.loadAtOnce?default(false)>
<#if parameters.jqueryLocale?if_exists != "" && parameters.jqueryLocale?if_exists != "en">
#if>
<#else>
#if>
#if>
#if>
<#if parameters.compatibility?if_exists == "1.3">
#if>
<#if parameters.loadAtOnce?default(false) || parameters.loadFromGoogle?default(false)>
#if>
<#if parameters.ajaxhistory?default(false)>
#if>
<#if parameters.jqueryui?default(true)>
<#if parameters.jquerytheme?if_exists != "">
<#if parameters.loadFromGoogle?default(false) && basePath == "${base}/struts/themes">
<#else>
#if>
<#else>
#if>
#if>