aboutsummaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2010-09-03 23:32:07 +1200
committerPhilip Arndt <parndt@gmail.com>2010-09-03 23:32:07 +1200
commita2f655b55eb30a900020e8aff9601ed0606ce58f (patch)
treed57cf7aef6ae36a4751144587fab7fe2e508d491 /public
parentc4222bfdf5733d1552a2ecf4468d89cf89a583b1 (diff)
downloadrefinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.tar.gz
refinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.tar.bz2
refinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.zip
Hello rails3 support.
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/refinery/refinerycms-blog.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/public/javascripts/refinery/refinerycms-blog.js b/public/javascripts/refinery/refinerycms-blog.js
index 0159655..c92ba3e 100644
--- a/public/javascripts/refinery/refinerycms-blog.js
+++ b/public/javascripts/refinery/refinerycms-blog.js
@@ -1,6 +1,9 @@
$(document).ready(function(){
$('nav#actions.multilist > ul:not(.search_list) li a[href$=' + window.location.pathname + ']')
.parent().addClass('selected');
+ if($('nav#actions.multilist > ul:not(.search_list) li.selected').length == 0) {
+ $('nav#actions.multilist > ul:not(.search_list) li a:nth(1)').parent().addClass('selected');
+ }
$('nav#actions.multilist > ul:not(.search_list) li > a').each(function(i,a){
if ($(this).data('dialog-title') == null) {
@@ -16,7 +19,7 @@ $(document).ready(function(){
div.hide();
}
$(this).children('li:not(:first)').appendTo(div);
-
+
first_li.find('> a').click(function(e){
$(this).parent().next('div').animate({
opacity: 'toggle'
@@ -32,8 +35,8 @@ $(document).ready(function(){
$('.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');
+ .removeClass('failure_icon').removeClass('success_icon')
+ .addClass(data.enabled ? 'success_icon' : 'failure_icon');
}, $(this)));
e.preventDefault();
});