Changeset - cc5300a1f2ac
[Not reviewed]
default
0 2 0
Mads Kiilerich - 11 years ago 2014-07-04 14:12:06
madski@unity3d.com
pull requests: use select2 for branch and revision selection
2 files changed with 26 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -4795,24 +4795,32 @@ span.pr-closed-tag {
 
    color: #577632;
 
    white-space: nowrap;
 
    -webkit-border-radius: 4px;
 
    border-radius: 4px;
 
    border: 1px solid #d9e8f8;
 
    line-height: 1.5em;
 
}
 

	
 
.pr-box {
 
    max-width: 978px;
 
}
 

	
 
#s2id_org_ref,
 
#s2id_other_ref,
 
#s2id_org_repo,
 
#s2id_other_repo {
 
    min-width: 150px;
 
    margin: 5px;
 
}
 

	
 
/****
 
  PERMS
 
*****/
 
#perms .perms_section_head {
 
    padding: 10px 10px 10px 0px;
 
    font-size: 16px;
 
    font-weight: bold;
 
}
 

	
 
#perms .perm_tag {
 
    padding: 1px 3px 1px 3px;
 
    font-size: 10px;
kallithea/templates/pullrequests/pullrequest.html
Show inline comments
 
@@ -201,34 +201,48 @@ ${self.repo_context_bar('showpullrequest
 
      for (k in rev_data){
 
          url = url.replace(k,rev_data[k]);
 
      }
 

	
 
      YUD.get('pull_request_overview').innerHTML = "${_('Loading ...')}";
 
      ypjax(url,'pull_request_overview', function(o){
 
          var jsdata = eval('('+YUD.get('jsdata').innerHTML+')');
 
          var r = new BranchRenderer('graph_canvas', 'graph_content_pr');
 
          r.render(jsdata,100);
 
      });
 
  }
 

	
 
  ## refresh automatically when something changes (org_repo can't change)
 
  YAHOO.util.Event.onDOMReady(function(){
 
      $("#org_repo").select2({
 
          dropdownAutoWidth: true,
 
      });
 
      ## (org_repo can't change)
 

	
 
  YUE.on('org_ref', 'change', function(e){
 
      $("#org_ref").select2({
 
          dropdownAutoWidth: true,
 
      });
 
      $("#org_ref").on("change", function(e){
 
     loadPreview();
 
  });
 

	
 
  YUE.on('other_repo', 'change', function(e){
 
      $("#other_repo").select2({
 
          dropdownAutoWidth: true,
 
      });
 
      $("#other_repo").on("change", function(e){
 
      otherrepoChanged();
 
      loadPreview();
 
  });
 

	
 
  YUE.on('other_ref', 'change', function(e){
 
      $("#other_ref").select2({
 
          dropdownAutoWidth: true,
 
      });
 
      $("#other_ref").on("change", function(e){
 
     loadPreview();
 
  });
 

	
 
  otherrepoChanged();
 
  //lazy load overview after 0.5s
 
  setTimeout(loadPreview, 500);
 
  });
 

	
 
</script>
 

	
 
</%def>
0 comments (0 inline, 0 general)