aboutsummaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authordjones <dgjones@gmail.com>2010-09-07 16:18:27 +1200
committerdjones <dgjones@gmail.com>2010-09-07 16:18:27 +1200
commit4450b5634545b6694dfc5f97898c0dbcc01ea77b (patch)
treea0acc7293a38d73157f4006c0bc7c394ae021c6a /public
parent18a708984ce40b5053ee6db5ff337e4ea9df986b (diff)
downloadrefinerycms-blog-4450b5634545b6694dfc5f97898c0dbcc01ea77b.tar.gz
refinerycms-blog-4450b5634545b6694dfc5f97898c0dbcc01ea77b.tar.bz2
refinerycms-blog-4450b5634545b6694dfc5f97898c0dbcc01ea77b.zip
backport these changes from my client project into the gem
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/refinery/refinerycms-blog.js10
-rw-r--r--public/stylesheets/refinery/refinerycms-blog.css22
2 files changed, 24 insertions, 8 deletions
diff --git a/public/javascripts/refinery/refinerycms-blog.js b/public/javascripts/refinery/refinerycms-blog.js
index fdbf392..3ddbcc2 100644
--- a/public/javascripts/refinery/refinerycms-blog.js
+++ b/public/javascripts/refinery/refinerycms-blog.js
@@ -15,15 +15,19 @@ $(document).ready(function(){
$('ul.collapsible_menu').each(function(i, ul) {
(first_li = $(this).children('li:first')).after(div=$("<div></div>"));
-
+
+ $("<span class='arrow'>&nbsp;</span>").appendTo(first_li)
+
if (($(this).children('li.selected')).length == 0) {
div.hide();
first_li.addClass("closed");
}
$(this).children('li:not(:first)').appendTo(div);
- first_li.find('> a').click(function(e){
- first_li.toggleClass("closed");
+ first_li.find('> a, > span.arrow').click(function(e){
+ $(this).parent().toggleClass("closed");
+ $(this).parent().toggleClass("open");
+
$(this).parent().next('div').animate({
opacity: 'toggle'
, height: 'toggle'
diff --git a/public/stylesheets/refinery/refinerycms-blog.css b/public/stylesheets/refinery/refinerycms-blog.css
index bede6ce..ff6a934 100644
--- a/public/stylesheets/refinery/refinerycms-blog.css
+++ b/public/stylesheets/refinery/refinerycms-blog.css
@@ -31,9 +31,21 @@
.page_add_icon {
background-image: url('/images/refinerycms-blog/icons/page_add.png');
}
-.collapsible_menu li:first {
- background-image: url('/images/refinerycms-blog/icons/up.png');
-}
-.collapsible_menu li.closed {
- background-image: url('/images/refinerycms-blog/icons/down.png');
+ul.collapsible_menu li {
+ position: relative;
+}
+ul.collapsible_menu li span.arrow {
+ background-repeat: no-repeat;
+ position: absolute;
+ right: 10px;
+ top: 13px;
+ width: 11px;
+ height: 7px;
+ cursor: pointer;
+}
+ul.collapsible_menu li span.arrow {
+ background-image: url('/images/refinerycms-blog/icons/up.gif');
+}
+ul.collapsible_menu li.closed span.arrow {
+ background-image: url('/images/refinerycms-blog/icons/down.gif');
} \ No newline at end of file