allow for editing cover url
This commit is contained in:
parent
280cb56b38
commit
d0e2fe0340
3 changed files with 45 additions and 26 deletions
|
|
@ -122,14 +122,6 @@ oml.ui.infoView = function(externalData, isMixed) {
|
|||
};
|
||||
}
|
||||
|
||||
function getIconTooltip() {
|
||||
return !externalData
|
||||
? 'Click to see ' + (ui.iconSize == 256 ? 'large' : 'small')
|
||||
+ ' ' + ui.icons + ', doubleclick to see '
|
||||
+ (ui.icons == 'cover' ? 'preview' : 'cover')
|
||||
: '';
|
||||
}
|
||||
|
||||
function renderIdentifyButton(data) {
|
||||
return Ox.Button({
|
||||
disabled: data.mediastate != 'available',
|
||||
|
|
@ -314,6 +306,11 @@ oml.ui.infoView = function(externalData, isMixed) {
|
|||
$reflection.css(css.reflection).show();
|
||||
}
|
||||
|
||||
that.updateCover = function(url) {
|
||||
Ox.Request.clearCache('get');
|
||||
that.updateElement(ui.item, $icon);
|
||||
};
|
||||
|
||||
that.updateElement = function(idOrData, $elements) {
|
||||
|
||||
var data = Ox.isObject(idOrData) ? idOrData : null,
|
||||
|
|
@ -352,6 +349,8 @@ oml.ui.infoView = function(externalData, isMixed) {
|
|||
size = iconSize,
|
||||
reflectionSize = Math.round(size / 2);
|
||||
|
||||
Ox.print('SRC', src);
|
||||
|
||||
$elements.forEach(function($element) {
|
||||
|
||||
$element.empty();
|
||||
|
|
@ -360,7 +359,9 @@ oml.ui.infoView = function(externalData, isMixed) {
|
|||
|
||||
$image = Ox.Element({
|
||||
element: '<img>',
|
||||
tooltip: getIconTooltip()
|
||||
tooltip: !externalData
|
||||
? Ox._('Doubleclick to edit')
|
||||
: ''
|
||||
})
|
||||
.on({
|
||||
error: function() {
|
||||
|
|
@ -386,10 +387,9 @@ oml.ui.infoView = function(externalData, isMixed) {
|
|||
.bindEvent({
|
||||
doubleclick: function() {
|
||||
if (!externalData) {
|
||||
oml.UI.set({
|
||||
icons: ui.icons == 'cover'
|
||||
? 'preview' : 'cover'
|
||||
});
|
||||
oml.$ui.coverDialog = oml.ui.coverDialog(
|
||||
id, data.cover
|
||||
).open();
|
||||
}
|
||||
},
|
||||
singleclick: function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue