changeset 1651:96ae22a4e963 beta

Display error on ypjax fail
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 03 Nov 2011 02:52:38 +0200
parents e0383813f3e2
children 8384eaabeb19
files rhodecode/public/js/rhodecode.js rhodecode/templates/repo_switcher_list.html
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/public/js/rhodecode.js	Thu Nov 03 02:15:25 2011 +0200
+++ b/rhodecode/public/js/rhodecode.js	Thu Nov 03 02:52:38 2011 +0200
@@ -172,7 +172,10 @@
 	YUC.asyncRequest(method,url,{
 		success:s_wrapper,
 		failure:function(o){
-			console.log(o)
+			console.log(o);
+			YUD.get(container).innerHTML='ERROR';
+			YUD.setStyle(container,'opacity','1.0');
+			YUD.setStyle(container,'color','red');
 		}
 	},args);
 	
--- a/rhodecode/templates/repo_switcher_list.html	Thu Nov 03 02:15:25 2011 +0200
+++ b/rhodecode/templates/repo_switcher_list.html	Thu Nov 03 02:52:38 2011 +0200
@@ -11,12 +11,12 @@
      
       %if repo['dbrepo']['private']:
          <li>
-             <img src="${h.url("/images/icons/lock.png")}" alt="${_('Private repository')}" class="repo_switcher_type"/>
+             <img src="${h.url('/images/icons/lock.png')}" alt="${_('Private repository')}" class="repo_switcher_type"/>
              ${h.link_to(repo['name'],h.url('summary_home',repo_name=repo['name']),class_="repo_name %s" % repo['dbrepo']['repo_type'])}
           </li>
       %else:
          <li>
-             <img src="${h.url("/images/icons/lock_open.png")}" alt="${_('Public repository')}" class="repo_switcher_type" />
+             <img src="${h.url('/images/icons/lock_open.png')}" alt="${_('Public repository')}" class="repo_switcher_type" />
              ${h.link_to(repo['name'],h.url('summary_home',repo_name=repo['name']),class_="repo_name %s" % repo['dbrepo']['repo_type'])}
          </li>
       %endif