Move getMore js call in content.html, just needed there

This commit is contained in:
Yohan Boniface 2013-07-02 20:00:45 +02:00
parent 7292fc00e6
commit 6dc79db9a3
2 changed files with 15 additions and 15 deletions

View file

@ -55,21 +55,6 @@
placeholder: "Type editors nick to add..."
}).multiselect();
});
var getMore = function (e) {
D.Event.stop(e);
D.Xhr.get(this.href, {
callback: function (data) {
var container = this.parentNode;
container.innerHTML = data;
D.DOM.forEach(D.DOM.get('script', container), function (item) {
eval(item.firstChild.textContent);
});
D.Event.on('.more_button', 'click', getMore);
},
thisobj: this
});
}
D.Event.on('.more_button', 'click', getMore);
</script>
{% endblock %}
{% block footer %}

View file

@ -59,5 +59,20 @@
listen_form: {id: "map_edit"}
});
});
var getMore = function (e) {
D.Event.stop(e);
D.Xhr.get(this.href, {
callback: function (data) {
var container = this.parentNode;
container.innerHTML = data;
D.DOM.forEach(D.DOM.get('script', container), function (item) {
eval(item.firstChild.textContent);
});
D.Event.on('.more_button', 'click', getMore);
},
thisobj: this
});
}
D.Event.on('.more_button', 'click', getMore);
</script>
{% endblock bottom_js %}