jquery-ui-form 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/.document +5 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +2 -0
  4. data/Gemfile.lock +109 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.rdoc +25 -0
  7. data/Rakefile +53 -0
  8. data/VERSION +1 -0
  9. data/jquery-ui-form.gemspec +149 -0
  10. data/lib/generators/jquery_ui_form/install/install_generator.rb +18 -0
  11. data/lib/generators/templates/jquery-ui-form.js +46 -0
  12. data/lib/generators/templates/jquery-ui-form.rb +5 -0
  13. data/lib/generators/templates/jquery-ui-form.sass +115 -0
  14. data/lib/jquery-ui-form.rb +1 -0
  15. data/lib/jquery_ui_form.rb +7 -0
  16. data/lib/jquery_ui_form/form_builder.rb +43 -0
  17. data/lib/jquery_ui_form/helpers.rb +17 -0
  18. data/lib/jquery_ui_form/helpers/button_helper.rb +39 -0
  19. data/lib/jquery_ui_form/helpers/error_helper.rb +39 -0
  20. data/lib/jquery_ui_form/helpers/form_helper.rb +19 -0
  21. data/lib/jquery_ui_form/helpers/input_helper.rb +145 -0
  22. data/lib/jquery_ui_form/helpers/label_helper.rb +33 -0
  23. data/lib/jquery_ui_form/helpers/wrapper_helper.rb +41 -0
  24. data/lib/jquery_ui_form/inputs.rb +20 -0
  25. data/lib/jquery_ui_form/inputs/boolean_input.rb +16 -0
  26. data/lib/jquery_ui_form/inputs/check_boxes_input.rb +75 -0
  27. data/lib/jquery_ui_form/inputs/date_input.rb +24 -0
  28. data/lib/jquery_ui_form/inputs/email_input.rb +12 -0
  29. data/lib/jquery_ui_form/inputs/file_input.rb +12 -0
  30. data/lib/jquery_ui_form/inputs/hidden_input.rb +11 -0
  31. data/lib/jquery_ui_form/inputs/number_input.rb +12 -0
  32. data/lib/jquery_ui_form/inputs/password_input.rb +11 -0
  33. data/lib/jquery_ui_form/inputs/phone_input.rb +12 -0
  34. data/lib/jquery_ui_form/inputs/radio_input.rb +33 -0
  35. data/lib/jquery_ui_form/inputs/range_input.rb +12 -0
  36. data/lib/jquery_ui_form/inputs/search_input.rb +12 -0
  37. data/lib/jquery_ui_form/inputs/select_input.rb +19 -0
  38. data/lib/jquery_ui_form/inputs/string_input.rb +11 -0
  39. data/lib/jquery_ui_form/inputs/text_input.rb +13 -0
  40. data/lib/jquery_ui_form/inputs/url_input.rb +12 -0
  41. data/lib/jquery_ui_form/railtie.rb +14 -0
  42. data/spec/form_helper_spec.rb +22 -0
  43. data/spec/helpers/button_helper_spec.rb +54 -0
  44. data/spec/helpers/error_helper_spec.rb +81 -0
  45. data/spec/helpers/input_helper_spec.rb +18 -0
  46. data/spec/helpers/label_helper_spec.rb +31 -0
  47. data/spec/helpers/wrapper_helper_spec.rb +73 -0
  48. data/spec/inputs/boolean_input_spec.rb +25 -0
  49. data/spec/inputs/check_boxes_input_spec.rb +39 -0
  50. data/spec/inputs/date_input_spec.rb +47 -0
  51. data/spec/inputs/email_input_spec.rb +24 -0
  52. data/spec/inputs/file_input_spec.rb +24 -0
  53. data/spec/inputs/hidden_input_spec.rb +24 -0
  54. data/spec/inputs/number_input_spec.rb +24 -0
  55. data/spec/inputs/password_input_spec.rb +23 -0
  56. data/spec/inputs/phone_input_spec.rb +24 -0
  57. data/spec/inputs/radio_input_spec.rb +39 -0
  58. data/spec/inputs/range_input_spec.rb +24 -0
  59. data/spec/inputs/search_input_spec.rb +24 -0
  60. data/spec/inputs/select_input_spec.rb +28 -0
  61. data/spec/inputs/string_input_spec.rb +24 -0
  62. data/spec/inputs/text_input_spec.rb +24 -0
  63. data/spec/inputs/url_input_spec.rb +24 -0
  64. data/spec/spec_helper.rb +63 -0
  65. metadata +272 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm ruby-1.8.7@rails3
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "http://rubygems.org"
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,109 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ jquery-ui-form (0.1.0)
5
+ jquery-ui-form
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ abstract (1.0.0)
11
+ actionmailer (3.0.5)
12
+ actionpack (= 3.0.5)
13
+ mail (~> 2.2.15)
14
+ actionpack (3.0.5)
15
+ activemodel (= 3.0.5)
16
+ activesupport (= 3.0.5)
17
+ builder (~> 2.1.2)
18
+ erubis (~> 2.6.6)
19
+ i18n (~> 0.4)
20
+ rack (~> 1.2.1)
21
+ rack-mount (~> 0.6.13)
22
+ rack-test (~> 0.5.7)
23
+ tzinfo (~> 0.3.23)
24
+ activemodel (3.0.5)
25
+ activesupport (= 3.0.5)
26
+ builder (~> 2.1.2)
27
+ i18n (~> 0.4)
28
+ activerecord (3.0.5)
29
+ activemodel (= 3.0.5)
30
+ activesupport (= 3.0.5)
31
+ arel (~> 2.0.2)
32
+ tzinfo (~> 0.3.23)
33
+ activeresource (3.0.5)
34
+ activemodel (= 3.0.5)
35
+ activesupport (= 3.0.5)
36
+ activesupport (3.0.5)
37
+ arel (2.0.9)
38
+ builder (2.1.2)
39
+ diff-lcs (1.1.2)
40
+ erubis (2.6.6)
41
+ abstract (>= 1.0.0)
42
+ git (1.2.5)
43
+ i18n (0.5.0)
44
+ jeweler (1.5.2)
45
+ bundler (~> 1.0.0)
46
+ git (>= 1.2.5)
47
+ rake
48
+ mail (2.2.15)
49
+ activesupport (>= 2.3.6)
50
+ i18n (>= 0.4.0)
51
+ mime-types (~> 1.16)
52
+ treetop (~> 1.4.8)
53
+ mime-types (1.16)
54
+ nokogiri (1.4.4)
55
+ polyglot (0.3.1)
56
+ rack (1.2.2)
57
+ rack-mount (0.6.13)
58
+ rack (>= 1.0.0)
59
+ rack-test (0.5.7)
60
+ rack (>= 1.0)
61
+ rails (3.0.5)
62
+ actionmailer (= 3.0.5)
63
+ actionpack (= 3.0.5)
64
+ activerecord (= 3.0.5)
65
+ activeresource (= 3.0.5)
66
+ activesupport (= 3.0.5)
67
+ bundler (~> 1.0)
68
+ railties (= 3.0.5)
69
+ railties (3.0.5)
70
+ actionpack (= 3.0.5)
71
+ activesupport (= 3.0.5)
72
+ rake (>= 0.8.7)
73
+ thor (~> 0.14.4)
74
+ rake (0.8.7)
75
+ rcov (0.9.9)
76
+ rspec (2.5.0)
77
+ rspec-core (~> 2.5.0)
78
+ rspec-expectations (~> 2.5.0)
79
+ rspec-mocks (~> 2.5.0)
80
+ rspec-core (2.5.1)
81
+ rspec-expectations (2.5.0)
82
+ diff-lcs (~> 1.1.2)
83
+ rspec-mocks (2.5.0)
84
+ rspec-rails (2.5.0)
85
+ actionpack (~> 3.0)
86
+ activesupport (~> 3.0)
87
+ railties (~> 3.0)
88
+ rspec (~> 2.5.0)
89
+ thor (0.14.6)
90
+ treetop (1.4.9)
91
+ polyglot (>= 0.3.1)
92
+ tzinfo (0.3.25)
93
+ webrat (0.7.3)
94
+ nokogiri (>= 1.2.0)
95
+ rack (>= 1.0)
96
+ rack-test (>= 0.5.3)
97
+
98
+ PLATFORMS
99
+ ruby
100
+
101
+ DEPENDENCIES
102
+ bundler (~> 1.0.0)
103
+ jeweler (~> 1.5.2)
104
+ jquery-ui-form!
105
+ rails (>= 3.0)
106
+ rcov
107
+ rspec (>= 2.5)
108
+ rspec-rails (>= 2.5)
109
+ webrat (>= 0.7)
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Aivars Akots
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,25 @@
1
+ = jquery-ui-formbuilder
2
+
3
+ Description goes here.
4
+ == TODO
5
+ * autocomplete tag
6
+ * Implenent tabs
7
+ * Write documentation and samples
8
+ * input[range] to jQuery slider?
9
+ * confirmation to dialog
10
+
11
+ == Contributing to jquery-ui-formbuilder
12
+
13
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
14
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
15
+ * Fork the project
16
+ * Start a feature/bugfix branch
17
+ * Commit and push until you are happy with your contribution
18
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
19
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
20
+
21
+ == Copyright
22
+
23
+ Copyright (c) 2011 Aivars Akots. See LICENSE.txt for
24
+ further details.
25
+
data/Rakefile ADDED
@@ -0,0 +1,53 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "jquery-ui-form"
16
+ gem.homepage = "http://github.com/aivarsak/jquery-ui-form"
17
+ gem.license = "MIT"
18
+ gem.summary = %Q{ one-line summary of your gem}
19
+ gem.description = %Q{longer description of your gem}
20
+ gem.email = "aivars.akots@gmail.com"
21
+ gem.authors = ["Aivars Akots"]
22
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
23
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
29
+ require 'rake/testtask'
30
+ Rake::TestTask.new(:spec) do |test|
31
+ test.libs << 'lib' << 'spec'
32
+ test.pattern = 'spec/**/*_spec.rb'
33
+ test.verbose = true
34
+ end
35
+
36
+ require 'rcov/rcovtask'
37
+ Rcov::RcovTask.new do |test|
38
+ test.libs << 'spec'
39
+ test.pattern = 'spec/**/*_spec.rb'
40
+ test.verbose = true
41
+ end
42
+
43
+ task :default => :test
44
+
45
+ require 'rake/rdoctask'
46
+ Rake::RDocTask.new do |rdoc|
47
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
+
49
+ rdoc.rdoc_dir = 'rdoc'
50
+ rdoc.title = "jquery-ui-form #{version}"
51
+ rdoc.rdoc_files.include('README*')
52
+ rdoc.rdoc_files.include('lib/**/*.rb')
53
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,149 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{jquery-ui-form}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Aivars Akots"]
12
+ s.date = %q{2011-04-19}
13
+ s.description = %q{longer description of your gem}
14
+ s.email = %q{aivars.akots@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rvmrc",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "jquery-ui-form.gemspec",
29
+ "lib/generators/jquery_ui_form/install/install_generator.rb",
30
+ "lib/generators/templates/jquery-ui-form.js",
31
+ "lib/generators/templates/jquery-ui-form.rb",
32
+ "lib/generators/templates/jquery-ui-form.sass",
33
+ "lib/jquery-ui-form.rb",
34
+ "lib/jquery_ui_form.rb",
35
+ "lib/jquery_ui_form/form_builder.rb",
36
+ "lib/jquery_ui_form/helpers.rb",
37
+ "lib/jquery_ui_form/helpers/button_helper.rb",
38
+ "lib/jquery_ui_form/helpers/error_helper.rb",
39
+ "lib/jquery_ui_form/helpers/form_helper.rb",
40
+ "lib/jquery_ui_form/helpers/input_helper.rb",
41
+ "lib/jquery_ui_form/helpers/label_helper.rb",
42
+ "lib/jquery_ui_form/helpers/wrapper_helper.rb",
43
+ "lib/jquery_ui_form/inputs.rb",
44
+ "lib/jquery_ui_form/inputs/boolean_input.rb",
45
+ "lib/jquery_ui_form/inputs/check_boxes_input.rb",
46
+ "lib/jquery_ui_form/inputs/date_input.rb",
47
+ "lib/jquery_ui_form/inputs/email_input.rb",
48
+ "lib/jquery_ui_form/inputs/file_input.rb",
49
+ "lib/jquery_ui_form/inputs/hidden_input.rb",
50
+ "lib/jquery_ui_form/inputs/number_input.rb",
51
+ "lib/jquery_ui_form/inputs/password_input.rb",
52
+ "lib/jquery_ui_form/inputs/phone_input.rb",
53
+ "lib/jquery_ui_form/inputs/radio_input.rb",
54
+ "lib/jquery_ui_form/inputs/range_input.rb",
55
+ "lib/jquery_ui_form/inputs/search_input.rb",
56
+ "lib/jquery_ui_form/inputs/select_input.rb",
57
+ "lib/jquery_ui_form/inputs/string_input.rb",
58
+ "lib/jquery_ui_form/inputs/text_input.rb",
59
+ "lib/jquery_ui_form/inputs/url_input.rb",
60
+ "lib/jquery_ui_form/railtie.rb",
61
+ "spec/form_helper_spec.rb",
62
+ "spec/helpers/button_helper_spec.rb",
63
+ "spec/helpers/error_helper_spec.rb",
64
+ "spec/helpers/input_helper_spec.rb",
65
+ "spec/helpers/label_helper_spec.rb",
66
+ "spec/helpers/wrapper_helper_spec.rb",
67
+ "spec/inputs/boolean_input_spec.rb",
68
+ "spec/inputs/check_boxes_input_spec.rb",
69
+ "spec/inputs/date_input_spec.rb",
70
+ "spec/inputs/email_input_spec.rb",
71
+ "spec/inputs/file_input_spec.rb",
72
+ "spec/inputs/hidden_input_spec.rb",
73
+ "spec/inputs/number_input_spec.rb",
74
+ "spec/inputs/password_input_spec.rb",
75
+ "spec/inputs/phone_input_spec.rb",
76
+ "spec/inputs/radio_input_spec.rb",
77
+ "spec/inputs/range_input_spec.rb",
78
+ "spec/inputs/search_input_spec.rb",
79
+ "spec/inputs/select_input_spec.rb",
80
+ "spec/inputs/string_input_spec.rb",
81
+ "spec/inputs/text_input_spec.rb",
82
+ "spec/inputs/url_input_spec.rb",
83
+ "spec/spec_helper.rb"
84
+ ]
85
+ s.homepage = %q{http://github.com/aivarsak/jquery-ui-form}
86
+ s.licenses = ["MIT"]
87
+ s.require_paths = ["lib"]
88
+ s.rubygems_version = %q{1.4.1}
89
+ s.summary = %q{one-line summary of your gem}
90
+ s.test_files = [
91
+ "spec/form_helper_spec.rb",
92
+ "spec/helpers/button_helper_spec.rb",
93
+ "spec/helpers/error_helper_spec.rb",
94
+ "spec/helpers/input_helper_spec.rb",
95
+ "spec/helpers/label_helper_spec.rb",
96
+ "spec/helpers/wrapper_helper_spec.rb",
97
+ "spec/inputs/boolean_input_spec.rb",
98
+ "spec/inputs/check_boxes_input_spec.rb",
99
+ "spec/inputs/date_input_spec.rb",
100
+ "spec/inputs/email_input_spec.rb",
101
+ "spec/inputs/file_input_spec.rb",
102
+ "spec/inputs/hidden_input_spec.rb",
103
+ "spec/inputs/number_input_spec.rb",
104
+ "spec/inputs/password_input_spec.rb",
105
+ "spec/inputs/phone_input_spec.rb",
106
+ "spec/inputs/radio_input_spec.rb",
107
+ "spec/inputs/range_input_spec.rb",
108
+ "spec/inputs/search_input_spec.rb",
109
+ "spec/inputs/select_input_spec.rb",
110
+ "spec/inputs/string_input_spec.rb",
111
+ "spec/inputs/text_input_spec.rb",
112
+ "spec/inputs/url_input_spec.rb",
113
+ "spec/spec_helper.rb"
114
+ ]
115
+
116
+ if s.respond_to? :specification_version then
117
+ s.specification_version = 3
118
+
119
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
120
+ s.add_runtime_dependency(%q<jquery-ui-form>, [">= 0"])
121
+ s.add_development_dependency(%q<rspec>, [">= 2.5"])
122
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
123
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
124
+ s.add_development_dependency(%q<rcov>, [">= 0"])
125
+ s.add_development_dependency(%q<rails>, [">= 3.0"])
126
+ s.add_development_dependency(%q<rspec-rails>, [">= 2.5"])
127
+ s.add_development_dependency(%q<webrat>, [">= 0.7"])
128
+ else
129
+ s.add_dependency(%q<jquery-ui-form>, [">= 0"])
130
+ s.add_dependency(%q<rspec>, [">= 2.5"])
131
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
132
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
133
+ s.add_dependency(%q<rcov>, [">= 0"])
134
+ s.add_dependency(%q<rails>, [">= 3.0"])
135
+ s.add_dependency(%q<rspec-rails>, [">= 2.5"])
136
+ s.add_dependency(%q<webrat>, [">= 0.7"])
137
+ end
138
+ else
139
+ s.add_dependency(%q<jquery-ui-form>, [">= 0"])
140
+ s.add_dependency(%q<rspec>, [">= 2.5"])
141
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
142
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
143
+ s.add_dependency(%q<rcov>, [">= 0"])
144
+ s.add_dependency(%q<rails>, [">= 3.0"])
145
+ s.add_dependency(%q<rspec-rails>, [">= 2.5"])
146
+ s.add_dependency(%q<webrat>, [">= 0.7"])
147
+ end
148
+ end
149
+
@@ -0,0 +1,18 @@
1
+ module JqueryUiForm
2
+ # Copies jquery-ui-form.sass to app/stylesheets and jquery-ui-form.js to public/javascirpts and a config initializer config/initializers/jquery-ui-form.rb
3
+ #
4
+ # @example
5
+ # $ rails generate formtastic:install
6
+ #
7
+ class InstallGenerator < Rails::Generators::Base
8
+ desc "Copies jquery-ui-form.sass to app/stylesheets and jquery-ui-form.js to public/javascirpts and a config initializer to config/initializers/jquery-ui-form.rb"
9
+
10
+ source_root File.expand_path('../../../templates', __FILE__)
11
+
12
+ def copy_files
13
+ template 'jquery-ui-form.rb', 'config/initializers/jquery-ui-form.rb'
14
+ template 'jquery-ui-form.sass', 'app/stylesheets/jquery-ui-form.sass'
15
+ template 'jquery-ui-form.js', 'public/javascripts/jquery-ui-form.js'
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,46 @@
1
+ $(function(){
2
+
3
+ // $('input:enabled:visible:first').focus().next(".ui-input-hint").hide();
4
+
5
+ $(".ui-button").each(function(){
6
+ $(this).button({
7
+ icons: {
8
+ primary: $(this).attr("data-icon")
9
+ }
10
+ });
11
+ });
12
+ $(".ui-radio-input fieldset.to-buttonset").buttonset();
13
+ $(".ui-check_boxes-input fieldset.to-buttonset").buttonset();
14
+ $("input[type='date'].ui-date-input" ).each(function(){
15
+ var options = {};
16
+ if($(this).attr('data-calendar') != "") {
17
+ options = $.parseJSON($(this).attr('data-calendar'));
18
+ }
19
+ $(this).datepicker(options);
20
+ });
21
+
22
+ $('input, textarea').live("focus", function(){
23
+ if ($(this).attr("type") == "checkbox" || $(this).attr("type") == "radio") {
24
+ return;
25
+ }
26
+ $(this).next(".ui-input-hint").hide();
27
+ });
28
+ $('input, textarea').live("blur", function(){
29
+ if ($(this).val().length == 0){
30
+ $(this).next(".ui-input-hint").show();
31
+ }
32
+ });
33
+ jquery_ui_form_events();
34
+ });
35
+
36
+ function jquery_ui_form_events() {
37
+
38
+ $('input, textarea').each(function(){
39
+ if ($(this).attr("type") == "checkbox" || $(this).attr("type") == "radio") {
40
+ return;
41
+ }
42
+ if ($(this).val().length > 0){
43
+ $(this).next(".ui-input-hint").hide();
44
+ }
45
+ });
46
+ }