javascript_util_asset_pack 0.0.4 → 0.0.5.rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,12 @@ jQuery(document).ajaxError (event, xhr, settings, exception) ->
|
|
5
5
|
|
6
6
|
if xhr.status is 404
|
7
7
|
friendly = "#{friendly}Page not found"
|
8
|
+
else if xhr.status is 422
|
9
|
+
friendly = "Your submission has one or more errors. \n\nPlease correct the following issues: \n"
|
10
|
+
validationErrors = jQuery.parseJSON(xhr.responseText)
|
11
|
+
if jQuery.isArray(validationErrors)
|
12
|
+
friendly = friendly + " - #{error}\n" for error in validationErrors
|
13
|
+
local = friendly + "\n\n"
|
8
14
|
else
|
9
15
|
friendly = "#{friendly}an exception has occurred\nPlease try again"
|
10
16
|
|
metadata
CHANGED
@@ -1,103 +1,61 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: javascript_util_asset_pack
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5.rc
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Jesse House
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-01-26 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: rails
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70098299730720 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
18
|
+
requirements:
|
21
19
|
- - ~>
|
22
|
-
- !ruby/object:Gem::Version
|
20
|
+
- !ruby/object:Gem::Version
|
23
21
|
version: 3.1.0.rc
|
24
22
|
type: :runtime
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: javascript_safe_logger
|
28
23
|
prerelease: false
|
29
|
-
|
24
|
+
version_requirements: *70098299730720
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: javascript_safe_logger
|
27
|
+
requirement: &70098299729840 !ruby/object:Gem::Requirement
|
30
28
|
none: false
|
31
|
-
requirements:
|
29
|
+
requirements:
|
32
30
|
- - ~>
|
33
|
-
- !ruby/object:Gem::Version
|
31
|
+
- !ruby/object:Gem::Version
|
34
32
|
version: 0.0.3
|
35
33
|
type: :runtime
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
==
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
jQuery ->
|
57
|
-
new window.Util.AjaxForm '#my_form', ->
|
58
|
-
log "my_form submit success callback"
|
59
|
-
|
60
|
-
== Install
|
61
|
-
|
62
|
-
Update the Gemfile in your rails project, add the following line
|
63
|
-
|
64
|
-
gem 'javascript_util_asset_pack'
|
65
|
-
|
66
|
-
Run the generator
|
67
|
-
|
68
|
-
rails generate javascript_util_asset_pack
|
69
|
-
|
70
|
-
does the following:
|
71
|
-
|
72
|
-
* Copy spinner.gif to /app/assets/images
|
73
|
-
* Update application.html.erb adding javascript create window.Rails.env variable
|
74
|
-
* Update application.html.erb adding image_tag for spinner.gif
|
75
|
-
* Update application.js adding util_pack
|
76
|
-
|
77
|
-
== Coming Soon
|
78
|
-
|
79
|
-
* configuration object
|
80
|
-
* text in ajaxError overrides
|
81
|
-
* spinner id override
|
82
|
-
|
83
|
-
== Resources
|
84
|
-
|
85
|
-
* spinner.gif generated using http://www.ajaxload.info
|
86
|
-
|
87
|
-
== License
|
88
|
-
|
89
|
-
The Unlicense (aka: public domain)
|
90
|
-
http://unlicense.org
|
91
|
-
|
92
|
-
email:
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70098299729840
|
36
|
+
description: ! "== Rails 3.1 javascript - Util asset pack\n\n== Sets up a window.Util
|
37
|
+
object which includes\n\n* Spinner, with methods to set spinner next to element
|
38
|
+
or hide the spinner\n* AjaxForm, to ajax enable simple forms\n* jQuery ajaxError
|
39
|
+
global handler, exception data during development and friendly message in production\n\n==
|
40
|
+
Usage\n\nspinner (js version)\n\n window.Util.spinner.nextTo('#my_button'); \n
|
41
|
+
\ window.Util.spinner.nextTo('#my_button', 3, 4); // selector, top offset, left
|
42
|
+
offset\n window.Util.spinner.hide();\n \najax form (coffee script version)\n\n
|
43
|
+
\ jQuery ->\n new window.Util.AjaxForm '#my_form', -> \n log
|
44
|
+
\"my_form submit success callback\"\n\n== Install\n\nUpdate the Gemfile in your
|
45
|
+
rails project, add the following line\n\n gem 'javascript_util_asset_pack'\n\nRun
|
46
|
+
the generator\n\n rails generate javascript_util_asset_pack\n \ndoes the following:\n\n*
|
47
|
+
Copy spinner.gif to /app/assets/images\n* Update application.html.erb adding javascript
|
48
|
+
create window.Rails.env variable\n* Update application.html.erb adding image_tag
|
49
|
+
for spinner.gif\n* Update application.js adding util_pack\n\n== Coming Soon\n\n*
|
50
|
+
configuration object \n * text in ajaxError overrides\n * spinner id override\n\n==
|
51
|
+
Resources\n\n* spinner.gif generated using http://www.ajaxload.info\n\n== License\n\nThe
|
52
|
+
Unlicense (aka: public domain)\nhttp://unlicense.org\n\n"
|
53
|
+
email:
|
93
54
|
- jesse.house@gmail.com
|
94
55
|
executables: []
|
95
|
-
|
96
56
|
extensions: []
|
97
|
-
|
98
57
|
extra_rdoc_files: []
|
99
|
-
|
100
|
-
files:
|
58
|
+
files:
|
101
59
|
- .gitignore
|
102
60
|
- Gemfile
|
103
61
|
- README.rdoc
|
@@ -115,30 +73,27 @@ files:
|
|
115
73
|
- vendor/assets/javascripts/util_pack/spinner.coffee
|
116
74
|
homepage: https://github.com/house9/javascript_util_asset_pack
|
117
75
|
licenses: []
|
118
|
-
|
119
76
|
post_install_message:
|
120
77
|
rdoc_options: []
|
121
|
-
|
122
|
-
require_paths:
|
78
|
+
require_paths:
|
123
79
|
- lib
|
124
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
125
81
|
none: false
|
126
|
-
requirements:
|
127
|
-
- -
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version:
|
130
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
87
|
none: false
|
132
|
-
requirements:
|
133
|
-
- -
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
version:
|
88
|
+
requirements:
|
89
|
+
- - ! '>'
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: 1.3.1
|
136
92
|
requirements: []
|
137
|
-
|
138
93
|
rubyforge_project: javascript_util_asset_pack
|
139
|
-
rubygems_version: 1.8.
|
94
|
+
rubygems_version: 1.8.10
|
140
95
|
signing_key:
|
141
96
|
specification_version: 3
|
142
|
-
summary: Rails 3.1 javascript Util asset pack, show hide spinner, global jquery error
|
97
|
+
summary: Rails 3.1 javascript Util asset pack, show hide spinner, global jquery error
|
98
|
+
handler, etc...
|
143
99
|
test_files: []
|
144
|
-
|