Changeset - 5ef64956c385
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-02-04 15:59:01
madski@unity3d.com
pull request: update changeset list automatically - remove refresh icon

With most of the UI giving immediate response it was confusing that we had to
press 'refresh' manually'. The icon could also be misunderstood as a 'swap'
symbol or as reload/reset.
1 file changed with 11 insertions and 9 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/pullrequests/pullrequest.html
Show inline comments
 
@@ -48,13 +48,8 @@
 
                    <img id="other_repo_gravatar" alt="gravatar" src=""/>
 
                </div>
 
                <span style="font-size: 20px">
 
                ${h.select('other_repo',c.default_pull_request ,c.other_repos,class_='refs')}:${h.select('other_ref',c.default_pull_request_rev,c.default_revs,class_='refs')}
 
                ${h.select('other_repo',c.default_pull_request,c.other_repos,class_='refs')}:${h.select('other_ref',c.default_pull_request_rev,c.default_revs,class_='refs')}
 
                </span>
 
         <span style="padding:3px">
 
           <a id="refresh" href="#" class="tooltip" title="${h.tooltip(_('refresh overview'))}">
 
             <img style="margin:3px" class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/>
 
           </a>
 
         </span>
 
                 <div id="other_repo_desc" style="padding:5px 3px 3px 42px;"></div>
 
            </div>
 
            <div style="clear:both;padding-top: 10px"></div>
 
@@ -182,15 +177,22 @@
 
      })
 
  }
 

	
 
  ## refresh automatically when something changes (org_repo can't change)
 

	
 
  YUE.on('org_ref', 'change', function(e){
 
     loadPreview();
 
  });
 

	
 
  YUE.on('other_repo', 'change', function(e){
 
      var repo_name = e.currentTarget.value;
 
      // replace the <select> of changed repo
 
      YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs'];
 
      loadPreview();
 
  });
 

	
 
  YUE.on('refresh','click',function(e){
 
     loadPreview()
 
  })
 
  YUE.on('other_ref', 'change', function(e){
 
     loadPreview();
 
  });
 

	
 
  //lazy load overview after 0.5s
 
  setTimeout(loadPreview, 500)
0 comments (0 inline, 0 general)