diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7b09fcb..a45f274 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -10,6 +10,8 @@ module ApplicationHelper include FormsHelper + include AssetsHelper + # Displays context help. You can pass the content of the help message as the # first parameter or using template code inside a block passed to this # method. *Note*: the block is ignored if content is not diff --git a/app/helpers/assets_helper.rb b/app/helpers/assets_helper.rb new file mode 100644 index 0000000..6f8a49b --- /dev/null +++ b/app/helpers/assets_helper.rb @@ -0,0 +1,15 @@ +module AssetsHelper + + def generate_assets_menu() + ' +
  • Blogs
  • +
  • Albuns
  • +
  • Produtos
  • +
  • Empreendimentos
  • +
  • bli 5
  • +
  • bli 6
  • +
  • bli 7
  • + ' + end + +end diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb index 695bd9e..10faa0c 100644 --- a/app/helpers/boxes_helper.rb +++ b/app/helpers/boxes_helper.rb @@ -20,7 +20,7 @@ module BoxesHelper def display_boxes(holder, main_content) boxes = holder.boxes.first(holder.boxes_limit) - content = boxes.map { |item| display_box(item, main_content) }.join("\n") + content = boxes.reverse.map { |item| display_box(item, main_content) }.join("\n") content = main_content if (content.blank?) content_tag('div', content, :class => 'boxes', :id => 'boxes' ) end diff --git a/app/views/box_organizer/index.rhtml b/app/views/box_organizer/index.rhtml index 0c97c4b..93b0161 100644 --- a/app/views/box_organizer/index.rhtml +++ b/app/views/box_organizer/index.rhtml @@ -1,4 +1,4 @@ -

    <%= _('Organizing visual design')%>

    +

    <%= _('Organizing visual design')%>

    <% button_bar do %> <%= lightbox_button('add', _('Add a block'), { :action => 'add_block' }) %> diff --git a/app/views/shared/categories_menu.rhtml b/app/views/shared/categories_menu.rhtml index f50c3b8..4b42082 100644 --- a/app/views/shared/categories_menu.rhtml +++ b/app/views/shared/categories_menu.rhtml @@ -1,7 +1,7 @@ - + +
    +
    + +
    +
    +
    +<%= javascript_include_tag 'assets-menu' %> + diff --git a/public/designs/icons/default/album-HC.gif b/public/designs/icons/default/album-HC.gif new file mode 100644 index 0000000..3807fc8 Binary files /dev/null and b/public/designs/icons/default/album-HC.gif differ diff --git a/public/designs/icons/default/blog-HC.gif b/public/designs/icons/default/blog-HC.gif new file mode 100644 index 0000000..ad98ccf Binary files /dev/null and b/public/designs/icons/default/blog-HC.gif differ diff --git a/public/designs/icons/default/enterprise-HC.gif b/public/designs/icons/default/enterprise-HC.gif new file mode 100644 index 0000000..3a6e724 Binary files /dev/null and b/public/designs/icons/default/enterprise-HC.gif differ diff --git a/public/designs/icons/default/menu-without-ico-HC.gif b/public/designs/icons/default/menu-without-ico-HC.gif new file mode 100644 index 0000000..37bb0e1 Binary files /dev/null and b/public/designs/icons/default/menu-without-ico-HC.gif differ diff --git a/public/designs/icons/default/product-HC.gif b/public/designs/icons/default/product-HC.gif new file mode 100644 index 0000000..8642558 Binary files /dev/null and b/public/designs/icons/default/product-HC.gif differ diff --git a/public/designs/icons/default/style.css b/public/designs/icons/default/style.css index a1a45ec..d6b97b3 100644 --- a/public/designs/icons/default/style.css +++ b/public/designs/icons/default/style.css @@ -19,4 +19,8 @@ .icon-search { background-image: url(gnome-search.png); } .icon-ok { background-image: url(gtk-ok.png); } .icon-login { background-image: url(key-HC.gif); } - +.ico-menu- { background-image: url(menu-without-ico-HC.gif) } +.ico-menu-blog { background-image: url(blog-HC.gif); } +.ico-menu-album { background-image: url(album-HC.gif); } +.ico-menu-product { background-image: url(product-HC.gif); } +.ico-menu-enterprise { background-image: url(enterprise-HC.gif); } diff --git a/public/designs/templates/default/stylesheets/style.css b/public/designs/templates/default/stylesheets/style.css index 926bdae..8ee70e3 100644 --- a/public/designs/templates/default/stylesheets/style.css +++ b/public/designs/templates/default/stylesheets/style.css @@ -9,17 +9,12 @@ } .box-2 { - position: absolute; - top: 0px; - left: 0px; + float: left; width: 270px; - margin-left: 10px; } .box-3 { - position: absolute; - top: 0px; - right: 10px; + float: right; width: 200px; } diff --git a/public/img-source/assets-menu.xcf b/public/img-source/assets-menu.xcf new file mode 100644 index 0000000..4dfa72e Binary files /dev/null and b/public/img-source/assets-menu.xcf differ diff --git a/public/javascripts/assets-menu.js b/public/javascripts/assets-menu.js new file mode 100644 index 0000000..8d1a3fd --- /dev/null +++ b/public/javascripts/assets-menu.js @@ -0,0 +1,36 @@ + +var amul = document.getElementById( "assets_menu_ul" ); +amul.h = 56; +amul.minSize = 56; +amul.maxSize = amul.getElementsByTagName("li").length * 19; +window.amul = amul; + +amul.onmouseover = function () { + clearTimeout( this.timeoutClose ); + if ( this.h < this.maxSize ) { + this.h += 10; + this.style.height = this.h +"px"; + this.timeoutOpen = setTimeout( "window.amul.onmouseover()", 33 ); + } else { + this.h = this.maxSize; + this.style.height = this.h +"px"; + } +} + +amul.onmouseout = function ( doIt ) { + clearTimeout( this.timeoutOpen ); + if ( doIt ) { + if ( this.h > this.minSize ) { + this.h -= 10; + this.style.height = this.h +"px"; + this.timeoutClose = setTimeout( "window.amul.onmouseout(true)", 33 ); + } else { + this.h = this.minSize; + this.style.height = this.h +"px"; + } + } else { + // Work arround IE bug + this.timeoutClose = setTimeout( "window.amul.onmouseout(true)", 200 ); + } +} + diff --git a/public/stylesheets/menu.css b/public/stylesheets/menu.css index 23db45c..40b6ff5 100644 --- a/public/stylesheets/menu.css +++ b/public/stylesheets/menu.css @@ -177,7 +177,7 @@ body.category4 .linkSubMenu { background-image: url(/images/borda-esq-aba-vermel top: 22px; left: 0px; right: 0px; - padding: 0px 0px 2px 20px; + padding: 0px 170px 2px 20px; margin: 0px; border: 1px solid #FFF; border-top: none; @@ -196,3 +196,89 @@ body.category4 .linkSubMenu { background-image: url(/images/borda-esq-aba-vermel padding-right: 15px; } +/* * * Assets Menu * * * * * * * * * * * */ + +#assets_menu { + position: absolute; + top: 21px; + right: 0px; + padding: 0px 0px 0px 10px; +} + +#assets_menu_layout_iten { + position: absolute; + top: 0px; + left: 0px; + width: 11px; + height: 11px; + overflow: hidden; + background: url(/images/top-bar/assets-menu-top-azul.gif); +} +body.category1 #assets_menu_layout_iten { background: url(/images/top-bar/assets-menu-top-laranja.gif) } +body.category2 #assets_menu_layout_iten { background: url(/images/top-bar/assets-menu-top-verde.gif) } +body.category3 #assets_menu_layout_iten { background: url(/images/top-bar/assets-menu-top-lilas.gif) } +body.category4 #assets_menu_layout_iten { background: url(/images/top-bar/assets-menu-top-vermelho.gif) } + +#assets_menu_list { + padding: 2px 0px 6px 5px; + background: url(/images/top-bar/assets-menu-bg-azul.gif) 0% 100%; +} +body.category1 #assets_menu_list { background-image: url(/images/top-bar/assets-menu-bg-laranja.gif) } +body.category2 #assets_menu_list { background-image: url(/images/top-bar/assets-menu-bg-verde.gif) } +body.category3 #assets_menu_list { background-image: url(/images/top-bar/assets-menu-bg-lilas.gif) } +body.category4 #assets_menu_list { background-image: url(/images/top-bar/assets-menu-bg-vermelho.gif) } + +#assets_menu ul { + margin: 0px; + padding: 0px; + overflow: hidden; + height: 56px; + width: 170px; + max-width: 165px; +} + +#assets_menu li { + margin: 0px; + padding: 1px 0px 0px 0px; + list-style: none; +} + +#assets_menu a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + color: #B8CFE7; + display: block; + padding-left: 0px; + height: 18px; +} +body.category1 #assets_menu a { color: #FDD79E } +body.category2 #assets_menu a { color: #C4F099 } +body.category3 #assets_menu a { color: #D6BFD3 } +body.category4 #assets_menu a { color: #F79494 } +#assets_menu a:hover { + background: #3465A4; + color: #FFF; +} +body.category1 #assets_menu a:hover { background: #F57900; color: #FFF } +body.category2 #assets_menu a:hover { background: #61B60E; color: #FFF } +body.category3 #assets_menu a:hover { background: #75507B; color: #FFF } +body.category4 #assets_menu a:hover { background: #CC0000; color: #FFF } + +#assets_menu a span { + display: block; + width: 18px; + height: 18px; + float: left; + background-repeat: no-repeat; + background-position: 50% 50%; + margin-right: 2px; + opacity: 0.7; + filter: alpha(opacity=70); +} +#assets_menu a:hover span { + opacity: 1; + filter: alpha(opacity=100); +} + + -- libgit2 0.21.2