mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 19:41:55 +02:00
Fix #587
This commit is contained in:
parent
6b1826271c
commit
3dac196975
2 changed files with 6 additions and 6 deletions
|
@ -319,7 +319,7 @@ class Share extends database_object
|
||||||
public static function display_ui_links($object_type, $object_id)
|
public static function display_ui_links($object_type, $object_id)
|
||||||
{
|
{
|
||||||
echo "<ul>";
|
echo "<ul>";
|
||||||
echo "<li><a href=\"". AmpConfig::get('web_path') . "/share.php?action=show_create&type=" . $object_type . "&id=" . $object_id . "\">" . UI::get_icon('share', T_('Advanced Share')) . " " . T_('Advanced Share') . "</a></li>";
|
echo "<li><a onclick=\"handleShareAction('". AmpConfig::get('web_path') . "/share.php?action=show_create&type=" . $object_type . "&id=" . $object_id . "')\">" . UI::get_icon('share', T_('Advanced Share')) . " " . T_('Advanced Share') . "</a></li>";
|
||||||
if (AmpConfig::get('download')) {
|
if (AmpConfig::get('download')) {
|
||||||
$dllink = "";
|
$dllink = "";
|
||||||
if ($object_type == "song" || $object_type == "video") {
|
if ($object_type == "song" || $object_type == "video") {
|
||||||
|
@ -340,7 +340,7 @@ class Share extends database_object
|
||||||
echo "<li style='padding-top: 8px; text-align: right;'>";
|
echo "<li style='padding-top: 8px; text-align: right;'>";
|
||||||
$plugins = Plugin::get_plugins('external_share');
|
$plugins = Plugin::get_plugins('external_share');
|
||||||
foreach ($plugins as $plugin_name) {
|
foreach ($plugins as $plugin_name) {
|
||||||
echo "<a href=\"" . AmpConfig::get('web_path') . "/share.php?action=external_share&plugin=" . $plugin_name . "&type=" . $object_type . "&id=" . $object_id . "\" target=\"_blank\">" . UI::get_icon('share_' . strtolower($plugin_name), $plugin_name) . "</a> ";
|
echo "<a onclick=\"handleShareAction('". AmpConfig::get('web_path') . "/share.php?action=external_share&plugin=" . $plugin_name . "&type=" . $object_type . "&id=" . $object_id . "')\" target=\"_blank\">" . UI::get_icon('share_' . strtolower($plugin_name), $plugin_name) . "</a> ";
|
||||||
}
|
}
|
||||||
echo "</li>";
|
echo "</li>";
|
||||||
echo "</ul>";
|
echo "</ul>";
|
||||||
|
|
|
@ -151,7 +151,7 @@ function showShareDialog(e, object_type, object_id) {
|
||||||
parent.editDialogId = '<div id="sharedialog"></div>';
|
parent.editDialogId = '<div id="sharedialog"></div>';
|
||||||
|
|
||||||
$(parent.editDialogId).dialog({
|
$(parent.editDialogId).dialog({
|
||||||
modal: true,
|
modal: false,
|
||||||
dialogClass: 'sharedialogstyle',
|
dialogClass: 'sharedialogstyle',
|
||||||
resizable: false,
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
|
@ -160,7 +160,7 @@ function showShareDialog(e, object_type, object_id) {
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
open: function () {
|
open: function () {
|
||||||
closeshare = 1;
|
closeshare = 1;
|
||||||
$(document).bind('dblclick', shoverlayclickclose);
|
$(document).bind('click', shoverlayclickclose);
|
||||||
$(this).load(parent.contentUrl, function() {
|
$(this).load(parent.contentUrl, function() {
|
||||||
$('#sharedialog').focus();
|
$('#sharedialog').focus();
|
||||||
});
|
});
|
||||||
|
@ -187,8 +187,8 @@ function shoverlayclickclose(e) {
|
||||||
closeshare = 1;
|
closeshare = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleShareAction(url, id) {
|
function handleShareAction(url) {
|
||||||
ajaxPut(url, id);
|
NavigateTo(url);
|
||||||
$("#sharedialog").dialog("close");
|
$("#sharedialog").dialog("close");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue