From 3b9bedaa8716b8baabdf218cc80a0f377fff69ad Mon Sep 17 00:00:00 2001 From: AurelioAHeckert Date: Thu, 1 May 2008 15:36:54 +0000 Subject: [PATCH] ActionItem360: start the zen3 theme --- app/views/layouts/application.rhtml | 2 ++ app/views/shared/categories_menu.rhtml | 6 +++++- public/designs/themes/ecosol/images/list-dot.gif | Bin 0 -> 59 bytes public/designs/themes/ecosol/javascript/auto-open-menu.js | 64 ---------------------------------------------------------------- public/designs/themes/ecosol/stylesheets/common.css | 19 +++++++++++++++++++ public/designs/themes/ecosol/theme.yml | 6 +++--- public/designs/themes/zen3/javascript/config.js | 2 ++ public/designs/themes/zen3/theme.yml | 3 +++ public/images/beta.gif | Bin 417 -> 0 bytes public/images/list-dot.gif | Bin 59 -> 0 bytes public/javascripts/auto-open-menu.js | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/stylesheets/common.css | 24 ++++-------------------- 12 files changed, 102 insertions(+), 88 deletions(-) create mode 100644 public/designs/themes/ecosol/images/list-dot.gif delete mode 100644 public/designs/themes/ecosol/javascript/auto-open-menu.js create mode 100644 public/designs/themes/zen3/javascript/config.js create mode 100644 public/designs/themes/zen3/theme.yml delete mode 100644 public/images/list-dot.gif create mode 100644 public/javascripts/auto-open-menu.js diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index 81d1612..66113c7 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -33,9 +33,11 @@ <%= stylesheet_link_tag '/designs/templates/default/stylesheets/style.css' %> <%= stylesheet_link_tag '/designs/icons/default/style.css' %> + <%= javascript_include_tag 'default-config' %> <%= javascript_include_tag :defaults %> <%# javascript_include_tag 'animator' %> <%= javascript_include_tag 'menu' %> + <%= javascript_include_tag 'auto-open-menu' %> <%= include_lightbox_header %> <%# cms stuff %> <% if @controller.controller_name == 'cms' %> diff --git a/app/views/shared/categories_menu.rhtml b/app/views/shared/categories_menu.rhtml index 1e4624c..624975d 100644 --- a/app/views/shared/categories_menu.rhtml +++ b/app/views/shared/categories_menu.rhtml @@ -25,4 +25,8 @@
- + diff --git a/public/designs/themes/ecosol/images/list-dot.gif b/public/designs/themes/ecosol/images/list-dot.gif new file mode 100644 index 0000000..e323287 Binary files /dev/null and b/public/designs/themes/ecosol/images/list-dot.gif differ diff --git a/public/designs/themes/ecosol/javascript/auto-open-menu.js b/public/designs/themes/ecosol/javascript/auto-open-menu.js deleted file mode 100644 index 69b675d..0000000 --- a/public/designs/themes/ecosol/javascript/auto-open-menu.js +++ /dev/null @@ -1,64 +0,0 @@ - -function setAutoOpenMenu( menu ) { - - var mul = menu.getElementsByTagName("ul")[0]; - if ( !mul ) return false; - - mul.h = mul.clientHeight; // remember the current height to a faster animation - mul.minSize = mul.clientHeight; - var vli = mul.getElementsByTagName("li"); - mul.paddingBottom = parseInt( menu.className.replace( /^.*AOM_paddingBottom_([^\s]+).*$/, "$1" ) ); - mul.maxSize = ( vli.length * ( vli[1].offsetTop - vli[0].offsetTop ) ); - mul.inc = 1; - - window["autoOpenMenu-"+menu.id] = menu; - menu.mul = mul; - - if ( mul.minSize == 1 ) { - // Work arround bug for IE - ie sux - ie sux - ie sux - ie sux -ie sux -ie sux -ie sux - ie sux!!! - mul.h = 3; - setTimeout('m = window[\'autoOpenMenu-'+menu.id+'\']; m.onmouseout()', 10); - } - - menu.isIE = ( navigator.appName.indexOf("Microsoft") > -1 ); - - menu.onmouseover = function () { - clearTimeout( this.timeoutClose ); - var mul = this.mul; - if ( mul.paddingBottom ) mul.parentNode.style.paddingBottom = mul.paddingBottom +"px"; - if ( mul.h < mul.maxSize ) { - mul.h += mul.inc; - mul.inc += 2; - mul.style.height = mul.h +"px"; - this.timeoutOpen = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseover()", 33 ); - } else { - mul.h = mul.maxSize; - mul.style.height = mul.h +"px"; - mul.inc = 1; - } - } - - menu.onmouseout = function ( doIt, firstDoIt ) { - clearTimeout( this.timeoutOpen ); - var mul = this.mul; - if ( firstDoIt ) mul.inc = 1; - if ( doIt == true ) { - if ( mul.h > mul.minSize ) { - mul.h -= mul.inc++; - if ( mul.h < 0 ) mul.h = 0; - if ( this.isIE ) if ( mul.h < 1 ) mul.h = 1; - mul.style.height = mul.h +"px"; - this.timeoutClose = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseout(true)", 33 ); - } else { - mul.h = mul.minSize; - mul.style.height = mul.h +"px"; - if ( mul.paddingBottom ) mul.parentNode.style.paddingBottom = "0px"; - mul.inc = 2; - } - } else { - // Work arround IE bug - this.timeoutClose = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseout(true, true)", 200 ); - } - } - -} diff --git a/public/designs/themes/ecosol/stylesheets/common.css b/public/designs/themes/ecosol/stylesheets/common.css index ee75826..1622056 100644 --- a/public/designs/themes/ecosol/stylesheets/common.css +++ b/public/designs/themes/ecosol/stylesheets/common.css @@ -48,6 +48,25 @@ body.category2 a:visited { color: #8A6 } a:hover, a:active { color: #08F } body.category2 a:hover { color: #5C0 } + +body.category1 #content h1, body.category1 #content h2, body.category1 #content h3, +body.category1 #content h4, body.category1 #content h5, body.category1 #content h6 + { color: #E26B00 } +body.category2 #content h1, body.category2 #content h2, body.category2 #content h3, +body.category2 #content h4, body.category2 #content h5, body.category2 #content h6 + { color: #58A80A } +body.category3 #content h1, body.category3 #content h2, body.category3 #content h3, +body.category3 #content h4, body.category3 #content h5, body.category3 #content h6 + { color: #694371 } +body.category4 #content h1, body.category4 #content h2, body.category4 #content h3, +body.category4 #content h4, body.category4 #content h5, body.category4 #content h6 + { color: #B80000 } + +#content ul li { + list-style: url(../images/list-dot.gif); +} + + /* file manager (big) style */ div.file-manager { diff --git a/public/designs/themes/ecosol/theme.yml b/public/designs/themes/ecosol/theme.yml index fdf2d0a..7bea93d 100644 --- a/public/designs/themes/ecosol/theme.yml +++ b/public/designs/themes/ecosol/theme.yml @@ -1,3 +1,3 @@ -title: "Default" -description: "A simple theme" -js: [ auto-open-menu ] +title: "EcoSol" +description: "O thema para o ambiente da Economia Solidária" +js: [ ] diff --git a/public/designs/themes/zen3/javascript/config.js b/public/designs/themes/zen3/javascript/config.js new file mode 100644 index 0000000..4729e73 --- /dev/null +++ b/public/designs/themes/zen3/javascript/config.js @@ -0,0 +1,2 @@ + +assetsMenu.autoOpen = false diff --git a/public/designs/themes/zen3/theme.yml b/public/designs/themes/zen3/theme.yml new file mode 100644 index 0000000..4d52107 --- /dev/null +++ b/public/designs/themes/zen3/theme.yml @@ -0,0 +1,3 @@ +title: "Zen3" +description: "The Orange Zen3" +js: [ config ] diff --git a/public/images/beta.gif b/public/images/beta.gif index 1fd73c4..8a7c017 100644 Binary files a/public/images/beta.gif and b/public/images/beta.gif differ diff --git a/public/images/list-dot.gif b/public/images/list-dot.gif deleted file mode 100644 index e323287..0000000 Binary files a/public/images/list-dot.gif and /dev/null differ diff --git a/public/javascripts/auto-open-menu.js b/public/javascripts/auto-open-menu.js new file mode 100644 index 0000000..69b675d --- /dev/null +++ b/public/javascripts/auto-open-menu.js @@ -0,0 +1,64 @@ + +function setAutoOpenMenu( menu ) { + + var mul = menu.getElementsByTagName("ul")[0]; + if ( !mul ) return false; + + mul.h = mul.clientHeight; // remember the current height to a faster animation + mul.minSize = mul.clientHeight; + var vli = mul.getElementsByTagName("li"); + mul.paddingBottom = parseInt( menu.className.replace( /^.*AOM_paddingBottom_([^\s]+).*$/, "$1" ) ); + mul.maxSize = ( vli.length * ( vli[1].offsetTop - vli[0].offsetTop ) ); + mul.inc = 1; + + window["autoOpenMenu-"+menu.id] = menu; + menu.mul = mul; + + if ( mul.minSize == 1 ) { + // Work arround bug for IE - ie sux - ie sux - ie sux - ie sux -ie sux -ie sux -ie sux - ie sux!!! + mul.h = 3; + setTimeout('m = window[\'autoOpenMenu-'+menu.id+'\']; m.onmouseout()', 10); + } + + menu.isIE = ( navigator.appName.indexOf("Microsoft") > -1 ); + + menu.onmouseover = function () { + clearTimeout( this.timeoutClose ); + var mul = this.mul; + if ( mul.paddingBottom ) mul.parentNode.style.paddingBottom = mul.paddingBottom +"px"; + if ( mul.h < mul.maxSize ) { + mul.h += mul.inc; + mul.inc += 2; + mul.style.height = mul.h +"px"; + this.timeoutOpen = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseover()", 33 ); + } else { + mul.h = mul.maxSize; + mul.style.height = mul.h +"px"; + mul.inc = 1; + } + } + + menu.onmouseout = function ( doIt, firstDoIt ) { + clearTimeout( this.timeoutOpen ); + var mul = this.mul; + if ( firstDoIt ) mul.inc = 1; + if ( doIt == true ) { + if ( mul.h > mul.minSize ) { + mul.h -= mul.inc++; + if ( mul.h < 0 ) mul.h = 0; + if ( this.isIE ) if ( mul.h < 1 ) mul.h = 1; + mul.style.height = mul.h +"px"; + this.timeoutClose = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseout(true)", 33 ); + } else { + mul.h = mul.minSize; + mul.style.height = mul.h +"px"; + if ( mul.paddingBottom ) mul.parentNode.style.paddingBottom = "0px"; + mul.inc = 2; + } + } else { + // Work arround IE bug + this.timeoutClose = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseout(true, true)", 200 ); + } + } + +} diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index 30bb63d..25e5e0d 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -7,11 +7,11 @@ body { #beta-tag { position: absolute; - top: 50px; - left: 50px; + top: 40px; + left: 40px; background-image: url(../images/beta.gif); - width: 128px; - height: 36px; + width: 79px; + height: 25px; } #beta-tag span { display: none; @@ -132,27 +132,11 @@ div#notice { #content h4 { font-size: 16px } #content h5 { font-size: 14px } #content h6 { font-size: 12px } -body.category1 #content h1, body.category1 #content h2, body.category1 #content h3, -body.category1 #content h4, body.category1 #content h5, body.category1 #content h6 - { color: #E26B00 } -body.category2 #content h1, body.category2 #content h2, body.category2 #content h3, -body.category2 #content h4, body.category2 #content h5, body.category2 #content h6 - { color: #58A80A } -body.category3 #content h1, body.category3 #content h2, body.category3 #content h3, -body.category3 #content h4, body.category3 #content h5, body.category3 #content h6 - { color: #694371 } -body.category4 #content h1, body.category4 #content h2, body.category4 #content h3, -body.category4 #content h4, body.category4 #content h5, body.category4 #content h6 - { color: #B80000 } #content .block-title { margin: 0px 0px 10px 0px; } -#content ul li { - list-style: url(/images/list-dot.gif); -} - #better-browser-promotion { position: absolute; -- libgit2 0.21.2