Permalink
Browse files

First pass at tweaking the UI.

  • Loading branch information...
1 parent f0b4da9 commit d4a86031863de7ee4f5d7ceb3aeef1ef0114e70b @jcxplorer committed Apr 29, 2011
View
@@ -2,6 +2,7 @@ source :rubygems
gem "rails", "3.0.7"
+gem "compass"
gem "devise"
gem "haml"
gem "simple_form"
View
@@ -61,6 +61,11 @@ GEM
chalofa_ruby-progressbar (0.0.9.1)
childprocess (0.1.8)
ffi (~> 1.0.6)
+ chunky_png (1.1.1)
+ compass (0.11.1)
+ chunky_png (~> 1.1)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
configuration (1.2.0)
culerity (0.2.15)
database_cleaner (0.6.7)
@@ -79,6 +84,7 @@ GEM
rails (>= 3.0.0)
ffi (1.0.7)
rake (>= 0.8.7)
+ fssm (0.2.7)
fuubar (0.0.4)
chalofa_ruby-progressbar (~> 0.0.9)
rspec (~> 2.0)
@@ -136,6 +142,7 @@ GEM
railties (~> 3.0)
rspec (~> 2.5.0)
rubyzip (0.9.4)
+ sass (3.1.1)
selenium-webdriver (0.2.0)
childprocess (>= 0.1.7)
ffi (>= 1.0.7)
@@ -169,6 +176,7 @@ DEPENDENCIES
autotest-growl
bson_ext
capybara
+ compass
database_cleaner
devise
email_spec
@@ -36,7 +36,7 @@
text-decoration: none;
}
-@mixin flash {
+@mixin flash($background) {
@include opacity(0.8);
border-top: 1px solid #555;
color: #fff;
@@ -46,4 +46,5 @@
margin-top: -40px;
right: 0;
text-align: center;
+ background: $background;
}
@@ -225,13 +225,11 @@ ul.list {
}
#flash.notice {
- @extend flash;
- background: #00cc00;
+ @include flash(#00cc00);
}
#flash.alert {
- @extend flash;
- background: #f81315;
+ @include flash(#f81315);
}
table th {
@@ -303,3 +301,48 @@ input#page_submit {
font-size: 24px;
}
}
+
+#sensor_submit {
+ display: block;
+ margin: 10px 0;
+}
+
+#sensor_referrers {
+ margin-bottom: 10px;
+
+ div.input.string {
+ float: left;
+ }
+
+ div.input.boolean {
+ input {
+ position: relative;
+ top: 30px;
+ }
+
+ label {
+ position: relative;
+ top: 25px;
+ }
+ }
+
+ .referrer {
+ clear: both;
+ }
+
+ .remove:link {
+ text-decoration: none;
+ position: relative;
+ left: 22px;
+ color: #000;
+ }
+}
+
+.clear {
+ @include pie-clearfix;
+}
+
+.button_to input[type="submit"] {
+ position: relative;
+ left: -2px;
+}
@@ -7,5 +7,6 @@
.referrer
= r.input :host, :label => "Referrer host", :required => false
= r.input :_destroy, :as => :boolean, :label => "remove"
+ .clear
= link_to "Add a referrer", "#", :id => "add_host_link"
= f.button :submit, "Save"
@@ -1,10 +1,11 @@
= header @sensor.name
-- case @sensor.type
-- when "query"
- = render "query_form"
-- when "referrer"
- = render "referrer_form"
+#content
+ - case @sensor.type
+ - when "query"
+ = render "query_form"
+ - when "referrer"
+ = render "referrer_form"
-= button_to "Remove this sensor", [@site, @sensor], :method => :delete,
- :confirm => "Are you sure? There is no going back!"
+ = button_to "Remove this sensor", [@site, @sensor], :method => :delete,
+ :confirm => "Are you sure? There is no going back!"
View
@@ -1,5 +1,4 @@
# This configuration file works with both the Compass command line tool and within Rails.
-require 'kisko-compass'
# Require any additional compass plugins here.
project_type = :rails
@@ -50,7 +50,7 @@ jQuery(function() {
}
$("#add_host_link").click(function(event) {
- var div = $("<div/>").addClass("referrer"),
+ var div = $("<div/>").addClass("input referrer"),
ts = new Date().getTime(),
label = $("<label/>", {
for: "sensor_hosts_attributes_" + ts + "_host"
@@ -62,7 +62,7 @@ jQuery(function() {
size: 50,
type: "text"
}),
- remove = $('<a href="#" class="remove">[x]<a/>');
+ remove = $('<a href="#" class="remove">remove<a/>');
label.appendTo(div);
input.appendTo(div);
@@ -69,7 +69,7 @@
click_link "Add a referrer"
within(".referrer:last") do
fill_in "Referrer host", :with => "snowfinch.net"
- click_link "[x]"
+ click_link "remove"
end
click_button "Save"
@@ -161,7 +161,7 @@
end
click_link "Add a referrer"
- within :xpath, "//div[@class='referrer'][4]" do
+ within :xpath, "//div[contains(@class,'referrer')][4]" do
fill_in "Referrer host", :with => "jaiku.com"
end

0 comments on commit d4a8603

Please sign in to comment.