Skip to content

Commit

Permalink
vertical adjustment aces#1309
Browse files Browse the repository at this point in the history
  • Loading branch information
MontrealSergiy committed May 4, 2023
1 parent 7a52ac0 commit fc37605
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions BrainPortal/app/controllers/userfiles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,9 @@ def create #:nodoc:
flash[:error] += "It might help to rename the file.\n" if flash[:error].include? "Name is already"
respond_to do |format|
format.html { redirect_to redirect_path }
format.json { render :json => { :notice => flash[:error] }, :status => :unprocessable_entity
flash.discard
format.json {
render :json => { :notice => flash[:error] }, :status => :unprocessable_entity
flash.discard # no need to repeat error message
}
end
return
Expand Down
2 changes: 1 addition & 1 deletion BrainPortal/public/javascripts/cbrain.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$(document).ajaxError(function (event, xhr, settings, error) {
var flash = $('.flash_error'),
xml = $(xhr.responseXML),
rjson = xhr.responseJSON;
rjson = xhr.responseJSON;
if (xhr.status === 0) return true;
//if (rjson && rjson.notice) return true;

Expand Down

0 comments on commit fc37605

Please sign in to comment.