Commit 8e576dbec8a0fb151f12898d1665cc3a886c0eba
- Diff rendering mode:
- inline
- side by side
static/text-annotation.js
(5 / 2)
  | |||
57 | 57 | var onHover = function(event) { | |
58 | 58 | var elem = event.currentTarget; | |
59 | 59 | //console.log(elem.style); | |
60 | elem.addEventListener('click', onClick); | ||
60 | elem.addEventListener('click', onClick, false); | ||
61 | 61 | elem.style.border = '1px solid black'; | |
62 | 62 | elem.style.boxShadow = '1px 5px 5px #ccc'; | |
63 | 63 | //elem.style.background = 'red'; | |
… | … | ||
73 | 73 | elem.removeEventListener('click', onClick); | |
74 | 74 | }; | |
75 | 75 | var onClick = function(event) { | |
76 | event.stopPropagation(); | ||
76 | console.log(event); | ||
77 | $(event).preventDefault(); | ||
78 | $(event).stopPropagation(); | ||
77 | 79 | var elem = event.currentTarget; | |
78 | 80 | elem.style.border = 'none'; | |
79 | 81 | elem.style.boxShadow = ''; | |
… | … | ||
85 | 85 | user = prompt('Enter your name: '); | |
86 | 86 | label = prompt('Enter a label for annotation: '); | |
87 | 87 | initAnnotationTree(); | |
88 | return false; | ||
88 | 89 | }; | |
89 | 90 | ||
90 | 91 |
static/tree.js
(2 / 2)
  | |||
192 | 192 | url: config.indexer + '/submit', | |
193 | 193 | data: {'data': JSON.stringify(this.swts)}, | |
194 | 194 | success: function() { | |
195 | $.ajax({ | ||
195 | /*$.ajax({ | ||
196 | 196 | type: 'POST', | |
197 | 197 | url: config.postTweetUrl, | |
198 | 198 | data: {'data': JSON.stringify(this.swts)}, | |
… | … | ||
203 | 203 | error: function() { | |
204 | 204 | $('#fail-posting').show(); | |
205 | 205 | } | |
206 | }); | ||
206 | });*/ | ||
207 | 207 | $('#posted').show(); | |
208 | 208 | var swts = ''; | |
209 | 209 | for(var i in sweet.swts) { |