1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-06 03:49:56 +02:00

replaced dialog with slide out

This commit is contained in:
John Moore 2013-11-19 20:23:35 -06:00
parent 5643d26436
commit 72a149ab4a
2 changed files with 24 additions and 18 deletions

View file

@ -106,22 +106,22 @@ function saveTag(id, type, path) {
} }
function showAddTagDialog(id, type, path) { function showAddTagDialog(id, type, path) {
//$('#dialog_tag_item').dialog({ $('#dialog_tag_item').dialog({
// modal: true, modal: true,
// buttons: [ buttons: [
// { {
// title: "Tag", title: "Tag",
// text: 'ok', text: 'ok',
// click: function () { click: function () {
// var tagName = $('#dialog_tag_item_tag_name').val(); var tagName = $('#dialog_tag_item_tag_name').val();
// if (tagName != null || tagName != '') { 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); 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(''); $('#dialog_tag_item_tag_name').val('');
// $(this).dialog('close'); $(this).dialog('close');
// } }
// } }
// ] ]
//}).show(); }).show();
} }

View file

@ -32,7 +32,13 @@
<td class="cel_artist"><?php echo $song->f_artist_link; ?></td> <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_album"><?php echo $song->f_album_link; ?></td>
<td class="cel_tags"> <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>
<td class="cel_track"><?php echo $song->f_track; ?></td> <td class="cel_track"><?php echo $song->f_track; ?></td>
<td class="cel_time"><?php echo $song->f_time; ?></td> <td class="cel_time"><?php echo $song->f_time; ?></td>