aboutsummaryrefslogtreecommitdiffstats
path: root/public/javascripts/refinery
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2010-08-26 20:53:46 +1200
committerPhilip Arndt <parndt@gmail.com>2010-08-26 20:53:46 +1200
commitc343dd2889402a5e0eca4d490fbd0fbf3c892b70 (patch)
treec3cf5ddf4759c86107e89296faf47d86bda20c04 /public/javascripts/refinery
parent5cb85902866dfc0f64885a76ce38f23dd1f89d53 (diff)
downloadrefinerycms-blog-c343dd2889402a5e0eca4d490fbd0fbf3c892b70.tar.gz
refinerycms-blog-c343dd2889402a5e0eca4d490fbd0fbf3c892b70.tar.bz2
refinerycms-blog-c343dd2889402a5e0eca4d490fbd0fbf3c892b70.zip
display more frontend, create separate css for frontend and backend, namespace the js in the same fashion, now has full English support..
Diffstat (limited to 'public/javascripts/refinery')
-rw-r--r--public/javascripts/refinery/refinerycms-blog.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/public/javascripts/refinery/refinerycms-blog.js b/public/javascripts/refinery/refinerycms-blog.js
new file mode 100644
index 0000000..0159655
--- /dev/null
+++ b/public/javascripts/refinery/refinerycms-blog.js
@@ -0,0 +1,40 @@
+$(document).ready(function(){
+ $('nav#actions.multilist > ul:not(.search_list) li a[href$=' + window.location.pathname + ']')
+ .parent().addClass('selected');
+
+ $('nav#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