changeset 2710:f4ff3b5bfc42 beta

fixed selecting quick compare view for tags/bookmarks in pull-request form
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 11 Aug 2012 17:19:08 +0200
parents d2d35cf2b351
children 1de45f582f9d
files rhodecode/config/routing.py rhodecode/templates/pullrequests/pullrequest.html
diffstat 2 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/config/routing.py	Fri Aug 10 03:09:36 2012 +0200
+++ b/rhodecode/config/routing.py	Sat Aug 11 17:19:08 2012 +0200
@@ -435,8 +435,10 @@
                  '/{repo_name:.*?}/compare/{org_ref_type}@{org_ref}...{other_ref_type}@{other_ref}',
                  controller='compare', action='index',
                  conditions=dict(function=check_repo),
-                 requirements=dict(org_ref_type='(branch|book|tag|rev)',
-                                   other_ref_type='(branch|book|tag|rev)'))
+                 requirements=dict(
+                            org_ref_type='(branch|book|tag|rev|org_ref_type)',
+                            other_ref_type='(branch|book|tag|rev|other_ref_type)')
+                 )
 
     rmap.connect('pullrequest_home',
                  '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
--- a/rhodecode/templates/pullrequests/pullrequest.html	Fri Aug 10 03:09:36 2012 +0200
+++ b/rhodecode/templates/pullrequests/pullrequest.html	Sat Aug 11 17:19:08 2012 +0200
@@ -138,11 +138,11 @@
   var loadPreview = function(){
 	  YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none');
       var url = "${h.url('compare_url',
-          repo_name='org_repo',
-          org_ref_type='branch', org_ref='org_ref',
-          other_ref_type='branch', other_ref='other_ref',
-          repo='other_repo',
-          as_form=True)}";
+    	                 repo_name='org_repo',
+    	                 org_ref_type='org_ref_type', org_ref='org_ref',
+                         other_ref_type='other_ref_type', other_ref='other_ref',
+                         repo='other_repo',
+                         as_form=True)}";
 
       var select_refs = YUQ('#pull_request_form select.refs')