Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
+ adding admin.js
Browse files Browse the repository at this point in the history
+ adding jQuery tooltip plugin
+ using tooltip under everything .tooltip inside admin
  • Loading branch information
igorsantos07 committed May 1, 2012
1 parent 025ef92 commit 9d09ae3
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 3 deletions.
4 changes: 2 additions & 2 deletions admin/views/layouts/_header_nav.haml
Expand Up @@ -4,7 +4,7 @@
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
%title MemeLinks Admin
=stylesheet_link_tag '/stylesheets/admin/base', '/stylesheets/admin/themes/warehouse-bec/style'
=stylesheet_link_tag '/stylesheets/jquery.tooltip', '/stylesheets/admin/base', '/stylesheets/admin/themes/warehouse-bec/style'
=yield_content :other_css
%body
#container
Expand All @@ -23,5 +23,5 @@
.flash=[:error, :warning, :notice].map { |type| flash_tag(type, :class => "message #{type}") }.join
=yield_content :content

=javascript_include_tag '/javascripts/jquery', '/javascripts/jquery-ujs'
=javascript_include_tag '/javascripts/jquery', '/javascripts/jquery-ujs', '/javascripts/jquery.tooltip', '/admin/javascripts/admin'
=yield_content :other_js
2 changes: 1 addition & 1 deletion admin/views/memes/index.haml
Expand Up @@ -39,7 +39,7 @@
%tr
%td
-unless meme.ip_user_creator.nil?
=image_tag '/images/icons/light-bulb.png', :title => meme.ip_user_creator
%img.tooltip{:src =>'/images/icons/light-bulb.png', :title => meme.ip_user_creator}
%td=link_to meme.name, '/'+meme.filename
%td=meme.slug
%td=meme.all_views_count.to_s+' / '+meme.external_count.to_s
Expand Down
8 changes: 8 additions & 0 deletions public/admin/javascripts/admin.js
@@ -0,0 +1,8 @@
$(document).ready(function() {
$('.tooltip').tooltip({
showURL: false,
track: true,
delay: 0,
fade: 100
})
})
15 changes: 15 additions & 0 deletions public/javascripts/jquery.tooltip.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions public/stylesheets/jquery.tooltip.css
@@ -0,0 +1,11 @@
#tooltip {
position: absolute;
z-index: 3000;
border: 1px solid #C9BF8A;
background-color: #FFFFE1;
padding: 2px 5px;
}
#tooltip h3, #tooltip div {
font-size: 1em;
margin: 0;
}

0 comments on commit 9d09ae3

Please sign in to comment.