Some slight improvements in AJAX errors handling.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@874 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0af6f34758
commit
9a3d743ae5
|
@ -124,12 +124,12 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
def render_403
|
def render_403
|
||||||
@project = nil
|
@project = nil
|
||||||
render :template => "common/403", :layout => true, :status => 403
|
render :template => "common/403", :layout => !request.xhr?, :status => 403
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_404
|
def render_404
|
||||||
render :template => "common/404", :layout => true, :status => 404
|
render :template => "common/404", :layout => !request.xhr?, :status => 404
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<%= if entry.is_dir?
|
<%= if entry.is_dir?
|
||||||
link_to_remote h(entry.name),
|
link_to_remote h(entry.name),
|
||||||
{:url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
|
{:url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
|
||||||
:update => tr_id,
|
:update => { :success => tr_id },
|
||||||
:position => :after,
|
:position => :after,
|
||||||
:success => "scmEntryLoaded('#{tr_id}')",
|
:success => "scmEntryLoaded('#{tr_id}')",
|
||||||
:condition => "scmEntryClick('#{tr_id}')"
|
:condition => "scmEntryClick('#{tr_id}')"
|
||||||
|
|
|
@ -39,6 +39,6 @@ ContextMenu.prototype = {
|
||||||
this.selection = tr;
|
this.selection = tr;
|
||||||
var id = tr.id.substring(6, tr.id.length);
|
var id = tr.id.substring(6, tr.id.length);
|
||||||
/* TODO: do not hard code path */
|
/* TODO: do not hard code path */
|
||||||
new Ajax.Updater('context-menu', '../../issues/context_menu/' + id, {asynchronous:true, evalScripts:true, onComplete:function(request){Effect.Appear('context-menu', {duration: 0.20})}})
|
new Ajax.Updater({success:'context-menu'}, '../../issues/context_menu/' + id, {asynchronous:true, evalScripts:true, onComplete:function(request){Effect.Appear('context-menu', {duration: 0.20})}})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue