-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic ui #133
base: luwak-server
Are you sure you want to change the base?
Basic ui #133
Conversation
Unfortunately, seems we have to put the Profile in the project root: http://stackoverflow.com/a/15187532
console.log(data); | ||
if(data.matches.length > 0) { | ||
// display results | ||
$('#results').append(getGood(data.matches[0])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The match url sends an array as a result, while data.matches[0] processes only the first item . May I suggest adapting the getGood function so that it handles an array (see my next comment), then calling it with the whole matches
array as a parameter?
$('#results').append(getGood(data.matches));
'<img src="ui/img/found.png">' + | ||
'</div>' + | ||
'<div class="list-right">' + | ||
'<h3> Hurrah - we have found a match and its id is ' + item[0] + '</h3>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Herebelow my proposition for parsing the result array. In order to insert a <li>
list tag within the existing <li>
, I added an <ul>
element.
'<h3>Hurrah - here comes the match list!<ul>'
// Parses result array in a list
for(var i in item) {
output += '<li>id: ' + item[i] + '</li>';
}
output += '</ul></h3>';
Not necessarily desirable to merge, but I'm opening this PR just so you have it around!