Added jquery cdn support
authorMarcel Werk <burntime@woltlab.com>
Fri, 10 May 2013 23:47:44 +0000 (01:47 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 10 May 2013 23:47:44 +0000 (01:47 +0200)
com.woltlab.wcf/option.xml
com.woltlab.wcf/template/headInclude.tpl
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index bb62172a54568a25d095677737931da510be0d93..fbc5e6ca2fbebdf75cd9b8f6b7ea6af242940d92 100644 (file)
@@ -54,6 +54,9 @@
                                        <category name="general.system.date">
                                                <parent>general.system</parent>
                                        </category>
+                                       <category name="general.system.jquery">
+                                               <parent>general.system</parent>
+                                       </category>
                                <category name="general.mail">
                                        <parent>general</parent>
                                </category>
@@ -312,6 +315,17 @@ imagick:wcf.acp.option.image_adapter_type.imagick]]>
                        </option>
                        <!-- /general.system.date -->
                        
+                       <!-- general.system.jquery -->
+                       <option name="jquery_source">
+                               <categoryname>general.system.jquery</categoryname>
+                               <optiontype>radioButton</optiontype>
+                               <defaultvalue>google</defaultvalue>
+                               <selectoptions>local:wcf.acp.option.jquery_source.local
+google:wcf.acp.option.jquery_source.google
+microsoft:wcf.acp.option.jquery_source.microsoft</selectoptions>
+                       </option>
+                       <!-- /general.system.jquery -->
+                       
                        <!-- mail.general -->
                        <option name="mail_from_name">
                                <categoryname>general.mail.general</categoryname>
index 584c42d2b2617468877dfc34690dee7d6a1f5308..1ad2c05ebf1414f721fb615d9761eaf426047d30 100644 (file)
        var TIME_NOW = {@TIME_NOW};
        //]]>
 </script>
+{if JQUERY_SOURCE == 'google'}
+<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
+<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
+{else if JQUERY_SOURCE == 'microsoft'}
+<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.0.min.js"></script>
+<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jquery.ui/1.10.2/jquery-ui.min.js"></script>
+{else}
 <script type="text/javascript" src="{@$__wcf->getPath()}js/3rdParty/jquery.min.js"></script>
 <script type="text/javascript" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.min.js"></script>
+{/if}
+{if JQUERY_SOURCE != 'local'}
+<script type="text/javascript">
+       //<![CDATA[
+       if (!window.jQuery) {
+               document.write('<script type="text/javascript" src="{@$__wcf->getPath()}js/3rdParty/jquery.min.js"><\/script>');
+               document.write('<script type="text/javascript" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.min.js"><\/script>');
+       }
+       //]]>
+</script>
+{/if}
 <script type="text/javascript" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.nestedSortable.js"></script>
 <script type="text/javascript" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.timepicker.min.js"></script>
 <script type="text/javascript" src="{@$__wcf->getPath()}js/WCF.js"></script>
index 4e03e76fadb26b177dfe1717739c7137d456c7f2..f691b0725a10492f8ba5b4ceb42f8bc53e00b414 100644 (file)
                <item name="wcf.acp.option.category.user.general"><![CDATA[Allgemein]]></item>
                <item name="wcf.acp.option.category.security.antispam"><![CDATA[Anti-Spam]]></item>
                <item name="wcf.acp.option.category.security.censorship"><![CDATA[Zensur]]></item>
+               <item name="wcf.acp.option.category.general.system.jquery"><![CDATA[jQuery]]></item>
                
                <item name="wcf.acp.option.cookie_domain"><![CDATA[Cookiedomain]]></item>
                <item name="wcf.acp.option.cookie_domain.description"><![CDATA[Standardmäßig sollten Sie dieses Feld frei lassen, da ein Ausfüllen nur in wenigen Fällen notwendig ist.]]></item>
                <item name="wcf.acp.option.external_link_rel_nofollow.description"><![CDATA[Das Attribut „rel="nofollow"“ weist Suchmaschinen an, einen bestimmten Link auf einer Seite zu ignorieren.]]></item>
                <item name="wcf.acp.option.external_link_target_blank"><![CDATA[Externe Links in neuem Fenster öffnen]]></item>
                <item name="wcf.acp.option.external_link_target_blank.description"><![CDATA[Setzt das Attribut „target="_blank"“ auf externe Links und weist den Browser dadurch an, einen aufgerufenen Link in einem neuen Browser-Fenster zu öffnen.]]></item>
+               <item name="wcf.acp.option.jquery_source"><![CDATA[jQuery-Quelle]]></item>
+               <item name="wcf.acp.option.jquery_source.local"><![CDATA[lokale Version]]></item>
+               <item name="wcf.acp.option.jquery_source.google"><![CDATA[Google Hosted Libraries CDN]]></item>
+               <item name="wcf.acp.option.jquery_source.microsoft"><![CDATA[Microsoft Ajax CDN]]></item>
        </category>
        
        <category name="wcf.acp.package">
index a0e8c416be4a0fee0ce572fd0cc0ca2d04aba425..0e2729538cfbc24c285a5c71baaffa4d4344f890 100644 (file)
                <item name="wcf.acp.option.category.user.general"><![CDATA[General]]></item>
                <item name="wcf.acp.option.category.security.antispam"><![CDATA[Anti-Spam]]></item>
                <item name="wcf.acp.option.category.security.censorship"><![CDATA[Censorship]]></item>
+               <item name="wcf.acp.option.category.general.system.jquery"><![CDATA[jQuery]]></item>
                
                <item name="wcf.acp.option.cookie_domain"><![CDATA[Cookie Domain]]></item>
                <item name="wcf.acp.option.cookie_domain.description"><![CDATA[Should be left blank except for special circumstances.]]></item>
                <item name="wcf.acp.option.external_link_rel_nofollow.description"><![CDATA[The attribute “rel="nofollow"” tells search engines to disregard external links.]]></item>
                <item name="wcf.acp.option.external_link_target_blank"><![CDATA[Open external links in a new window]]></item>
                <item name="wcf.acp.option.external_link_target_blank.description"><![CDATA[Appends the attribute “target="_blank"” to external links, causing the user’s browser to open the link in a new window.]]></item>
+               <item name="wcf.acp.option.jquery_source"><![CDATA[jQuery Source]]></item>
+               <item name="wcf.acp.option.jquery_source.local"><![CDATA[Local Version]]></item>
+               <item name="wcf.acp.option.jquery_source.google"><![CDATA[Google Hosted Libraries CDN]]></item>
+               <item name="wcf.acp.option.jquery_source.microsoft"><![CDATA[Microsoft Ajax CDN]]></item>
        </category>
        
        <category name="wcf.acp.package">