1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 17:59:21 +02:00

its ugly and we need some serious jquery UI niceness but we are tagging!!

This commit is contained in:
John Moore 2013-07-25 20:16:23 -05:00
parent ed26c1a51a
commit 3b8d0f3430
5 changed files with 14 additions and 9 deletions

View file

@ -7,6 +7,7 @@
<RootNamespace>Amapche</RootNamespace>
<OutputType>Library</OutputType>
<ProjectTypeGuids>{A0786B88-2ADB-4C21-ABE8-AA2D79766269}</ProjectTypeGuids>
<IISProjectUrl>http://localhost:14447/</IISProjectUrl>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<IncludeDebugInformation>true</IncludeDebugInformation>

View file

@ -104,7 +104,9 @@ function check_inline_song_edit(type, song) {
// really should be using jquery ui and have something nice looking
function showAddTagDialog(id, type, path) {
var tagName = window.prompt('Enter Tag:', '');
var url = path + '/server/ajax.server.php?action=add_tag_by_name&type=' + type + '&object_id=' + id + '&tag_name=' + tagName;
ajaxPut(path);
var url = path + '/server/ajax.server.php?page=tag&action=add_tag_by_name&type=' + type + '&object_id=' + id + '&tag_name=' + tagName;
alert(url);
ajaxPut(url);
}

View file

@ -33,8 +33,7 @@ switch ($_REQUEST['action']) {
Tag::add_tag_map($_GET['type'],$_GET['object_id'],$_GET['tag_id']);
break;
case 'add_tag_by_name':
$tag = Tag::construct_from_name($_GET['tag_name']);
Tag::add($_GET['type'],$_GET['object_id'],$tag, false);
Tag::add($_GET['type'],$_GET['object_id'],$_GET['tag_name'], false);
break;
case 'remove_tag':
$tag = new Tag($_GET['tag_id']);

View file

@ -60,7 +60,13 @@
<label><?php echo T_('Artist'); ?></label>
<?php echo $media->f_artist_link; ?>
</div>
<div class="np_cell cel_artist">
<label><?php echo T_('Tags'); ?></label>
<a href="#" id="tag_song_<?php echo $media->id?>" onclick="showAddTagDialog(<?php echo $media->id?>, 'song', '<?php echo Config::get('web_path'); ?>')"><?php echo UI::get_icon('add', T_('Add')); ?></a><?php echo $media->f_tags; ?>
</div>
</div>
<?php if (Art::is_enabled()) { ?>
<div class="np_group" id="np_group_3">

View file

@ -27,10 +27,7 @@
<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; ?>
<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; ?>
</td>
<td class="cel_track"><?php echo $song->f_track; ?></td>
<td class="cel_time"><?php echo $song->f_time; ?></td>