mirror of
https://github.com/jlengrand/twitterboard.git
synced 2026-03-10 08:51:22 +00:00
NExt steps: - List all currently tracked hashtags on main page - Add icon to remove those hashtags next to them.
35 lines
840 B
HTML
35 lines
840 B
HTML
{% extends "layout.html" %}
|
|
{% block restbody %}
|
|
<script type=text/javascript>
|
|
$(function() {
|
|
var submit_form = function(e) {
|
|
$.getJSON($SCRIPT_ROOT + '/_add_hashtag', {
|
|
new_hash: $('input[name="new_hash"]').val()
|
|
}, function(data) {
|
|
$('#hash').text(data.hash);
|
|
$('input[name=new_hash]').focus().select();
|
|
});
|
|
return false;
|
|
};
|
|
|
|
$('a#calculate').bind('click', submit_form);
|
|
|
|
$('input[type=text]').bind('keydown', function(e) {
|
|
if (e.keyCode == 13) {
|
|
submit_form(e);
|
|
}
|
|
});
|
|
|
|
$('input[name=new_hash]').focus();
|
|
});
|
|
</script>
|
|
<h1>Current Hashtags</h1>
|
|
{% include "trendy.html" %}
|
|
<h1>Add new Hashtag</h1>
|
|
<p>
|
|
<input type=text size=5 name='new_hash'>
|
|
<span id='hash'></span>
|
|
</br>
|
|
<a href=# id='calculate'>Add hashtag!</a>
|
|
</p>
|
|
{% endblock %} |