GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: A simple application written in merb to help you manage ad serving across multiple sites
Clone URL: git://github.com/kneath/greed.git
Bring back the site selector
kneath (author)
Fri Jun 06 01:12:00 -0700 2008
commit  d007a33ede1ed45875a79925f077cd99f5d2652e
tree    dde18424147b04ba52efca491d3c0b7230550c5c
parent  11bc843a9ca313ac888e19b6709fbb49b53012f8
...
1
 
2
3
4
...
22
23
24
25
26
27
28
29
30
31
...
1
2
3
4
5
...
23
24
25
 
 
 
 
 
26
27
0
@@ -1,4 +1,5 @@
0
 <h1>Campaigns for <em><%=h @site.name %></em></h1>
0
+<%= select_field :collection => @sites, :text_method => :name, :value_method => :id, :prompt => "Chose a site", :id => "site_selector" %>
0
 <p class="stats">This site has <%= @site.spots.count %> spots with <%= @site.campaigns_allowed %> campaigns slots.</p>
0
 
0
 <% if @site.spots.empty? %>
0
@@ -22,9 +23,4 @@
0
       <div class="actions"><%= submit_button "Add Campaign" %></div>
0
     </div>
0
   <% end %>
0
-<% end %>
0
-
0
-<% throw_content :sidebar do %>
0
- <h3>Manage another site</h3>
0
- <%= select_field :collection => @sites, :text_method => :name, :value_method => :id, :prompt => "Chose a site", :id => "site_selector" %>
0
 <% end %>
0
\ No newline at end of file
...
1
2
3
4
5
6
7
8
9
10
11
...
1
2
 
 
 
 
 
 
3
4
5
0
@@ -1,11 +1,5 @@
0
 
0
 var rules = {
0
- '#site_selector': function(element){
0
- $(element).addEvent('change', function(){
0
- if (this.value == null || this.value == "") return;
0
- document.location = "/campaigns/show/?site_id=" + this.value;
0
- });
0
- },
0
   
0
   'input.datepicker': function(element){
0
     element = $(element);
...
303
304
305
 
 
 
 
 
306
307
308
...
303
304
305
306
307
308
309
310
311
312
313
0
@@ -303,6 +303,11 @@ ul.meta li a{
0
   Campaigns
0
 ------------------------------------------------------------------------------------*/
0
 
0
+#site_selector{
0
+ float:right;
0
+ margin-top:-24px;
0
+}
0
+
0
 ul.spots{
0
   margin:15px 0 15px -10px;
0
 }

Comments

    No one has commented yet.