wrap quote in one more div

This commit is contained in:
j 2019-02-01 13:19:11 +05:30
parent 031db4c888
commit b467b93fb6
2 changed files with 12 additions and 9 deletions

View File

@ -1,4 +1,5 @@
.OMLQuote { .OMLQuote {
padding: 8px;
color: rgb(0, 0, 0); color: rgb(0, 0, 0);
background-color: rgb(255, 255, 255); background-color: rgb(255, 255, 255);
font-family: Georgia, Palatino, DejaVu Serif, Book Antiqua, Palatino Linotype, Times New Roman, serif; font-family: Georgia, Palatino, DejaVu Serif, Book Antiqua, Palatino Linotype, Times New Roman, serif;

View File

@ -1,16 +1,18 @@
'use strict'; 'use strict';
oml.ui.annotation = function(annotation, $iframe) { oml.ui.annotation = function(annotation, $iframe) {
var $quote = Ox.Element().addClass('OxSelectable OMLQuote').css({ var $quote = Ox.Element()
padding: '8px' .addClass('OxSelectable OMLQuote')
}).html(Ox.encodeHTMLEntities(annotation.text).replace(/\n/g, '<br/>')).on({ .append(
click: function(event) { Ox.Element().html(Ox.encodeHTMLEntities(annotation.text).replace(/\n/g, '<br/>'))
that.select() ).on({
$iframe.postMessage('selectAnnotation', { click: function(event) {
id: annotation.id that.select()
$iframe.postMessage('selectAnnotation', {
id: annotation.id
})
}
}) })
}
})
var notes = annotation.notes.length ? annotation.notes.map(function(note) { var notes = annotation.notes.length ? annotation.notes.map(function(note) {
note.editable = !note.user note.editable = !note.user
return note return note