From c4b9a9e2752d12462288599306a7c455b2ea6764 Mon Sep 17 00:00:00 2001 From: devin Date: Wed, 4 Apr 2012 05:53:49 +0800 Subject: [PATCH] dock effect --- app/assets/javascripts/orbitdesktop.js | 30 ++++++++++ app/assets/stylesheets/desktopmain.css | 39 ++++++++----- app/assets/stylesheets/style.css.erb | 1 + app/views/desktop/index.html.erb | 79 +++++++++++++------------- 4 files changed, 97 insertions(+), 52 deletions(-) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 24180334..ece489b7 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -274,3 +274,33 @@ var orbitDesktop = function(dom){ orbitDesktop.prototype.themefolder = "themes"; +// devin +(function(){ + $(document).ready(function(){ + var $widget_fn = $('.widget_fn'), + $fn_des = $('.fn_des'); + + $widget_fn.hover(function(){ + var fn_name = $(this).find('img').attr('alt'), + nth = $(this).parents('.d_cate').index(), + des_left = $('.dock_child').eq(nth).width(); + + + $(this).addClass('thmc1'); + $fn_des + .text(fn_name) + .css({ + 'top':nth * 60, + 'left': des_left + 60 + }) + .stop(true, true) + .fadeIn(); + }, function(){ + $(this).removeClass('thmc1'); + $fn_des.stop(true, true).fadeOut(); + }); + + }); + + +}()); \ No newline at end of file diff --git a/app/assets/stylesheets/desktopmain.css b/app/assets/stylesheets/desktopmain.css index df68d361..39f49a35 100644 --- a/app/assets/stylesheets/desktopmain.css +++ b/app/assets/stylesheets/desktopmain.css @@ -89,6 +89,32 @@ a { text-decoration: none; } height: 30px; margin: 15px 0 0 15px; } +.docklist { + + } +.docklist li { + position: relative; + } +.dock_child { + display: none; + overflow: hidden; + position: absolute; + left: 60px; + top: 0; + } +.docklist > li:hover .dock_child { display: block; } +.dock_item { float: left; } +.fn_des.thmtxt { + line-height: 60px; + padding: 0 6px; + font-size: 15px; + position: absolute; + min-width: 48px; + text-align: center; + white-space: nowrap; + display: none; + } + .ini_input { margin: 0; padding: 0; @@ -249,19 +275,6 @@ a { text-decoration: none; } font-size: 15px; } -/* fake Orbit bar */ -#orbitbar { - height: 28px; - border-radius: 0px; - padding-top: 2px; - padding-bottom: 1px; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); - background-image: -webkit-linear-gradient(top, #444, #111); - position: absolute; - z-index: 9999; - top: 0; - width: 100%; -} #group_wrapper{ } diff --git a/app/assets/stylesheets/style.css.erb b/app/assets/stylesheets/style.css.erb index 2e203a02..8d514425 100644 --- a/app/assets/stylesheets/style.css.erb +++ b/app/assets/stylesheets/style.css.erb @@ -1,3 +1,4 @@ +@import url(http://fonts.googleapis.com/css?family=Cuprum); @font-face{ font-family: 'WebSymbolsRegular'; src: url(<%= asset_path 'websymbols-regular-webfont.eot' %>); diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb index a87241a7..0b0c211d 100755 --- a/app/views/desktop/index.html.erb +++ b/app/views/desktop/index.html.erb @@ -1,60 +1,61 @@
    -
  • -
      -
    • -
    • -
    • +
    • Home +
        +
      • App Manager
      • +
      • All Sections
      • +
      • Settings
    • -
    • -
        -
      • -
      • -
      • +
      • Publication +
          +
        • Journal Papers
        • +
        • Seminar Papers
        • +
        • Books
      • -
      • -
          -
        • -
        • -
        • -
        • +
        • Research +
            +
          • Research Domain
          • +
          • Research Project
          • +
          • Patents
          • +
          • Labs
        • -
        • -
            -
          • -
          • -
          • -
          • -
          • +
          • Experience +
              +
            • Working
            • +
            • Education
            • +
            • Honors
            • +
            • Activities
            • +
            • Clubs
          • -
          • -
              -
            • -
            • -
            • +
            • Learning & Teaching +
                +
              • Courses
              • +
              • Homework
              • +
              • Certification
            • -
            • -
                -
              • -
              • -
              • -
              • -
              • +
              • Personal +
                  +
                • myPage
                • +
                • Blog
                • +
                • Album
                • +
                • Calendar
                • +
                • Files
              • -
              • -
                  -
                • +
                • Orbit +
                    +
                  • Academia Connection
                • -
                • +
                • AppStore
                +