Compare commits
2 commits
c05d10b6f1
...
ef16e873a0
Author | SHA1 | Date | |
---|---|---|---|
ef16e873a0 | |||
675eca88e7 |
1 changed files with 8 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
oml.ui.annotation = function(annotation, $iframe) {
|
||||
var $quotetext = Ox.Element()
|
||||
var $quoteText = Ox.Element()
|
||||
.addClass('OxSelectable OMLQuote')
|
||||
.html(Ox.encodeHTMLEntities(annotation.text).replace(/\n/g, '<br/>'))
|
||||
.on({
|
||||
|
@ -11,18 +11,19 @@ oml.ui.annotation = function(annotation, $iframe) {
|
|||
id: annotation.id
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
var $quoteBackground = Ox.Element().addClass('OMLQuoteBackground');
|
||||
var $quote = Ox.Element()
|
||||
.addClass('OMLQuoteBox')
|
||||
.append(
|
||||
Ox.Element().addClass('OMLQuoteBackground')
|
||||
$quoteBackground
|
||||
).append(
|
||||
$quotetext
|
||||
)
|
||||
$quoteText
|
||||
);
|
||||
var notes = annotation.notes.length ? annotation.notes.map(function(note) {
|
||||
note.editable = !note.user
|
||||
return note
|
||||
}) : []
|
||||
}) : [];
|
||||
var $notes = Ox.ArrayEditable({
|
||||
editing: true,
|
||||
items: notes,
|
||||
|
@ -96,6 +97,7 @@ oml.ui.annotation = function(annotation, $iframe) {
|
|||
selected && selected.classList.remove('selected')
|
||||
that.addClass('selected')
|
||||
that.gainFocus()
|
||||
that[0].scrollIntoViewIfNeeded()
|
||||
}
|
||||
return that;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue