|
|
@ -362,6 +362,9 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Messages.pad_mediatagShare = "Share file"; // XXX
|
|
|
|
|
|
|
|
Messages.pad_mediatagOpen = "Open file"; // XXX
|
|
|
|
|
|
|
|
|
|
|
|
var mediatagContextMenu;
|
|
|
|
var mediatagContextMenu;
|
|
|
|
MT.importMediaTagMenu = function (common) {
|
|
|
|
MT.importMediaTagMenu = function (common) {
|
|
|
|
if (mediatagContextMenu) { return mediatagContextMenu; }
|
|
|
|
if (mediatagContextMenu) { return mediatagContextMenu; }
|
|
|
@ -377,6 +380,14 @@ define([
|
|
|
|
'tabindex': '-1',
|
|
|
|
'tabindex': '-1',
|
|
|
|
'data-icon': "fa-eye",
|
|
|
|
'data-icon': "fa-eye",
|
|
|
|
}, Messages.pad_mediatagPreview)),
|
|
|
|
}, Messages.pad_mediatagPreview)),
|
|
|
|
|
|
|
|
h('li.cp-svg', h('a.cp-app-code-context-openin.dropdown-item', {
|
|
|
|
|
|
|
|
'tabindex': '-1',
|
|
|
|
|
|
|
|
'data-icon': "fa-external-link",
|
|
|
|
|
|
|
|
}, Messages.pad_mediatagOpen)),
|
|
|
|
|
|
|
|
h('li.cp-svg', h('a.cp-app-code-context-share.dropdown-item', {
|
|
|
|
|
|
|
|
'tabindex': '-1',
|
|
|
|
|
|
|
|
'data-icon': "fa-shhare-alt",
|
|
|
|
|
|
|
|
}, Messages.pad_mediatagShare)),
|
|
|
|
h('li', h('a.cp-app-code-context-saveindrive.dropdown-item', {
|
|
|
|
h('li', h('a.cp-app-code-context-saveindrive.dropdown-item', {
|
|
|
|
'tabindex': '-1',
|
|
|
|
'tabindex': '-1',
|
|
|
|
'data-icon': "fa-cloud-upload",
|
|
|
|
'data-icon': "fa-cloud-upload",
|
|
|
@ -419,6 +430,21 @@ define([
|
|
|
|
else if ($this.hasClass("cp-app-code-context-open")) {
|
|
|
|
else if ($this.hasClass("cp-app-code-context-open")) {
|
|
|
|
$mt.trigger('preview');
|
|
|
|
$mt.trigger('preview');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if ($this.hasClass("cp-app-code-context-openin")) {
|
|
|
|
|
|
|
|
var hash = common.getHashFromMediaTag($mt);
|
|
|
|
|
|
|
|
common.openURL(Hash.hashToHref(hash, 'file'));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if ($this.hasClass("cp-app-code-context-share")) {
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
|
|
|
|
file: true,
|
|
|
|
|
|
|
|
pathname: '/file/',
|
|
|
|
|
|
|
|
hashes: {
|
|
|
|
|
|
|
|
fileHash: common.getHashFromMediaTag($mt)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
title: Util.find($mt[0], ['_mediaObject', 'name']) || ''
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
common.getSframeChannel().event('EV_SHARE_OPEN', data);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return m;
|
|
|
|
return m;
|
|
|
|