Skip to content

Commit

Permalink
Changed moderation tip styles
Browse files Browse the repository at this point in the history
  • Loading branch information
brzaik committed Mar 13, 2012
1 parent df4f6c8 commit 5b259a5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
}

.controls {
background: $grayLightest;
display: block;
margin-top: 4px;
padding: 4px;
}

h1 {
Expand Down
49 changes: 42 additions & 7 deletions app/views/submissions/_index_body.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<article>
<div class="subnav clearfix">
<div class="pull-left" style="width:120px">
<%= link_to "Jump to Feed...", "#", :title => "Click on a feed to jump", :class => "btn small info dropdown-toggle dropdown-control", :rel => "#jump_to" %>
<%= link_to "Jump to Feed...", "#", :title => "Click on a feed to jump", :class => "btn small info dropdown-toggle dropdown-control dd-jumpto", :rel => "#jump_to" %>

<div id="jump_to" style="display: none;">
<% feeds = dfs_tree(Feed.roots) %>
Expand Down Expand Up @@ -55,13 +55,18 @@
<br />
<%= submission.content.start_time.strftime("%m/%d") %> to <%= submission.content.end_time.strftime("%m/%d") %>
<br />
<%= link_to "Moderate", "#", :title => "Moderate '#{ submission.content.name }'", :class => "btn small dropdown-control", :rel => "#moderate_#{ submission.id }" %>
<p>
<%= link_to "#", :class => "dropdown-control dd-moderate", :title => "Moderate '#{ submission.content.name }'", :rel => "#moderate_#{ submission.id }" do %>
<%= submission.moderation_flag == 1 ? "Approved" : "Declined" %>
<% end %>
</p>

<div id="moderate_<%= submission.id %>" style="display:none;">
<ul>
<li><a href="#">Approve</a></li>
<li><a href="#">Deny</a></li>
</ul>
<div class="btn-group">
<button class="btn success">Approve</button>
<button class="btn danger">Deny</button>
</div>
<br />
</div>

</div>
Expand All @@ -79,7 +84,7 @@
$(document).ready(function() {
$('.dropdown-control').click(function(event) { event.preventDefault(); });

$('.dropdown-control').each(function() {
$('.dropdown-control.dd-jumpto').each(function() {

$(this).qtip( {

Expand Down Expand Up @@ -108,6 +113,36 @@
});

});

$('.dropdown-control.dd-moderate').each(function() {

$(this).qtip( {

content: {
text: $( $(this).attr('rel') ).html(),
title: {
text: $(this).attr('title'),
button: true
}
},

position: {
at: 'bottom center', // Position the tooltip above the link
my: 'top left',
viewport: $(window) // Keep the tooltip on-screen at all times
},

show: {
event: 'hover', // Show it on click...
solo: true // ...and hide all other tooltips...
},

hide: 'unfocus',
style: 'ui-tooltip-dark ui-tooltip-shadow ui-tooltip-rounded'

});

});

// feed filtering
$('#filter_feeds').listFilter();
Expand Down

0 comments on commit 5b259a5

Please sign in to comment.