1
0
mirror of synced 2024-11-23 05:26:10 +03:00

Change "Loading remote data" formatRepo() markup.

Now fits the styles in docs/_sass/_s2-result-repository.
This commit is contained in:
Florian Kissling 2015-04-28 02:41:52 +02:00
parent 4ab6567f1d
commit c57a6fea90

View File

@ -1042,22 +1042,21 @@ $.fn.select2.amd.require(
function formatRepo (repo) { function formatRepo (repo) {
if (repo.loading) return repo.text; if (repo.loading) return repo.text;
var markup = '<div class="clearfix">' + var markup = "<div class='select2-result-repository clearfix'>" +
'<div class="col-sm-1">' + "<div class='select2-result-repository__avatar'><img src='" + repo.owner.avatar_url + "' /></div>" +
'<img src="' + repo.owner.avatar_url + '" style="max-width: 100%" />' + "<div class='select2-result-repository__meta'>" +
'</div>' + "<div class='select2-result-repository__title'>" + repo.full_name + "</div>";
'<div clas="col-sm-10">' +
'<div class="clearfix">' +
'<div class="col-sm-6">' + repo.full_name + '</div>' +
'<div class="col-sm-3"><i class="fa fa-code-fork"></i> ' + repo.forks_count + '</div>' +
'<div class="col-sm-2"><i class="fa fa-star"></i> ' + repo.stargazers_count + '</div>' +
'</div>';
if (repo.description) { if (repo.description) {
markup += '<div>' + repo.description + '</div>'; markup += "<div class='select2-result-repository__description'>" + repo.description + "</div>";
} }
markup += '</div></div>'; markup += "<div class='select2-result-repository__statistics'>" +
"<div class='select2-result-repository__forks'><i class='fa fa-flash'></i> " + repo.forks_count + " Forks</div>" +
"<div class='select2-result-repository__stargazers'><i class='fa fa-star'></i> " + repo.stargazers_count + " Stars</div>" +
"<div class='select2-result-repository__watchers'><i class='fa fa-eye'></i> " + repo.watchers_count + " Watchers</div>" +
"</div>" +
"</div></div>";
return markup; return markup;
} }