aboutsummaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2010-08-18 15:20:22 +1200
committerPhilip Arndt <parndt@gmail.com>2010-08-18 15:20:22 +1200
commit6086ac36adf6f54a5d2957ffdf101e251edd553c (patch)
tree1af783d082c4bb04afd57a1a181acf886d754316 /public/javascripts
parentaec6ed5a1ffc32929e7c12e3ef7a9e69ed45cc19 (diff)
downloadrefinerycms-blog-6086ac36adf6f54a5d2957ffdf101e251edd553c.tar.gz
refinerycms-blog-6086ac36adf6f54a5d2957ffdf101e251edd553c.tar.bz2
refinerycms-blog-6086ac36adf6f54a5d2957ffdf101e251edd553c.zip
Made use of new ajax loader from Neoteric Design that is now in Refinery core, regenerated gemspec, set up js and css files and currently just reading them in (this will work better under rails3)
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/refinerycms-blog.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/public/javascripts/refinerycms-blog.js b/public/javascripts/refinerycms-blog.js
index e69de29..b668965 100644
--- a/public/javascripts/refinerycms-blog.js
+++ b/public/javascripts/refinerycms-blog.js
@@ -0,0 +1,40 @@
+$(document).ready(function(){
+ $('div#actions.multilist > ul:not(.search_list) li a[href$=' + window.location.pathname + ']')
+ .parent().addClass('selected');
+
+ $('div#actions.multilist > ul:not(.search_list) li > a').each(function(i,a){
+ if ($(this).data('dialog-title') == null) {
+ $(this).bind('click', function(){
+ $(this).css('background-image', "url('/images/refinery/icons/ajax-loader.gif') !important");
+ });
+ }
+ });
+
+ $('ul.collapsible_menu').each(function(i, ul) {
+ (first_li = $(this).children('li:first')).after(div=$("<div></div>"));
+ if (($(this).children('li.selected')).length == 0) {
+ div.hide();
+ }
+ $(this).children('li:not(:first)').appendTo(div);
+
+ first_li.find('> a').click(function(e){
+ $(this).parent().next('div').animate({
+ opacity: 'toggle'
+ , height: 'toggle'
+ }, 250, $.proxy(function(){
+ $(this).css('background-image', null);
+ }, $(this))
+ );
+ e.preventDefault();
+ });
+ });
+
+ $('.success_icon, .failure_icon').bind('click', function(e) {
+ $.get($(this).attr('href'), $.proxy(function(data){
+ $(this).css('background-image', null)
+ .toggleClass('success_icon')
+ .toggleClass('failure_icon');
+ }, $(this)));
+ e.preventDefault();
+ });
+}); \ No newline at end of file