mirror of
https://github.com/jlengrand/twitterboard.git
synced 2026-03-10 08:51:22 +00:00
Adds real hashtags instead of dummy numbers
This commit is contained in:
@@ -51,7 +51,7 @@ def trendy():
|
||||
session.close()
|
||||
engine.dispose()
|
||||
|
||||
trendy = [[1, 2], [3, 4], [5, 6]]
|
||||
#trendy = [[1, 2], [3, 4], [5, 6]]
|
||||
#trendy = 'plop'
|
||||
return jsonify(trendy=trendy)
|
||||
|
||||
|
||||
@@ -3,20 +3,18 @@
|
||||
$.ajax({
|
||||
url : $SCRIPT_ROOT + '/trendy',
|
||||
success: function(data) {
|
||||
console.log(data.trendy);
|
||||
var res = "<table>";
|
||||
var link = "<a href=\"/remove_hashtag/\">Remove</a>";
|
||||
var link_1 = "<a href=\"/remove_hashtag/";
|
||||
var link_2 = "\">Remove</a>";
|
||||
for (i=0;i<data.trendy[0].length;i++){
|
||||
for (i=0;i<data.trendy.length;i++){
|
||||
res = res + "<tr>";
|
||||
res = res + "<td>" + data.trendy[i][0] + "</td>";
|
||||
res = res + "<td>" + link + "</td>";
|
||||
res = res + "<td>" + link_1 + data.trendy[i][0] + link_2 + "</td>";
|
||||
res = res + "</tr>";
|
||||
}
|
||||
}
|
||||
res = res + "</table>";
|
||||
|
||||
console.log(res);
|
||||
$('#trendy').html(res);
|
||||
},
|
||||
complete: function() {
|
||||
|
||||
Reference in New Issue
Block a user