Commit 3b9bedaa8716b8baabdf218cc80a0f377fff69ad

Authored by AurelioAHeckert
1 parent 35770e59

ActionItem360: start the zen3 theme

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1760 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/views/layouts/application.rhtml
... ... @@ -33,9 +33,11 @@
33 33 <%= stylesheet_link_tag '/designs/templates/default/stylesheets/style.css' %>
34 34 <%= stylesheet_link_tag '/designs/icons/default/style.css' %>
35 35  
  36 + <%= javascript_include_tag 'default-config' %>
36 37 <%= javascript_include_tag :defaults %>
37 38 <%# javascript_include_tag 'animator' %>
38 39 <%= javascript_include_tag 'menu' %>
  40 + <%= javascript_include_tag 'auto-open-menu' %>
39 41 <%= include_lightbox_header %>
40 42 <%# cms stuff %>
41 43 <% if @controller.controller_name == 'cms' %>
... ...
app/views/shared/categories_menu.rhtml
... ... @@ -25,4 +25,8 @@
25 25 <div id="assets_menu_layout_iten"></div>
26 26 </div><!-- fim id="assets_menu" -->
27 27  
28   -<script> setAutoOpenMenu( $("assets_menu") ); </script>
  28 +<script type="text/javascript">
  29 + if ( assetsMenu.autoOpen ) {
  30 + setAutoOpenMenu( $("assets_menu") );
  31 + }
  32 +</script>
... ...
public/designs/themes/ecosol/images/list-dot.gif 0 → 100644

59 Bytes

public/designs/themes/ecosol/javascript/auto-open-menu.js
... ... @@ -1,64 +0,0 @@
1   -
2   -function setAutoOpenMenu( menu ) {
3   -
4   - var mul = menu.getElementsByTagName("ul")[0];
5   - if ( !mul ) return false;
6   -
7   - mul.h = mul.clientHeight; // remember the current height to a faster animation
8   - mul.minSize = mul.clientHeight;
9   - var vli = mul.getElementsByTagName("li");
10   - mul.paddingBottom = parseInt( menu.className.replace( /^.*AOM_paddingBottom_([^\s]+).*$/, "$1" ) );
11   - mul.maxSize = ( vli.length * ( vli[1].offsetTop - vli[0].offsetTop ) );
12   - mul.inc = 1;
13   -
14   - window["autoOpenMenu-"+menu.id] = menu;
15   - menu.mul = mul;
16   -
17   - if ( mul.minSize == 1 ) {
18   - // Work arround bug for IE - ie sux - ie sux - ie sux - ie sux -ie sux -ie sux -ie sux - ie sux!!!
19   - mul.h = 3;
20   - setTimeout('m = window[\'autoOpenMenu-'+menu.id+'\']; m.onmouseout()', 10);
21   - }
22   -
23   - menu.isIE = ( navigator.appName.indexOf("Microsoft") > -1 );
24   -
25   - menu.onmouseover = function () {
26   - clearTimeout( this.timeoutClose );
27   - var mul = this.mul;
28   - if ( mul.paddingBottom ) mul.parentNode.style.paddingBottom = mul.paddingBottom +"px";
29   - if ( mul.h < mul.maxSize ) {
30   - mul.h += mul.inc;
31   - mul.inc += 2;
32   - mul.style.height = mul.h +"px";
33   - this.timeoutOpen = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseover()", 33 );
34   - } else {
35   - mul.h = mul.maxSize;
36   - mul.style.height = mul.h +"px";
37   - mul.inc = 1;
38   - }
39   - }
40   -
41   - menu.onmouseout = function ( doIt, firstDoIt ) {
42   - clearTimeout( this.timeoutOpen );
43   - var mul = this.mul;
44   - if ( firstDoIt ) mul.inc = 1;
45   - if ( doIt == true ) {
46   - if ( mul.h > mul.minSize ) {
47   - mul.h -= mul.inc++;
48   - if ( mul.h < 0 ) mul.h = 0;
49   - if ( this.isIE ) if ( mul.h < 1 ) mul.h = 1;
50   - mul.style.height = mul.h +"px";
51   - this.timeoutClose = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseout(true)", 33 );
52   - } else {
53   - mul.h = mul.minSize;
54   - mul.style.height = mul.h +"px";
55   - if ( mul.paddingBottom ) mul.parentNode.style.paddingBottom = "0px";
56   - mul.inc = 2;
57   - }
58   - } else {
59   - // Work arround IE bug
60   - this.timeoutClose = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseout(true, true)", 200 );
61   - }
62   - }
63   -
64   -}
public/designs/themes/ecosol/stylesheets/common.css
... ... @@ -48,6 +48,25 @@ body.category2 a:visited { color: #8A6 }
48 48 a:hover, a:active { color: #08F }
49 49 body.category2 a:hover { color: #5C0 }
50 50  
  51 +
  52 +body.category1 #content h1, body.category1 #content h2, body.category1 #content h3,
  53 +body.category1 #content h4, body.category1 #content h5, body.category1 #content h6
  54 + { color: #E26B00 }
  55 +body.category2 #content h1, body.category2 #content h2, body.category2 #content h3,
  56 +body.category2 #content h4, body.category2 #content h5, body.category2 #content h6
  57 + { color: #58A80A }
  58 +body.category3 #content h1, body.category3 #content h2, body.category3 #content h3,
  59 +body.category3 #content h4, body.category3 #content h5, body.category3 #content h6
  60 + { color: #694371 }
  61 +body.category4 #content h1, body.category4 #content h2, body.category4 #content h3,
  62 +body.category4 #content h4, body.category4 #content h5, body.category4 #content h6
  63 + { color: #B80000 }
  64 +
  65 +#content ul li {
  66 + list-style: url(../images/list-dot.gif);
  67 +}
  68 +
  69 +
51 70 /* file manager (big) style */
52 71  
53 72 div.file-manager {
... ...
public/designs/themes/ecosol/theme.yml
1   -title: "Default"
2   -description: "A simple theme"
3   -js: [ auto-open-menu ]
  1 +title: "EcoSol"
  2 +description: "O thema para o ambiente da Economia Solidária"
  3 +js: [ ]
... ...
public/designs/themes/zen3/javascript/config.js 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +
  2 +assetsMenu.autoOpen = false
... ...
public/designs/themes/zen3/theme.yml 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +title: "Zen3"
  2 +description: "The Orange Zen3"
  3 +js: [ config ]
... ...
public/images/beta.gif

417 Bytes | W: | H:

187 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
public/images/list-dot.gif

59 Bytes

public/javascripts/auto-open-menu.js 0 → 100644
... ... @@ -0,0 +1,64 @@
  1 +
  2 +function setAutoOpenMenu( menu ) {
  3 +
  4 + var mul = menu.getElementsByTagName("ul")[0];
  5 + if ( !mul ) return false;
  6 +
  7 + mul.h = mul.clientHeight; // remember the current height to a faster animation
  8 + mul.minSize = mul.clientHeight;
  9 + var vli = mul.getElementsByTagName("li");
  10 + mul.paddingBottom = parseInt( menu.className.replace( /^.*AOM_paddingBottom_([^\s]+).*$/, "$1" ) );
  11 + mul.maxSize = ( vli.length * ( vli[1].offsetTop - vli[0].offsetTop ) );
  12 + mul.inc = 1;
  13 +
  14 + window["autoOpenMenu-"+menu.id] = menu;
  15 + menu.mul = mul;
  16 +
  17 + if ( mul.minSize == 1 ) {
  18 + // Work arround bug for IE - ie sux - ie sux - ie sux - ie sux -ie sux -ie sux -ie sux - ie sux!!!
  19 + mul.h = 3;
  20 + setTimeout('m = window[\'autoOpenMenu-'+menu.id+'\']; m.onmouseout()', 10);
  21 + }
  22 +
  23 + menu.isIE = ( navigator.appName.indexOf("Microsoft") > -1 );
  24 +
  25 + menu.onmouseover = function () {
  26 + clearTimeout( this.timeoutClose );
  27 + var mul = this.mul;
  28 + if ( mul.paddingBottom ) mul.parentNode.style.paddingBottom = mul.paddingBottom +"px";
  29 + if ( mul.h < mul.maxSize ) {
  30 + mul.h += mul.inc;
  31 + mul.inc += 2;
  32 + mul.style.height = mul.h +"px";
  33 + this.timeoutOpen = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseover()", 33 );
  34 + } else {
  35 + mul.h = mul.maxSize;
  36 + mul.style.height = mul.h +"px";
  37 + mul.inc = 1;
  38 + }
  39 + }
  40 +
  41 + menu.onmouseout = function ( doIt, firstDoIt ) {
  42 + clearTimeout( this.timeoutOpen );
  43 + var mul = this.mul;
  44 + if ( firstDoIt ) mul.inc = 1;
  45 + if ( doIt == true ) {
  46 + if ( mul.h > mul.minSize ) {
  47 + mul.h -= mul.inc++;
  48 + if ( mul.h < 0 ) mul.h = 0;
  49 + if ( this.isIE ) if ( mul.h < 1 ) mul.h = 1;
  50 + mul.style.height = mul.h +"px";
  51 + this.timeoutClose = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseout(true)", 33 );
  52 + } else {
  53 + mul.h = mul.minSize;
  54 + mul.style.height = mul.h +"px";
  55 + if ( mul.paddingBottom ) mul.parentNode.style.paddingBottom = "0px";
  56 + mul.inc = 2;
  57 + }
  58 + } else {
  59 + // Work arround IE bug
  60 + this.timeoutClose = setTimeout( "window['autoOpenMenu-"+this.id+"'].onmouseout(true, true)", 200 );
  61 + }
  62 + }
  63 +
  64 +}
... ...
public/stylesheets/common.css
... ... @@ -7,11 +7,11 @@ body {
7 7  
8 8 #beta-tag {
9 9 position: absolute;
10   - top: 50px;
11   - left: 50px;
  10 + top: 40px;
  11 + left: 40px;
12 12 background-image: url(../images/beta.gif);
13   - width: 128px;
14   - height: 36px;
  13 + width: 79px;
  14 + height: 25px;
15 15 }
16 16 #beta-tag span {
17 17 display: none;
... ... @@ -132,27 +132,11 @@ div#notice {
132 132 #content h4 { font-size: 16px }
133 133 #content h5 { font-size: 14px }
134 134 #content h6 { font-size: 12px }
135   -body.category1 #content h1, body.category1 #content h2, body.category1 #content h3,
136   -body.category1 #content h4, body.category1 #content h5, body.category1 #content h6
137   - { color: #E26B00 }
138   -body.category2 #content h1, body.category2 #content h2, body.category2 #content h3,
139   -body.category2 #content h4, body.category2 #content h5, body.category2 #content h6
140   - { color: #58A80A }
141   -body.category3 #content h1, body.category3 #content h2, body.category3 #content h3,
142   -body.category3 #content h4, body.category3 #content h5, body.category3 #content h6
143   - { color: #694371 }
144   -body.category4 #content h1, body.category4 #content h2, body.category4 #content h3,
145   -body.category4 #content h4, body.category4 #content h5, body.category4 #content h6
146   - { color: #B80000 }
147 135  
148 136 #content .block-title {
149 137 margin: 0px 0px 10px 0px;
150 138 }
151 139  
152   -#content ul li {
153   - list-style: url(/images/list-dot.gif);
154   -}
155   -
156 140  
157 141 #better-browser-promotion {
158 142 position: absolute;
... ...