Permalink
Browse files

Merge branch 'develop' of git://github.com/secret-development/real-bo…

…x into develop
  • Loading branch information...
2 parents 399809a + cb713ba commit f0cc4545f611c94e8bd5939f0b642acfd7c53e09 @MonsWriter MonsWriter committed Feb 24, 2012
Binary file not shown.
@@ -123,3 +123,9 @@ $(document).ready(function() {
});
});
+// add photo to subject
+$(document).ready(function() {
+
+
+
+});
@@ -47,11 +47,13 @@ form{
float:left;
min-width:200px;
margin-bottom:20px;
+ margin-top:20px;
+ margin-right:100px;
}
#photos{
float:left;
- margin-left:100px;
- width:70%;
+ margin-top:20px;
+ width:55%;
h1{
font-weight:normal;
margin-bottom:20px;
@@ -60,13 +62,13 @@ form{
.photo-subject{
margin-bottom:10px;
float:left;
- margin-right:25px;
- min-width:202px;
- min-height:150px;
+ margin-right:10px;
+ min-width:160px;
+ min-height:110px;
.self-photo{
img{
- width:180px;
- height:140px;
+ width:140px;
+ height:100px;
}
a{
margin-left:2px;
@@ -75,5 +77,8 @@ form{
}
#back-to-subject{
clear:both;
- margin-top:80px;
+ margin-top:50px;
+}
+#subject-photo-complete-msg{
+ display:none;
}
@@ -27,8 +27,8 @@ THE SOFTWARE.
border: 2px solid #E5E5E5;
font: 11px Verdana, Geneva, sans-serif;
margin-top: 5px;
- padding: 10px;
- width: 350px;
+ padding: 5px;
+ width: 180px;
}
.uploadifyError {
background-color: #FDE5DD !important;
@@ -1 +1,2 @@
-$('#photo_<%= @photo.id %>').remove();
+$('#photo_<%= @photo.id %>').parent().effect("highlight", {background: '#F1ECB2'}, 500);;
+$('#photo_<%= @photo.id %>').remove();
@@ -1,12 +1,12 @@
-<h1>Log in</h1>
+
<div class="span6">
-<%= form_tag sessions_path, :html => {:class => "well form-inline"} do %>
- <%= label_tag :email %>
- <%= email_field_tag :email %>
+<h1>Вход</h1>
+<%= form_tag(sessions_path, :class => "well form-inline") do %>
+
+ <%= email_field_tag :email%>
- <%= label_tag :password %>
<%= password_field_tag :password %>
- <%= submit_tag "Log in", :class => "btn" %>
+ <%= submit_tag "Войти", :class => "btn" %>
<% end %>
</div>
@@ -1,3 +1,7 @@
+<div class="alert alert-success" id="subject-photo-complete-msg">
+ <a class="close" data-dismiss="alert">×</a>
+ Изображение успешно загрузилось
+</div>
<%= form_for(@subject, :html =>
{:multipart => true,:class => "form-horizontal"}) do |f| %>
<%= error_messages_for(@subject) %>
@@ -24,6 +28,7 @@
'auto' : true,
'onComplete' : function(e, id, obj, response, data) {
$('#photos').append(response);
+ $("#subject-photo-complete-msg").show();
}
});
});
@@ -40,6 +45,7 @@
<%= render :partial => "photos/photo",
:collection => @subject.photos %>
</div>
+ <div class="clear"></div>
<div id="back-to-subject">
<%= link_to icon_arrow_left_white + " Вернуться к объекту",
subject_path(@subject), :class => "btn btn-info" %>
View
@@ -2,8 +2,8 @@
FactoryGirl.define do
factory :user do
- email "MyString"
- password_hash "MyString"
- password_salt "MyString"
+ email "agent@mail.ru"
+ password "MyString"
+ password_confirmation "MyString"
end
end
View
@@ -1,5 +1,20 @@
require 'spec_helper'
describe User do
-
+ before(:each) do
+ @attr = {
+ :email => "agent@mail.ru",
+ :password => "password",
+ :password_confirmation => "password"
+ }
+ end
+
+ it "should create user" do
+ User.create!(@attr)
+ end
+
+ it "should require email" do
+ null_email = User.new(@attr.merge(:email => ""))
+ null_email.should_not be_valid
+ end
end

0 comments on commit f0cc454

Please sign in to comment.