Anonymous avatar Anonymous committed da51a9b

Moving jQuery.noConflict() call into later script tag to avoid error.

Comments (0)

Files changed (2)

admin_tools/dashboard/templates/dashboard/dashboard.html

     if (typeof jQuery == 'undefined') {
         var script_url = '{{ media_url }}/admin_tools/js/jquery/jquery-1.4.1.min.js';
         document.write(unescape('%3Cscript src="' + script_url + '" type="text/javascript"%3E%3C/script%3E'));
-        jQuery.noConflict();
     }
 </script>
 <script type="text/javascript" charset="utf-8">
+    jQuery.noConflict();
     // load jquery ui if it's not loaded yet
     if (typeof jQuery.ui == 'undefined') {
         var script_url = '{{ media_url }}/admin_tools/js/jquery/jquery-ui-1.8rc1.custom.min.js';
 
 <script type="text/javascript">
 // <![CDATA[
-jQuery(document).ready(function() {
-    jQuery('#{{ dashboard.get_id }}').dashboard({
+jQuery(function($) {
+    $('#{{ dashboard.get_id }}').dashboard({
         'columns': {{ dashboard.columns }}
     });
 });

admin_tools/menu/templates/menu/menu.html

     if (typeof jQuery == 'undefined') {
         var jquery_url = '{{ media_url }}/admin_tools/js/jquery/jquery-1.4.1.min.js';
         document.write(unescape('%3Cscript src="' + jquery_url + '" type="text/javascript"%3E%3C/script%3E'));
-        jQuery.noConflict();
     }
 </script>
 <script type="text/javascript" charset="utf-8">
+    jQuery.noConflict();
     // load json if it's not loaded yet
     if (typeof JSON == 'undefined') {
         var script_url = '{{ media_url }}/admin_tools/js/json.min.js';
 <![endif]-->
 {% if has_bookmark_item %}
 <script type="text/javascript">
-jQuery(document).ready(function() {
+jQuery(function($) {
     process_bookmarks("{{ request.get_full_path }}", "{{ title }}", "{% trans 'Please enter a name for the bookmark' %}");
 });
 </script>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.