Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Commit

Permalink
updated Readme
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.thoughtbot.com/plugins/mile_marker/trunk@159 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information
jyurek committed Aug 3, 2007
1 parent dd1e2a6 commit e6522be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README
Expand Up @@ -38,6 +38,13 @@ Or, if you prefer, add something like the following to environment.rb:


Thoughtbot::MileMarker.environments = %w(development staging production) 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 == Requirements


The overlay functionality requires javascript, and uses the prototype library. So, any page that is using this functionality must also include prototype. The overlay functionality requires javascript, and uses the prototype library. So, any page that is using this functionality must also include prototype.
Expand Down
2 changes: 1 addition & 1 deletion lib/mile_marker.rb
Expand Up @@ -52,7 +52,7 @@ def self.initialize_mile_marker()
} }
function init_miles() { function init_miles() {
$$('*[mile]').each(function(block, index) { $$('*[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); new Insertion.Before($(block), html);
Position.clone($(block), $('mile_'+index)); Position.clone($(block), $('mile_'+index));
if($('mile_'+index).getHeight() <= 25) { $('mile_'+index).setStyle({fontSize: '10px'}); } if($('mile_'+index).getHeight() <= 25) { $('mile_'+index).setStyle({fontSize: '10px'}); }
Expand Down

0 comments on commit e6522be

Please sign in to comment.