Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updated Readme

git-svn-id: https://svn.thoughtbot.com/plugins/mile_marker/trunk@159 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information...
commit e6522be00e2365f540ca51fd779903abe1407ae0 1 parent dd1e2a6
authored August 03, 2007
7  README
@@ -38,6 +38,13 @@ Or, if you prefer, add something like the following to environment.rb:
38 38
 
39 39
 Thoughtbot::MileMarker.environments = %w(development staging production)
40 40
 
  41
+You can also change some of the styling options (as of right now, just the z-index and background color) by modifying the options hash:
  42
+
  43
+Thoughtbot::MileMarker.options.update(
  44
+	:z_index => 100,
  45
+	:background_color => "purple"
  46
+)
  47
+
41 48
 == Requirements
42 49
 
43 50
 The overlay functionality requires javascript, and uses the prototype library.  So, any page that is using this functionality must also include prototype.
2  lib/mile_marker.rb
@@ -52,7 +52,7 @@ def self.initialize_mile_marker()
52 52
   }
53 53
   function init_miles() {
54 54
     $$('*[mile]').each(function(block, index) {
55  
-      html = '<div id="mile_'+index+'" style="display: none; z-index: #{options[:z_index]}; position: absolute; background-color: #{options[:background_color]}; opacity: 0.4; filter: alpha(opacity=40); color: #eee; font-family: Lucida Sans, Helvetica; font-size: 16px; font-weight: bold; white-space: nowrap; overflow: hidden;"><p style="padding: 3px 5px; background-color: #000; opacity: 1.0; filter: alpha(opacity=100); display: inline; color: #f3f3f3;">'+block.getAttribute('mile')+'</p></div>'
  55
+      html = '<div id="mile_'+index+'" style="display: none; z-index: #{options[:z_index]}; position: absolute; background-color: #{options[:background_color]}; opacity: 0.4; filter: alpha(opacity=40); color: #eee; font-family: Lucida Sans, Helvetica; font-size: 16px; font-weight: bold; white-space: nowrap; overflow: hidden;"><p style="padding: 3px 5px; background-color: #{options[:background_color]}; opacity: 1.0; filter: alpha(opacity=100); display: inline; color: #f3f3f3;">'+block.getAttribute('mile')+'</p></div>'
56 56
       new Insertion.Before($(block), html);
57 57
       Position.clone($(block), $('mile_'+index));
58 58
       if($('mile_'+index).getHeight() <= 25) { $('mile_'+index).setStyle({fontSize: '10px'}); }

0 notes on commit e6522be

Please sign in to comment.
Something went wrong with that request. Please try again.