Skip to content

Commit

Permalink
Rollback aa9c209
Browse files Browse the repository at this point in the history
Repurposing this event should not happen. Framework is not concerned with the needs of loading indicators

Refs #5555
  • Loading branch information
daftspunk committed Apr 8, 2021
1 parent 97ebe80 commit 99a0861
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
3 changes: 1 addition & 2 deletions modules/system/assets/js/framework-min.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ var fieldElement=$form.find('[name="'+fieldName+'"], [name="'+fieldName+'[]"], [
if(fieldElement.length>0){var _event=jQuery.Event('ajaxInvalidField')
$(window).trigger(_event,[fieldElement.get(0),fieldName,fieldMessages,isFirstInvalidField])
if(isFirstInvalidField){if(!_event.isDefaultPrevented())fieldElement.focus()
isFirstInvalidField=false}}})},handleFlashMessage:function(message,type){},handleRedirectResponse:function(url){window.location.assign(url)
$el.trigger('ajaxDone')},handleUpdateResponse:function(data,textStatus,jqXHR){var updatePromise=$.Deferred().done(function(){for(var partial in data){var selector=(options.update[partial])?options.update[partial]:partial
isFirstInvalidField=false}}})},handleFlashMessage:function(message,type){},handleRedirectResponse:function(url){window.location.assign(url)},handleUpdateResponse:function(data,textStatus,jqXHR){var updatePromise=$.Deferred().done(function(){for(var partial in data){var selector=(options.update[partial])?options.update[partial]:partial
if($.type(selector)=='string'&&selector.charAt(0)=='@'){$(selector.substring(1)).append(data[partial]).trigger('ajaxUpdate',[context,data,textStatus,jqXHR])}
else if($.type(selector)=='string'&&selector.charAt(0)=='^'){$(selector.substring(1)).prepend(data[partial]).trigger('ajaxUpdate',[context,data,textStatus,jqXHR])}
else{$(selector).trigger('ajaxBeforeReplace')
Expand Down
3 changes: 1 addition & 2 deletions modules/system/assets/js/framework.combined-min.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ var fieldElement=$form.find('[name="'+fieldName+'"], [name="'+fieldName+'[]"], [
if(fieldElement.length>0){var _event=jQuery.Event('ajaxInvalidField')
$(window).trigger(_event,[fieldElement.get(0),fieldName,fieldMessages,isFirstInvalidField])
if(isFirstInvalidField){if(!_event.isDefaultPrevented())fieldElement.focus()
isFirstInvalidField=false}}})},handleFlashMessage:function(message,type){},handleRedirectResponse:function(url){window.location.assign(url)
$el.trigger('ajaxDone')},handleUpdateResponse:function(data,textStatus,jqXHR){var updatePromise=$.Deferred().done(function(){for(var partial in data){var selector=(options.update[partial])?options.update[partial]:partial
isFirstInvalidField=false}}})},handleFlashMessage:function(message,type){},handleRedirectResponse:function(url){window.location.assign(url)},handleUpdateResponse:function(data,textStatus,jqXHR){var updatePromise=$.Deferred().done(function(){for(var partial in data){var selector=(options.update[partial])?options.update[partial]:partial
if($.type(selector)=='string'&&selector.charAt(0)=='@'){$(selector.substring(1)).append(data[partial]).trigger('ajaxUpdate',[context,data,textStatus,jqXHR])}
else if($.type(selector)=='string'&&selector.charAt(0)=='^'){$(selector.substring(1)).prepend(data[partial]).trigger('ajaxUpdate',[context,data,textStatus,jqXHR])}
else{$(selector).trigger('ajaxBeforeReplace')
Expand Down
5 changes: 0 additions & 5 deletions modules/system/assets/js/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,6 @@ if (window.jQuery.request !== undefined) {
*/
handleRedirectResponse: function(url) {
window.location.assign(url)
// Indicate that the AJAX request is finished if we're still on the current page
// so that the loading indicator for redirects that cause a browser to download
// a file instead of leave the page will properly stop.
// @see https://github.com/octobercms/october/issues/5055
$el.trigger('ajaxDone')
},

/*
Expand Down
1 change: 1 addition & 0 deletions modules/system/assets/ui/storm-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 99a0861

Please sign in to comment.