app/assets/javascripts/thin_man.js in thin_man-0.18.0 vs app/assets/javascripts/thin_man.js in thin_man-0.18.1
- old
+ new
@@ -151,10 +151,13 @@
},
sendContentType: function() {
return true;
},
insertHtml: function(data) {
+ debug_logger.log("thin_man.AjaxSubmission.insertHtml")
+ debug_logger.log(this.target)
+ debug_logger.log(this.insert_method)
if(this.target){
this.target[this.insert_method](data);
if(this.refocus()){
this.target.find('input,select,textarea').filter(':visible:enabled:first').each(function(){
if(!$(this).data('date-picker')){
@@ -183,10 +186,12 @@
},
refocus: function(){
return true;
},
ajaxSuccess: function(data,textStatus,jqXHR){
+ debug_logger.log("thin_man.AjaxSubmission.ajaxSuccess")
+ debug_logger.log(data)
if(typeof data === 'string'){
this.insertHtml(data);
} else if(typeof data === 'object') {
if(typeof data.html != 'undefined'){
if(typeof data.hooch_modal != 'undefined'){
@@ -251,10 +256,12 @@
$.each(this.watchers, function(){
this.linkCompleted(this)
})
},
ajaxComplete: function(jqXHR) {
+ debug_logger.log('thin_man.AjaxSubmission.ajaxComplete')
+ debug_logger.log(jqXHR)
this.showTrigger();
this.notifyWatchers();
if(this.progress_indicator){
this.progress_indicator.stop();
} else if(!this.trigger_is_progress_target){
@@ -510,9 +517,10 @@
}
return fd
}
},
ajaxSuccess: function(data,textStatus,jqXHR){
+ debug_logger.log('thin_man.AjaxFormSubmission.ajaxSuccess')
this._super(data,textStatus,jqXHR)
if(this.resetOnSuccess()){
this.jq_obj[0].reset();
$(this.jq_obj).find('input[type=text],textarea,select').filter(':visible:first').focus();
}