mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 10:49:37 +02:00
replaced dialog with slide out
This commit is contained in:
parent
5643d26436
commit
72a149ab4a
2 changed files with 24 additions and 18 deletions
|
@ -106,22 +106,22 @@ function saveTag(id, type, path) {
|
|||
}
|
||||
|
||||
function showAddTagDialog(id, type, path) {
|
||||
//$('#dialog_tag_item').dialog({
|
||||
// modal: true,
|
||||
// buttons: [
|
||||
// {
|
||||
// title: "Tag",
|
||||
// text: 'ok',
|
||||
// click: function () {
|
||||
// var tagName = $('#dialog_tag_item_tag_name').val();
|
||||
// if (tagName != null || tagName != '') {
|
||||
// ajaxPut(path + '/server/ajax.server.php?page=tag&action=add_tag_by_name&type=' + type + '&object_id=' + id + '&tag_name=' + tagName);
|
||||
// }
|
||||
// $('#dialog_tag_item_tag_name').val('');
|
||||
// $(this).dialog('close');
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
//}).show();
|
||||
$('#dialog_tag_item').dialog({
|
||||
modal: true,
|
||||
buttons: [
|
||||
{
|
||||
title: "Tag",
|
||||
text: 'ok',
|
||||
click: function () {
|
||||
var tagName = $('#dialog_tag_item_tag_name').val();
|
||||
if (tagName != null || tagName != '') {
|
||||
ajaxPut(path + '/server/ajax.server.php?page=tag&action=add_tag_by_name&type=' + type + '&object_id=' + id + '&tag_name=' + tagName);
|
||||
}
|
||||
$('#dialog_tag_item_tag_name').val('');
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
]
|
||||
}).show();
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,13 @@
|
|||
<td class="cel_artist"><?php echo $song->f_artist_link; ?></td>
|
||||
<td class="cel_album"><?php echo $song->f_album_link; ?></td>
|
||||
<td class="cel_tags">
|
||||
<a href="#" id="tag_song_<?php echo $song->id?>" onclick="showAddTagDialog(<?php echo $song->id?>, 'song', '<?php echo Config::get('web_path'); ?>')"><?php echo UI::get_icon('add', T_('Add')); ?></a><?php echo $song->f_tags; ?>
|
||||
<span id="tag_song_<?php echo $song->id?>" onclick="showAddTagSlideout('#dialog_tag_item_<?php echo $song->id?>')"><?php echo UI::get_icon('add', T_('Add')); ?></span><?php echo $song->f_tags; ?>
|
||||
<div id="dialog_tag_item_<?php echo $song->id?>" style="display:none;" class="np_cell cel_artist">
|
||||
<div><?php echo T_('Enter tag:')?></div>
|
||||
<div><input type="text" id="dialog_tag_item_tag_name_<?php echo $song->id?>"/></div>
|
||||
<div><input type="button" value="<?php echo T_('Save')?>" onclick="saveTag(<?php echo $song->id?>, 'song', '<?php echo Config::get('web_path'); ?>')" /></div>
|
||||
<div><input type="button" value="<?php echo T_('Close')?>" onclick="closeAddTagSlideout('#dialog_tag_item_<?php echo $song->id?>')" /> </div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="cel_track"><?php echo $song->f_track; ?></td>
|
||||
<td class="cel_time"><?php echo $song->f_time; ?></td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue