Permalink
Browse files

updated Readme

git-svn-id: https://svn.thoughtbot.com/plugins/mile_marker/trunk@159 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information...
1 parent dd1e2a6 commit e6522be00e2365f540ca51fd779903abe1407ae0 jyurek committed Aug 3, 2007
Showing with 8 additions and 1 deletion.
  1. +7 −0 README
  2. +1 −1 lib/mile_marker.rb
View
@@ -38,6 +38,13 @@ Or, if you prefer, add something like the following to environment.rb:
Thoughtbot::MileMarker.environments = %w(development staging production)
+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:
+
+Thoughtbot::MileMarker.options.update(
+ :z_index => 100,
+ :background_color => "purple"
+)
+
== Requirements
The overlay functionality requires javascript, and uses the prototype library. So, any page that is using this functionality must also include prototype.
View
@@ -52,7 +52,7 @@ def self.initialize_mile_marker()
}
function init_miles() {
$$('*[mile]').each(function(block, index) {
- 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>'
+ 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>'
new Insertion.Before($(block), html);
Position.clone($(block), $('mile_'+index));
if($('mile_'+index).getHeight() <= 25) { $('mile_'+index).setStyle({fontSize: '10px'}); }

0 comments on commit e6522be

Please sign in to comment.