Author: assaf
Date: Fri Jun  6 20:27:07 2008
New Revision: 664265

URL: http://svn.apache.org/viewvc?rev=664265&view=rev
Log:
Fixed authentication for sparklines controller.
Fixed background image for header.
Added realm to task_for controller authentication, otherwise it can be 
incorrectly confused with user/password authentication for other resources.

Added:
    ode/sandbox/singleshot/public/images/header-bg.jpg
Removed:
    ode/sandbox/singleshot/public/images/header-bg.png
Modified:
    ode/sandbox/singleshot/app/controllers/sparklines_controller.rb
    ode/sandbox/singleshot/app/controllers/task_for_controller.rb
    ode/sandbox/singleshot/app/views/activity/index.html.erb
    ode/sandbox/singleshot/app/views/layouts/application.html.erb
    ode/sandbox/singleshot/public/stylesheets/default.css

Modified: ode/sandbox/singleshot/app/controllers/sparklines_controller.rb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/controllers/sparklines_controller.rb?rev=664265&r1=664264&r2=664265&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/controllers/sparklines_controller.rb (original)
+++ ode/sandbox/singleshot/app/controllers/sparklines_controller.rb Fri Jun  6 
20:27:07 2008
@@ -1,5 +1,7 @@
 class SparklinesController < ApplicationController
 
+  skip_before_filter :authenticate
+
   def index
     options = { :type=>'bar', :step=>4, :above_color=>'#65a0e4', 
:below_color=>'#a8c0d8', :target=>50, :target_color=>'#ffffd0' }
     render :text=>Sparklines.plot(params[:results].split(',').map(&:to_f), 
options.merge(params)), :content_type=>'image/png'

Modified: ode/sandbox/singleshot/app/controllers/task_for_controller.rb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/controllers/task_for_controller.rb?rev=664265&r1=664264&r2=664265&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/controllers/task_for_controller.rb (original)
+++ ode/sandbox/singleshot/app/controllers/task_for_controller.rb Fri Jun  6 
20:27:07 2008
@@ -28,7 +28,7 @@
   def authenticate
     @task = Task.with_stakeholders.find(params[:task_id])
     @person = Person.identify(params[:person_id])
-    authenticate_or_request_with_http_basic request.domain do |login, token|
+    authenticate_or_request_with_http_basic "#{request.domain}:[EMAIL 
PROTECTED]:[EMAIL PROTECTED]" do |login, token|
       login == '_token' && token == @task.token_for(@person)
     end
   end

Modified: ode/sandbox/singleshot/app/views/activity/index.html.erb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/activity/index.html.erb?rev=664265&r1=664264&r2=664265&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/views/activity/index.html.erb (original)
+++ ode/sandbox/singleshot/app/views/activity/index.html.erb Fri Jun  6 
20:27:07 2008
@@ -1,5 +1,4 @@
 <% by_date = group_by_dates(@activities, :created_at) %>
-<div style='float:right; margin-right: 3em'><%= sparkline_tag((0..30).map { 
rand(100) }) %></div>
 <ol class='dates hfeed'>
   <% for date, activities in by_date %>
     <li class='date'>

Modified: ode/sandbox/singleshot/app/views/layouts/application.html.erb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/layouts/application.html.erb?rev=664265&r1=664264&r2=664265&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/views/layouts/application.html.erb (original)
+++ ode/sandbox/singleshot/app/views/layouts/application.html.erb Fri Jun  6 
20:27:07 2008
@@ -13,7 +13,7 @@
       <h1><%= link_to 'Singleshot', root_url %></h1>
       <ul class='links'>
         <li><%= link_to 'Logout', session_url, :method=>:delete %></li>
-        <li><form action='<% tasks_url %>' method='get' class='search'><input 
type='text' name='query' /><button><%= image_tag 'magnifier.png' 
%></button></form></li>
+        <li><form action='<% tasks_url %>' method='get' class='search'><%= 
text_field_tag 'query', params['query'] %><button><%= image_tag 'magnifier.png' 
%></button></form></li>
       </ul>
       <ul class='tabs'><%=
         [ ['➠ Tasks', tasks_url, 'Pending and available tasks'],

Added: ode/sandbox/singleshot/public/images/header-bg.jpg
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/public/images/header-bg.jpg?rev=664265&view=auto
==============================================================================
Files ode/sandbox/singleshot/public/images/header-bg.jpg (added) and 
ode/sandbox/singleshot/public/images/header-bg.jpg Fri Jun  6 20:27:07 2008 
differ

Modified: ode/sandbox/singleshot/public/stylesheets/default.css
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/public/stylesheets/default.css?rev=664265&r1=664264&r2=664265&view=diff
==============================================================================
--- ode/sandbox/singleshot/public/stylesheets/default.css (original)
+++ ode/sandbox/singleshot/public/stylesheets/default.css Fri Jun  6 20:27:07 
2008
@@ -87,25 +87,26 @@
 form.search {
   display: inline;
   margin: 0 -1.2em 0 1em;
+       white-space: nowrap;
 }
 form.search input {
   width: 15em;
   padding-right: 2.5em;
-  border: 1px solid #ccc;
+  border: none;
   -moz-border-radius: 8px;
   -webkit-border-radius: 8px;
 }
 form.search input:focus, form.search input:hover {
-  border: 1px solid #ccc;
+  border: none;
 }
 form.search button {
   display: inline;
   background: transparent;
+  position: relative;
   left: -1.5em;
+  vertical-align: middle;
   padding: 0;
   margin: 0;
-  position: relative;
-  vertical-align: middle;
 }
 
 fieldset {
@@ -128,7 +129,7 @@
 /** Header **/
 
 #header {
-  background: #c9c9c9 url('/images/header-bg.png') repeat-x bottom;
+  background: #c9c9c9 url('/images/header-bg.jpg') repeat-x bottom;
   padding: 0.5em 3em 3px 3em;
   border-bottom: solid 2px #898989;
 }
@@ -312,7 +313,7 @@
   width: 100%;
   margin: 0;
   padding: 0;
-  background: #c9c9c9 url('/images/header-bg.png') repeat-x bottom;
+  background: #c9c9c9 url('/images/header-bg.jpg') repeat-x bottom;
   border-bottom: solid 2px #898989;
 }
 div.task div.header h1 {


Reply via email to