Commit 8e71240028334d537affd6a22696575e8ba56de3
- Diff rendering mode:
- inline
- side by side
swtr/static/css/swtmaker.css
(1 / 1)
  | |||
3 | 3 | } | |
4 | 4 | /* styles modifying annotorious editor default styles */ | |
5 | 5 | .annotorious-editor { | |
6 | min-width: 250px; | ||
6 | min-width: 270px; | ||
7 | 7 | } | |
8 | 8 | #header { | |
9 | 9 | z-index: 1; |
swtr/static/js/img_swtr.js
(6 / 8)
  | |||
184 | 184 | annotation.title = self.new_anno.title; | |
185 | 185 | } | |
186 | 186 | annotation.text = self.new_anno.text; | |
187 | console.log(self.new_anno, annotation); | ||
187 | //annotation.editable = false; | ||
188 | //console.log(self.new_anno, annotation); | ||
188 | 189 | }, | |
189 | 190 | // hide the original editor window, when user has completed selecting part | |
190 | 191 | // of the image to annotate.. | |
… | … | ||
195 | 195 | self.new_anno = {}; | |
196 | 196 | $('#tags-input').tags({ | |
197 | 197 | tagSize: 'md', | |
198 | promptText: 'Type word (and press enter)..', | ||
198 | promptText: 'Add tags: type a word (and press enter)', | ||
199 | 199 | caseInsensitive: true, | |
200 | 200 | suggestions: self.tags_suggestions | |
201 | 201 | }); | |
… | … | ||
224 | 224 | self.new_anno['tags'] = $(element).tags().getTags(); | |
225 | 225 | console.log(index, $('#tags-input').tags().getTags() ); | |
226 | 226 | } | |
227 | |||
228 | 227 | }); | |
229 | 228 | // show the editor field to input text | |
230 | 229 | /* var $anno_form = $('.annotorious-editor-text'); | |
… | … | ||
251 | 251 | caseInsensitive: true, | |
252 | 252 | suggestions: self.tags_suggestions | |
253 | 253 | }); | |
254 | |||
255 | |||
256 | 254 | /* $anno_form.val(''); | |
257 | 255 | $anno_form.attr('placeholder', 'Add ' + $selected.text()); | |
258 | 256 | console.log(self.new_anno);*/ | |
… | … | ||
264 | 264 | text += (annotation.comment) ? '<p>' + annotation.comment + '</p>' : ''; | |
265 | 265 | ||
266 | 266 | // link | |
267 | text += (annotation.link) ? '<a target="blank" href="' + | ||
267 | text += (annotation.link) ? '<p><a target="blank" href="' + | ||
268 | 268 | swtr.utils.linkify(annotation.link) + '">' + annotation.link + | |
269 | '</a>' : ''; | ||
269 | '</a></p>' : ''; | ||
270 | 270 | ||
271 | 271 | // tags | |
272 | text += (annotation.tags) ? '<p>' + annotation.tags + '</p>' : ''; | ||
272 | text += (annotation.tags) ? '<p>[' + annotation.tags + ']</p>' : ''; | ||
273 | 273 | ||
274 | 274 | // if older annotation i.e w/o comment,title etc fields | |
275 | 275 | // add text field as text |
swtr/templates/index.html
(8 / 9)
  | |||
262 | 262 | </select> | |
263 | 263 | </script--> | |
264 | 264 | <script type="text/template" id="customEdit-template"> | |
265 | <textarea id="title-input" class="annotorious-editor-text goog-textarea" placeholder="Add | ||
266 | Title" tabindex="1" rows="2" style="overflow-y: hidden; overflow-x: | ||
267 | auto; box-sizing: border-box; height: 23px; padding-bottom: | ||
268 | 4px;"></textarea> | ||
269 | <textarea id="link-input" class="annotorious-editor-text goog-textarea" placeholder="Add | ||
270 | Links" tabindex="1" rows="3" style="overflow-y: hidden; overflow-x: auto; | ||
265 | <textarea id="title-input" class="annotorious-editor-text goog-textarea" | ||
266 | placeholder="Add Title" tabindex="1" rows="2" | ||
267 | style="overflow-y: hidden; overflow-x: auto; box-sizing: border-box; height: 23px; | ||
268 | padding-bottom: 4px;"></textarea> | ||
269 | <textarea id="link-input" class="annotorious-editor-text goog-textarea" | ||
270 | placeholder="Add Links" tabindex="1" rows="3" style="overflow-y: hidden; overflow-x: auto; | ||
271 | 271 | box-sizing: border-box; height: 23px; padding-bottom: 4px;"></textarea> | |
272 | <div id="tags-input" class="annotorious-editor-text goog-textarea" | ||
272 | <div id="tags-input" class="annotorious-editor-text goog-textarea" | ||
273 | 273 | placeholder="" tabindex="1" rows="4" style="overflow-y: auto; overflow-x: | |
274 | hidden; | ||
275 | box-sizing: border-box; height: 23px; padding-bottom: 4px;"></textarea> | ||
274 | hidden; box-sizing: border-box; height: 23px; padding-bottom: 4px;"></div> | ||
276 | 275 | </script> | |
277 | 276 | <script type="text/template" id="popup-template"> | |
278 | 277 | <span class="annotorious-popup-text"> |