diff options
author | luxagraf <sng@luxagraf.net> | 2010-10-23 19:46:20 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2010-10-23 19:46:20 -0400 |
commit | c59a2a69fb38b92b6c45bcf7431d2b1a3c5dce3c (patch) | |
tree | 2fc44ca867839d5e591e21467b6e4526f7a9f080 /lib/grappelli/templates/admin_tools/menu/menu.html | |
parent | ed77da873e675f02f12cbab9be27f342f825444b (diff) |
added grappelli, filebrowser, chunks and tagging to lcal repo
Diffstat (limited to 'lib/grappelli/templates/admin_tools/menu/menu.html')
-rw-r--r-- | lib/grappelli/templates/admin_tools/menu/menu.html | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/lib/grappelli/templates/admin_tools/menu/menu.html b/lib/grappelli/templates/admin_tools/menu/menu.html new file mode 100644 index 0000000..f43dc23 --- /dev/null +++ b/lib/grappelli/templates/admin_tools/menu/menu.html @@ -0,0 +1,64 @@ +{% load i18n admin_tools_menu_tags %} +{% if menu.children %} + <script type="text/javascript" src="{{ media_url }}/admin_tools/js/utils.js"></script> + <script type="text/javascript" charset="utf-8"> + // Load js files syncronously and conditionally + var js_files = [ + { + src : '{{ media_url }}/admin_tools/js/jquery/jquery.min.js', + test: function() { return typeof(jQuery) == 'undefined'; } + }, + { + src : '{{ media_url }}/admin_tools/js/json.min.js', + test: function() { return typeof(JSON.stringify) == 'undefined'; } + }, + { + src : '{{ media_url }}/admin_tools/js/menu.js', + test: function() { return true; } + }{% for js in menu.Media.js %}, + { + src : '{{ media_url }}/{{ js }}', + test: function() { return true; } + }{% endfor %} + ]; + loadScripts(js_files, function(){ + jQuery(function($) { + {% if has_bookmark_item %} + process_bookmarks( + "{{ request.get_full_path }}", + "{{ title }}", + "{% trans 'Please enter a name for the bookmark' %}" + ); + {% endif %} + }); + }); + </script> + {% comment %} + {% for item in menu.children %} + <ul class="navigation-menu"> + {% admin_tools_render_menu_item item forloop.counter %} + {% ifequal item.css_classes|join:' ' "bookmark" %} + <li class="actions"> + {% if bookmark %} + {% include "admin_tools/menu/remove_bookmark_form.html" %} + {% else %} + {% include "admin_tools/menu/add_bookmark_form.html" %} + {% endif %} + </li> + {% endifequal %} + </ul> + {% endfor %} + {% endcomment %} + {% for item in menu.children %} + <ul class="navigation-menu"> + {% admin_tools_render_menu_item item forloop.counter %} + </ul> + {% ifequal item.css_classes|join:' ' "bookmark" %} + {% if bookmark %} + {% include "admin_tools/menu/remove_bookmark_form.html" %} + {% else %} + {% include "admin_tools/menu/add_bookmark_form.html" %} + {% endif %} + {% endifequal %} + {% endfor %} +{% endif %} |