From 98fb41b44241913a58e823475096e324e533e63a Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Sat, 1 Nov 2014 22:05:21 -0400 Subject: [PATCH] Bring over the repo results formatter --- docs/examples.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/examples.html b/docs/examples.html index aaad5d93..692d7144 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -464,7 +464,22 @@ $.fn.select2.amd.require(["select2/core", "select2/utils"], function (Select2, U cache: true }, templateResult: function (repo) { - return repo.full_name; + var markup = '
' + + '
' + + '
' + + '
' + + '
' + repo.full_name + '
' + + '
' + repo.forks_count + '
' + + '
' + repo.stargazers_count + '
' + + '
'; + + if (repo.description) { + markup += '
' + repo.description + '
'; + } + + markup += '
'; + + return markup; }, templateSelection: function (repo) { return repo.full_name;