diff options
author | Philip Arndt <parndt@gmail.com> | 2010-08-09 22:07:22 +1200 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2010-08-09 22:07:22 +1200 |
commit | 009e869930b70c47622c345fb61f36f8a413c66d (patch) | |
tree | 9dab05e5a88ffbf21bf9ada4c0cbf9cfa1b87c05 /app/views/admin | |
parent | e01b14140a716d51e3de125c8cbd39ed7631dce2 (diff) | |
download | refinerycms-blog-009e869930b70c47622c345fb61f36f8a413c66d.tar.gz refinerycms-blog-009e869930b70c47622c345fb61f36f8a413c66d.tar.bz2 refinerycms-blog-009e869930b70c47622c345fb61f36f8a413c66d.zip |
Add hacky little script to show a loading icon when you click one of the expanding menus.
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/blog/_submenu.html.erb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/views/admin/blog/_submenu.html.erb b/app/views/admin/blog/_submenu.html.erb index efaeddd..a842158 100644 --- a/app/views/admin/blog/_submenu.html.erb +++ b/app/views/admin/blog/_submenu.html.erb @@ -18,7 +18,7 @@ </li> </ul> - <ul> + <ul style='margin-top: 30px'> <li<%= " class='selected'" if request.path == admin_blog_comments_path %>> <%= link_to t('.comments.new'), admin_blog_comments_path, :class => 'user_comment_icon' %> @@ -33,7 +33,7 @@ </li> </ul> - <ul class='collapsible_menu'> + <ul class='collapsible_menu' style='margin-top: 30px'> <li<%= " class='selected'" if request.path == admin_blog_categories_path %>> <%= link_to t('.categories.title'), admin_blog_categories_url, :class => 'category_icon'%> @@ -48,7 +48,7 @@ </li> </ul> - <ul class='collapsible_menu'> + <ul class='collapsible_menu' style='margin-top: 30px'> <li<%= " class='selected'" if request.path == admin_blog_settings_path %>> <%= link_to t('.settings.title'), admin_blog_settings_path, :class => 'settings_icon' %> @@ -71,8 +71,11 @@ $('ul.collapsible_menu').each(function(i, ul) { (first_li = $(this).children('li:first')).after(div=$("<div style='display: none'></div>")); $(this).children('li:not(:first)').appendTo(div); - first_li.click(function(e){ - $(this).next('div').animate({opacity: 'toggle', height: 'toggle'}, 250); + first_li.find('> a').click(function(e){ + $(this).css('background-image', 'url(/images/refinery/ajax-loader.gif) !important'); + $(this).parent().next('div').animate({opacity: 'toggle', height: 'toggle'}, 250, $.proxy(function(){ + $(this).css('background-image', null); + }, $(this))); e.preventDefault(); }); }); |