mirror of
https://github.com/neocities/neocities.git
synced 2025-07-22 02:26:07 +02:00
more work on comments for events
This commit is contained in:
parent
eba4a6e3f5
commit
b96730b83f
17 changed files with 2298 additions and 43 deletions
13
public/assets/scripts/news/template.js
Normal file
13
public/assets/scripts/news/template.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
var Template = {
|
||||
template: function(templateString, data) {
|
||||
var data = data || {}
|
||||
return _.template(templateString, data, {interpolate: /\{\{(.+?)\}\}/g})
|
||||
},
|
||||
|
||||
renderComment: function(event_id) {
|
||||
var event = $('#event_'+event_id+'_actions')
|
||||
var rendered = this.template($('#comment-template').html(), {event_id: event_id})
|
||||
event.find('a#reply').css('display', 'none')
|
||||
event.append(rendered)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue