implement sharemetadata, fixes 165
This commit is contained in:
parent
8c5e39448b
commit
7a42473919
11 changed files with 162 additions and 43 deletions
|
|
@ -295,17 +295,24 @@ oml.ui.infoView = function(externalData, isMixed) {
|
|||
return $element;
|
||||
}
|
||||
|
||||
function renderShareButton() {
|
||||
function renderShareButton(data) {
|
||||
return Ox.Checkbox({
|
||||
style: 'squared',
|
||||
title: Ox._('Share Metadata'),
|
||||
value: false,
|
||||
value: data.sharemetadata,
|
||||
width: 128,
|
||||
})
|
||||
.css({marginTop: '8px'})
|
||||
.bindEvent({
|
||||
change: function(data) {
|
||||
// ...
|
||||
change: function(changeData) {
|
||||
oml.api.edit({
|
||||
id: data.id,
|
||||
sharemetadata: changeData.value
|
||||
}, function(result) {
|
||||
if (!changeData.value) {
|
||||
that.updateElement(result.data, [$icon, $info, $data]);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -764,7 +771,7 @@ oml.ui.infoView = function(externalData, isMixed) {
|
|||
});
|
||||
|
||||
if (data.mediastate == 'available') {
|
||||
renderShareButton().appendTo($data);
|
||||
renderShareButton(data).appendTo($data);
|
||||
}
|
||||
|
||||
$('<div>').css({height: '16px'}).appendTo($data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue