Changeset - cb360bf40863
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2014-10-03 00:20:36
madski@unity3d.com
pull requests: when creating, disable other_ref on other_repo change until new data has been loaded
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/pullrequests/pullrequest.html
Show inline comments
 
@@ -148,6 +148,8 @@ ${self.repo_context_bar('showpullrequest
 

	
 
  var pendingajax = undefined;
 
  var otherrepoChanged = function(){
 
      var $other_ref = $('#other_ref');
 
      $other_ref.prop('disabled', true);
 
      var repo_name = $('#other_repo').val();
 
      if (pendingajax) {
 
          pendingajax.abort();
 
@@ -160,7 +162,6 @@ ${self.repo_context_bar('showpullrequest
 
              $('#other_repo_desc').html(data.description);
 

	
 
              // replace options of other_ref with the ones for the current other_repo
 
              var $other_ref = $('#other_ref');
 
              $other_ref.empty();
 
              for(var i = 0; i < data.refs.length; i++)
 
              {
 
@@ -186,6 +187,7 @@ ${self.repo_context_bar('showpullrequest
 
                  dropdownAutoWidth: true
 
              });
 

	
 
              $other_ref.prop('disabled', false);
 
              loadPreview();
 
          });
 
  };
0 comments (0 inline, 0 general)