Skip to content

Commit

Permalink
754914 - When selecting a repository in package filters the name of the
Browse files Browse the repository at this point in the history
repository will properly show up beside the Remove link.
  • Loading branch information
ehelms committed Feb 13, 2012
1 parent c7be00c commit d4483ec
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/public/javascripts/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,19 +316,20 @@ KT.filter_renderer = (function(){
return message;
},
repo_template = function(prod_id, repo_id, editable) {
var name;
var html = '';
$.each(KT.products[prod_id].repos, function(index, repo){
if(repo.id === repo_id){
name = repo.name;
return false;
}
var name, repo,
html = '';

repo = KT.utils.find(KT.products[prod_id].repos, function(repo){
return repo.id.toString() === repo_id;
});

html += '<div class="repo" data-id="' + repo_id + '">';
html += name;
html += repo.name;

if (editable){
html += '<a class="remove_repo"> &nbsp;' + i18n.remove + '</a>';
}

html += '</div>';
return html;
},
Expand Down

0 comments on commit d4483ec

Please sign in to comment.