thin_man 0.0.2 → 0.0.3
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 +6 -10
- data/lib/thin_man/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3b67ae0441447a51a48fde3c3527002711452d8
|
4
|
+
data.tar.gz: cfeb07034950207df27ce26e3b02bffffa601ffd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15421866996528de47dd3bc6b58332f143819903587a26db2af056825bbf2068293628b8ed3f2f79190a6a2dd87a542ec4ce9170c7c93f135fe8f9b6c00d0768
|
7
|
+
data.tar.gz: 177e75fbf90266e21e5dae64142dcf4c06f94dd00275fdcd01b1a6f817afca9568c6b9df5b5bbc71587b277c05eaeb49c4349ddd11d3621c628918bff07e9ea4
|
@@ -113,15 +113,18 @@ var AjaxSubmission = Class.extend({
|
|
113
113
|
}
|
114
114
|
},
|
115
115
|
ajaxComplete: function(jqXHR) {
|
116
|
-
response_data = JSON.parse(jqXHR.responseText)
|
117
116
|
this.showTrigger();
|
118
117
|
if(this.progress_indicator){
|
119
118
|
this.progress_indicator.stop();
|
120
119
|
}
|
120
|
+
try{
|
121
|
+
response_data = JSON.parse(jqXHR.responseText)
|
122
|
+
} catch(err) {
|
123
|
+
response_data = {}
|
124
|
+
// hmmm, the response is not JSON, so there's no flash.
|
125
|
+
}
|
121
126
|
if(typeof response_data.flash_message != 'undefined'){
|
122
|
-
console.log('got a flash')
|
123
127
|
flash_style = this.httpResponseToFlashStyle(jqXHR.status)
|
124
|
-
console.log(flash_style)
|
125
128
|
new AjaxFlash(flash_style, response_data.flash_message,this.target);
|
126
129
|
}
|
127
130
|
},
|
@@ -175,9 +178,6 @@ var AjaxBrowserPushFlash = Class.extend({
|
|
175
178
|
this.message = $flash.data('ajax-browser-push-flash')
|
176
179
|
this.$target = $($flash.data('ajax-browser-push-flash-target'));
|
177
180
|
this.$target.data('ajax-browser-push-flash',this.message);
|
178
|
-
console.log("AjaxBrowserPushFlash: ")
|
179
|
-
console.log(this.message)
|
180
|
-
console.log(this.$target.data());
|
181
181
|
}
|
182
182
|
});
|
183
183
|
var AjaxProgress = Class.extend({
|
@@ -211,10 +211,6 @@ var AjaxProgress = Class.extend({
|
|
211
211
|
});
|
212
212
|
var AjaxFlash = Class.extend({
|
213
213
|
init: function(type,message,elem){
|
214
|
-
console.log('ajaxflash:')
|
215
|
-
console.log(type)
|
216
|
-
console.log(message)
|
217
|
-
console.log(elem)
|
218
214
|
this.flash_container = $('#ajax_flash_container').clone();
|
219
215
|
$('body').append(this.flash_container);
|
220
216
|
this.flash_container.css({position:'absolute',visibility: 'hidden'});
|
data/lib/thin_man/version.rb
CHANGED