Commit 0f2b557199de1d3e02fcc0d6b81702c20904d4fc

Authored by Fabio Teixeira
1 parent 9afcbffa

Add finality scroll effect

Signed-off-by: Fabio Teixeira <fabio1079@gmail.com>
lib/mpog_software_plugin.rb
... ... @@ -142,7 +142,18 @@ class MpogSoftwarePlugin &lt; Noosfero::Plugin
142 142 end
143 143  
144 144 def js_files
145   - ["spb-utils.js", "mpog-software.js", "mpog-software-validations.js", "mpog-user-validations.js", "mpog-institution-validations.js", "mpog-incomplete-registration.js", "mpog-search.js", "jquery.maskedinput.min.js", "software-catalog.js"]
  145 + %w[
  146 + jquery.maskedinput.min.js
  147 + spb-utils.js
  148 + mpog-software.js
  149 + mpog-software-validations.js
  150 + mpog-user-validations.js
  151 + mpog-institution-validations.js
  152 + mpog-incomplete-registration.js
  153 + mpog-search.js
  154 + software-catalog.js
  155 + mpog-software-block.js
  156 + ]
146 157 end
147 158  
148 159 def add_new_organization_buttons
... ...
public/mpog-software-block.js 0 → 100644
... ... @@ -0,0 +1,27 @@
  1 +(function($){
  2 + "use strict";// Make javascript less intolerant to errors
  3 +
  4 + var TRANSITION_TIME = 250;// milliseconds
  5 +
  6 +
  7 + function show_finality() {
  8 + var finality = $(this).children(".software-block-finality");
  9 +
  10 + finality.stop().animate({"top" : "0%"}, TRANSITION_TIME);
  11 + }
  12 +
  13 + function hide_finality() {
  14 + var finality = $(this).children(".software-block-finality");
  15 +
  16 + finality.stop().animate({"top" : "100%"}, TRANSITION_TIME);
  17 + }
  18 +
  19 + function set_events() {
  20 + $(".software-block").mouseover(show_finality);
  21 + $(".software-block").mouseout(hide_finality);
  22 + }
  23 +
  24 + $(document).ready(function(){
  25 + set_events();
  26 + });
  27 +})(jQuery);
0 28 \ No newline at end of file
... ...
public/style.css
... ... @@ -203,7 +203,7 @@
203 203 .software-block {
204 204 position: relative;
205 205 float: left;
206   - margin: 0px 5px 5px 0px;
  206 + margin: 0px 10px 10px 0px;
207 207 width: 30%;
208 208 height: 200px;
209 209 word-wrap: break-word;
... ... @@ -228,5 +228,6 @@
228 228 background-color: #fff;
229 229 top: 100%;
230 230 display: block;
  231 + background-color:rgba(255, 255, 255, 0.9);
231 232 }
232 233 /* End software block main area definitions */
233 234 \ No newline at end of file
... ...