openmedialibrary/static/js/annotation.js

25 lines
589 B
JavaScript

'use strict';
oml.ui.annotation = function(data, $iframe) {
var that = Ox.Element().attr({
id: 'a-' + data.id
}).addClass(
'OxSelectable'
).css({
backgroundColor: 'white',
borderBottom: '1px solid rgb(208, 208, 208)',
color: 'black',
fontFamily: 'serif',
fontSize: '15px',
lineHeight: '20px',
padding: '8px'
}).html(data.text).on({
click: function(event) {
$iframe.postMessage('selectAnnotation', {
id: data.id
})
}
});
return that;
};