add share link at /m/, add share dialog in view menu, fix preview for documents
This commit is contained in:
parent
17801df8de
commit
bea0d301a4
30 changed files with 2704 additions and 4 deletions
|
|
@ -609,6 +609,8 @@ pandora.ui.mainMenu = function() {
|
|||
pandora.$ui.player.options({fullscreen: true});
|
||||
} else if (data.id == 'embed') {
|
||||
pandora.$ui.embedDialog = pandora.ui.embedDialog().open();
|
||||
} else if (data.id == 'share') {
|
||||
pandora.$ui.shareDialog = pandora.ui.shareDialog().open();
|
||||
} else if (data.id == 'advancedfind') {
|
||||
pandora.$ui.filterDialog = pandora.ui.filterDialog().open();
|
||||
} else if (data.id == 'clearquery') {
|
||||
|
|
@ -1909,7 +1911,8 @@ pandora.ui.mainMenu = function() {
|
|||
}) }
|
||||
] },
|
||||
{},
|
||||
{ id: 'embed', title: Ox._('Embed...') }
|
||||
{ id: 'embed', title: Ox._('Embed...') },
|
||||
{ id: 'share', title: Ox._('Share...') }
|
||||
]}
|
||||
}
|
||||
|
||||
|
|
|
|||
37
static/js/shareDialog.js
Normal file
37
static/js/shareDialog.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
'use strict';
|
||||
|
||||
pandora.ui.shareDialog = function(/*[url, ]callback*/) {
|
||||
|
||||
if (arguments.length == 1) {
|
||||
var url, callback = arguments[0];
|
||||
} else {
|
||||
var url = arguments[0], callback = arguments[1];
|
||||
}
|
||||
var url = document.location.href.replace(document.location.hostname, document.location.hostname + '/m'),
|
||||
$content = Ox.Element().append(
|
||||
Ox.Input({
|
||||
height: 100,
|
||||
width: 256,
|
||||
placeholder: 'Share Link',
|
||||
type: 'textarea',
|
||||
disabled: true,
|
||||
value: url
|
||||
})
|
||||
),
|
||||
that = pandora.ui.iconDialog({
|
||||
buttons: [
|
||||
Ox.Button({
|
||||
id: 'close',
|
||||
title: Ox._('Close')
|
||||
}).bindEvent({
|
||||
click: function() {
|
||||
that.close();
|
||||
}
|
||||
}),
|
||||
],
|
||||
keys: {enter: 'close', escape: 'close'},
|
||||
content: $content,
|
||||
title: "Share current view",
|
||||
});
|
||||
return that;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue