thin_man 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ajax_bindings.js +14 -6
- data/lib/thin_man/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 686c4bc3d564f6254c7ff91729a3fb3f309421eb
|
4
|
+
data.tar.gz: 72e6b93a39f0f2c6edd23c03c547359a15ca6241
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3fb89ad519ff717aa47588c837117e922c84d4142f0376a82b9f02acd48ac95abc39fb2220759793435878ae3a0115d5c45a0713d65bf1317791740e141072f
|
7
|
+
data.tar.gz: de7eb4294fa77bfe77ca1686fb82271a1148c76607e33ccf23b173c3966a2ab7b2e59fed5d9446e06ec6e74f97894e19e39811eb1a999dfc29c16321bce2f043
|
@@ -104,9 +104,11 @@ var AjaxSubmission = Class.extend({
|
|
104
104
|
})
|
105
105
|
}
|
106
106
|
}
|
107
|
-
|
108
|
-
|
109
|
-
|
107
|
+
if(this.target){
|
108
|
+
var ajax_flash = this.target.children().last().data('ajax-flash');
|
109
|
+
if((jqXHR.status == 200) && ajax_flash){
|
110
|
+
new AjaxFlash('success', ajax_flash.notice,this.target);
|
111
|
+
}
|
110
112
|
}
|
111
113
|
if ((jqXHR.status == 200) && !(typeof step === 'undefined')) {
|
112
114
|
$(form_map[step]).ScrollTo();
|
@@ -125,7 +127,11 @@ var AjaxSubmission = Class.extend({
|
|
125
127
|
}
|
126
128
|
if(typeof response_data.flash_message != 'undefined'){
|
127
129
|
flash_style = this.httpResponseToFlashStyle(jqXHR.status)
|
128
|
-
|
130
|
+
if(this.target){
|
131
|
+
new AjaxFlash(flash_style, response_data.flash_message,this.target);
|
132
|
+
}else{
|
133
|
+
new AjaxFlash(flash_style, response_data.flash_message,this.jq_obj);
|
134
|
+
}
|
129
135
|
}
|
130
136
|
},
|
131
137
|
ajaxBefore: function(jqXHr) {
|
@@ -156,7 +162,7 @@ var AjaxSubmission = Class.extend({
|
|
156
162
|
if([403,409,500].indexOf(response_code) > -1){
|
157
163
|
return 'error'
|
158
164
|
}
|
159
|
-
if([200].indexOf(response_code) > -1){
|
165
|
+
if([200,202].indexOf(response_code) > -1){
|
160
166
|
return 'success'
|
161
167
|
}
|
162
168
|
return 'error'
|
@@ -355,7 +361,9 @@ var ResetOnSubmitForm = AjaxFormSubmission.extend({
|
|
355
361
|
var DeleteLink = AjaxSubmission.extend({
|
356
362
|
ajaxSuccess: function(data,textStatus,jqXHR){
|
357
363
|
this._super(data,textStatus,jqXHR);
|
358
|
-
this.target
|
364
|
+
if(this.target){
|
365
|
+
this.target.remove();
|
366
|
+
}
|
359
367
|
},
|
360
368
|
getAjaxType: function(){
|
361
369
|
return 'DELETE';
|
data/lib/thin_man/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thin_man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut, Adam Bialek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|