mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
Enhance share feature with modal dialog choices
Add Facebook / Twitter / GooglePlus external share plugins
This commit is contained in:
parent
53f12cf2b2
commit
80cde0c626
23 changed files with 478 additions and 12 deletions
|
@ -138,6 +138,61 @@ function handleBroadcastAction(url, id) {
|
|||
$("#broadcastsdialog").dialog("close");
|
||||
}
|
||||
|
||||
/************************************************************/
|
||||
/* Dialog selection to start a broadcast */
|
||||
/************************************************************/
|
||||
|
||||
var closeshare;
|
||||
function showShareDialog(e, object_type, object_id) {
|
||||
$("#sharedialog").dialog("close");
|
||||
|
||||
var parent = this;
|
||||
parent.contentUrl = jsAjaxServer + '/ajax.server.php?page=browse&action=get_share_links&object_type=' + object_type + '&object_id=' + object_id;
|
||||
parent.editDialogId = '<div id="sharedialog"></div>';
|
||||
|
||||
$(parent.editDialogId).dialog({
|
||||
modal: true,
|
||||
dialogClass: 'sharedialogstyle',
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
width: 200,
|
||||
height: 90,
|
||||
autoOpen: false,
|
||||
open: function () {
|
||||
closeshare = 1;
|
||||
$(document).bind('dblclick', shoverlayclickclose);
|
||||
$(this).load(parent.contentUrl, function() {
|
||||
$('#sharedialog').focus();
|
||||
});
|
||||
},
|
||||
focus: function() {
|
||||
closeshare = 0;
|
||||
},
|
||||
close: function (e) {
|
||||
$(document).unbind('click');
|
||||
$(this).empty();
|
||||
$(this).dialog("destroy");
|
||||
}
|
||||
});
|
||||
|
||||
$("#sharedialog").dialog("option", "position", [e.clientX + 10, e.clientY]);
|
||||
$("#sharedialog").dialog("open");
|
||||
closeshare = 0;
|
||||
}
|
||||
|
||||
function shoverlayclickclose(e) {
|
||||
if (closeshare) {
|
||||
$("#sharedialog").dialog("close");
|
||||
}
|
||||
closeshare = 1;
|
||||
}
|
||||
|
||||
function handleShareAction(url, id) {
|
||||
ajaxPut(url, id);
|
||||
$("#sharedialog").dialog("close");
|
||||
}
|
||||
|
||||
|
||||
/***************************************************/
|
||||
/* Edit modal dialog for artists, albums and songs */
|
||||
/***************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue