Compare commits
No commits in common. "bb18c9155b8a488fd6f127a82bb6df83cfe8d833" and "de67f202a8c29bf626248d314e09cf42c4e0324a" have entirely different histories.
bb18c9155b
...
de67f202a8
4 changed files with 19 additions and 50 deletions
|
@ -6,28 +6,19 @@ oml.ui.annotation = function(data, $iframe) {
|
|||
}).addClass(
|
||||
'OxSelectable'
|
||||
).css({
|
||||
backgroundColor: 'white',
|
||||
borderBottom: '1px solid rgb(208, 208, 208)',
|
||||
}).append(
|
||||
Ox.Element().addClass('OxSelectable').css({
|
||||
backgroundColor: 'white',
|
||||
color: 'black',
|
||||
fontFamily: 'Georgia, Palatino, DejaVu Serif, Book Antiqua, Palatino Linotype, Times New Roman, serif',
|
||||
fontSize: '14px',
|
||||
lineHeight: '21px',
|
||||
padding: '8px'
|
||||
}).html(data.text).on({
|
||||
click: function(event) {
|
||||
$iframe.postMessage('selectAnnotation', {
|
||||
id: data.id
|
||||
})
|
||||
}
|
||||
})
|
||||
).append(
|
||||
Ox.ArrayEditable({
|
||||
type: 'textarea'
|
||||
}).css({
|
||||
height: 0
|
||||
})
|
||||
);
|
||||
color: 'black',
|
||||
fontFamily: 'Georgia, Palatino, DejaVu Serif, Book Antiqua, Palatino Linotype, Times New Roman, serif',
|
||||
fontSize: '14px',
|
||||
lineHeight: '21px',
|
||||
padding: '8px'
|
||||
}).html(data.text).on({
|
||||
click: function(event) {
|
||||
$iframe.postMessage('selectAnnotation', {
|
||||
id: data.id
|
||||
})
|
||||
}
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
oml.ui.annotationFolder = function() {
|
||||
|
||||
var ui = oml.user.ui,
|
||||
that = Ox.Element().css({
|
||||
overflowY: 'auto',
|
||||
});
|
||||
|
||||
return that;
|
||||
|
||||
};
|
|
@ -3,19 +3,9 @@
|
|||
oml.ui.annotationPanel = function() {
|
||||
|
||||
var ui = oml.user.ui,
|
||||
that = Ox.SplitPanel({
|
||||
elements: [
|
||||
{
|
||||
element: Ox.Bar({size: 16}),
|
||||
size: 16
|
||||
},
|
||||
{
|
||||
element: oml.$ui.annotationFolder = oml.ui.annotationFolder()
|
||||
}
|
||||
],
|
||||
orientation: 'vertical'
|
||||
})
|
||||
that = Ox.Element().css({
|
||||
overflowY: 'auto',
|
||||
});
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
|
|
|
@ -25,8 +25,6 @@ oml.ui.viewer = function() {
|
|||
collapsed: !ui.showAnnotations,
|
||||
collapsible: true,
|
||||
element: oml.$ui.annotationPanel = oml.ui.annotationPanel(),
|
||||
resizable: true,
|
||||
resize: [128, 384],
|
||||
size: 256,
|
||||
tooltip: Ox._('Annotations')
|
||||
+ ' <span class="OxBright">'
|
||||
|
@ -43,7 +41,7 @@ oml.ui.viewer = function() {
|
|||
if (item && item.length) {
|
||||
oml.api.get({id: item, keys: ['mediastate']}, function(result) {
|
||||
if (result.data.mediastate == 'available') {
|
||||
oml.$ui.annotationFolder.empty()
|
||||
oml.$ui.annotationPanel.empty()
|
||||
if ($iframe) {
|
||||
$iframe.remove()
|
||||
}
|
||||
|
@ -55,10 +53,10 @@ oml.ui.viewer = function() {
|
|||
console.log('got', event, data)
|
||||
if (event == 'addAnnotation') {
|
||||
console.log('adding', data.id)
|
||||
oml.$ui.annotationFolder.append(oml.ui.annotation(data, $iframe));
|
||||
oml.$ui.annotationPanel.append(oml.ui.annotation(data, $iframe));
|
||||
} else if (event == 'removeAnnotation') {
|
||||
console.log('do it ...', data)
|
||||
oml.$ui.annotationFolder.find('#a-' + data.id).remove()
|
||||
oml.$ui.annotationPanel.find('#a-' + data.id).remove()
|
||||
} else if (event == 'selectAnnotation') {
|
||||
console.log('select', data)
|
||||
} else if (event == 'deselectAnnotation') {
|
||||
|
|
Loading…
Reference in a new issue