forked from 0x2620/pandora
entities are not links
This commit is contained in:
parent
c59fb1596f
commit
e851dcabfb
3 changed files with 7 additions and 3 deletions
|
@ -244,7 +244,7 @@ class Annotation(models.Model):
|
|||
try:
|
||||
entity = self.get_entity()
|
||||
j['entity'] = entity.json(user=user)
|
||||
j['value'] = entity.html_link()
|
||||
j['value'] = entity.annotation_value()
|
||||
except:
|
||||
j['entity'] = {}
|
||||
elif l['type'] == 'event':
|
||||
|
|
|
@ -159,8 +159,9 @@ class Entity(models.Model):
|
|||
response[key] = self.data[key]
|
||||
return response
|
||||
|
||||
def html_link(self):
|
||||
return '<a href="/entities/%s">%s</a>' % (self.get_id(), ox.escape_html(self.name))
|
||||
def annotation_value(self):
|
||||
#return u'<a href="/entities/%s">%s</a>' % (self.get_id(), ox.escape_html(self.name))
|
||||
return ox.escape_html(self.name)
|
||||
|
||||
def update_matches(self):
|
||||
import annotation.models
|
||||
|
|
|
@ -306,6 +306,9 @@ pandora.ui.editor = function(data) {
|
|||
select: function(data) {
|
||||
pandora.UI.set('videoPoints.' + ui.item + '.annotation', data.id.split('/')[1] || '');
|
||||
},
|
||||
showentityinfo: function(data) {
|
||||
pandora.URL.push('/entities/' + data.id)
|
||||
},
|
||||
subtitles: function(data) {
|
||||
pandora.UI.set({videoSubtitles: data.subtitles});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue