Skip to content

Commit

Permalink
demo
Browse files Browse the repository at this point in the history
  • Loading branch information
umerkulovb committed Apr 13, 2012
1 parent 13f42e5 commit 278fe80
Show file tree
Hide file tree
Showing 65 changed files with 564 additions and 73 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion Gemfile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'http://rubygems.org'

gem 'rails', '3.1.1'
gem 'rails', '~> 3.2.2'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
Expand All @@ -26,6 +26,8 @@ gem "jquery-rails"

gem "formtastic"
gem "cocoon"
gem 'client_side_validations', :git => 'https://github.com/bcardarella/client_side_validations.git'
gem 'client_side_validations-formtastic', :git => "https://github.com/dockyard/client_side_validations-formtastic.git"


# we need this here, see http://blog.davidchelimsky.net/2010/07/11/rspec-rails-2-generators-and-rake-tasks/
Expand Down
160 changes: 89 additions & 71 deletions Gemfile.lock
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,93 +1,109 @@
GIT
remote: https://github.com/bcardarella/client_side_validations.git
revision: 548b491f08acfa2df265a73f44c565bf12b70b12
specs:
client_side_validations (3.2.0.beta.3)

GIT
remote: https://github.com/dockyard/client_side_validations-formtastic.git
revision: 883a826248937e9dac508bb9a0d43e666381977b
specs:
client_side_validations-formtastic (2.0.0.beta.3)
client_side_validations (~> 3.2.0.beta.1)
formtastic (~> 2.0.0)

GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.1)
actionpack (= 3.1.1)
mail (~> 2.3.0)
actionpack (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
actionmailer (3.2.3)
actionpack (= 3.2.3)
mail (~> 2.4.4)
actionpack (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.2)
activemodel (3.1.1)
activesupport (= 3.1.1)
sprockets (~> 2.1.2)
activemodel (3.2.3)
activesupport (= 3.2.3)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
arel (~> 2.2.1)
activerecord (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
activesupport (3.1.1)
activeresource (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
activesupport (3.2.3)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (2.2.1)
bson_ext (1.4.0)
arel (3.0.2)
bson (1.6.2)
bson_ext (1.6.2)
bson (~> 1.6.2)
builder (3.0.0)
cocoon (1.0.12)
cocoon (1.0.20)
diff-lcs (1.1.3)
erubis (2.7.0)
factory_girl (2.1.2)
activesupport
factory_girl_rails (1.2.0)
factory_girl (~> 2.1.0)
factory_girl (3.1.0)
activesupport (>= 3.0.0)
factory_girl_rails (3.1.0)
factory_girl (~> 3.1.0)
railties (>= 3.0.0)
formtastic (2.0.2)
rails (~> 3.0)
haml (3.1.3)
haml (3.1.4)
haml-rails (0.3.4)
actionpack (~> 3.0)
activesupport (~> 3.0)
haml (~> 3.0)
railties (~> 3.0)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.14)
railties (~> 3.0)
journey (1.0.3)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
mail (2.3.0)
json (1.6.6)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
polyglot (0.3.2)
rack (1.3.4)
rack-cache (1.1)
mime-types (1.18)
multi_json (1.2.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.1)
actionmailer (= 3.1.1)
actionpack (= 3.1.1)
activerecord (= 3.1.1)
activeresource (= 3.1.1)
activesupport (= 3.1.1)
rails (3.2.3)
actionmailer (= 3.2.3)
actionpack (= 3.2.3)
activerecord (= 3.2.3)
activeresource (= 3.2.3)
activesupport (= 3.2.3)
bundler (~> 1.0)
railties (= 3.1.1)
railties (= 3.2.3)
rails3-generators (0.17.4)
railties (>= 3.0.0)
railties (3.1.1)
actionpack (= 3.1.1)
activesupport (= 3.1.1)
railties (3.2.3)
actionpack (= 3.2.3)
activesupport (= 3.2.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2)
rdoc (3.9.4)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
remarkable (4.0.0.alpha4)
rspec (>= 2.0.0.alpha11)
remarkable_activemodel (4.0.0.alpha4)
Expand All @@ -97,49 +113,51 @@ GEM
remarkable (~> 4.0.0.alpha4)
remarkable_activemodel (~> 4.0.0.alpha4)
rspec (>= 2.0.0.alpha11)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.6.0)
simplecov (0.5.3)
multi_json (~> 1.0.3)
rspec (2.9.0)
rspec-core (~> 2.9.0)
rspec-expectations (~> 2.9.0)
rspec-mocks (~> 2.9.0)
rspec-core (2.9.0)
rspec-expectations (2.9.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
rspec-rails (2.9.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.9.0)
simplecov (0.6.1)
multi_json (~> 1.0)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
sprockets (2.0.2)
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.4)
sqlite3 (1.3.5)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.30)
tzinfo (0.3.33)

PLATFORMS
ruby

DEPENDENCIES
bson_ext
client_side_validations!
client_side_validations-formtastic!
cocoon
factory_girl_rails
formtastic
haml
haml-rails
jquery-rails
rails (= 3.1.1)
rails (~> 3.2.2)
rails3-generators
remarkable (>= 4.0.0.alpha2)
remarkable_activemodel (>= 4.0.0.alpha2)
Expand Down
Empty file modified README
100644 → 100755
Empty file.
Empty file modified Rakefile
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions app/assets/javascripts/application.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
//= require jquery
//= require jquery_ujs
//= require cocoon
//= require rails.validations
//= require rails.validations.formtastic
//= require_tree .
37 changes: 37 additions & 0 deletions app/assets/javascripts/rails.validations.formtastic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

/*
Client Side Validations - Formtastic - v2.0.0.beta.3
https://github.com/dockyard/client_side_validations-formtastic
Copyright (c) 2012 DockYard, LLC
Licensed under the MIT license
http://www.opensource.org/licenses/mit-license.php
*/

(function() {

ClientSideValidations.formBuilders['Formtastic::FormBuilder'] = {
add: function(element, settings, message) {
var errorElement, wrapper;
if (element.data('valid') !== false) {
wrapper = element.closest('li');
errorElement = $('<p/>', {
"class": settings.inline_error_class,
text: message
});
wrapper.addClass('error');
return wrapper.append(errorElement);
} else {
return element.parent().find("p." + settings.inline_error_class).text(message);
}
},
remove: function(element, settings) {
var errorElement, wrapper;
wrapper = element.closest('li.error');
errorElement = wrapper.find("p." + settings.inline_error_class);
wrapper.removeClass('error');
return errorElement.remove();
}
};

}).call(this);
Loading

0 comments on commit 278fe80

Please sign in to comment.