summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-10-14 17:29:07 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-10-14 17:29:07 +0000
commit78167c02518ff9d757741f0e8df524da300d067d (patch)
treed5fbbc41f6e807439de0d34ca9a06616dd961d04 /templates
parent9a16ee2c2ce55e7693c9432be2466210a0ebc6df (diff)
downloadampache-78167c02518ff9d757741f0e8df524da300d067d.tar.gz
ampache-78167c02518ff9d757741f0e8df524da300d067d.tar.bz2
ampache-78167c02518ff9d757741f0e8df524da300d067d.zip
removed extra lines from ajax, down to 86, updated ajax calls, added ldap auth
Diffstat (limited to 'templates')
-rw-r--r--templates/javascript_refresh.inc.php2
-rw-r--r--templates/show_album.inc1
-rw-r--r--templates/show_artist_box.inc.php7
-rw-r--r--templates/show_localplay_control.inc.php21
-rw-r--r--templates/show_localplay_switch.inc.php4
-rw-r--r--templates/show_object_rating.inc.php14
-rw-r--r--templates/show_songs.inc1
-rw-r--r--templates/sidebar.inc.php12
8 files changed, 26 insertions, 36 deletions
diff --git a/templates/javascript_refresh.inc.php b/templates/javascript_refresh.inc.php
index cd51773b..1da0c76b 100644
--- a/templates/javascript_refresh.inc.php
+++ b/templates/javascript_refresh.inc.php
@@ -15,7 +15,7 @@ function refresh()
// entry in the visitor's history. It is provided for
// those browsers that only support JavaScript 1.0.
//
- ajaxPut('<?php echo $ajax_url; ?>',<?php echo $ajax_object; ?>);
+ ajaxPut('<?php echo $ajax_url; ?>');
doLoad();
}
diff --git a/templates/show_album.inc b/templates/show_album.inc
index 5fc28300..17ca48c5 100644
--- a/templates/show_album.inc
+++ b/templates/show_album.inc
@@ -47,7 +47,6 @@ $title = scrub_out($album->name) . ' -- ' . $album->f_artist;
<div style="display:table-cell;vertical-align:top;">
<?php
if (conf('ratings')) {
- show_ajax_js("r_" . $album->id . "_album",array("rating_" . $album->id . "_album"));
echo "<span style=\"display:inline;\" id=\"rating_" . $album->id . "_album\">";
show_rating($album->id, 'album');} // end if ratings
echo "</span>";
diff --git a/templates/show_artist_box.inc.php b/templates/show_artist_box.inc.php
index 5dd31a9f..20feacaa 100644
--- a/templates/show_artist_box.inc.php
+++ b/templates/show_artist_box.inc.php
@@ -23,7 +23,12 @@ $web_path = conf('web_path');
$title = _('Albums by') . " " . $artist->full_name;
?>
<?php require (conf('prefix') . '/templates/show_box_top.inc.php'); ?>
-<?php if (conf('ratings')) { show_rating($artist->id, 'artist'); } // end if ratings ?>
+<?php
+if (conf('ratings')) {
+ echo "<span id=\"rating_" . $artist->id . "_artist\" style=\"display:inline;\">";
+ show_rating($artist->id, 'artist');
+ echo "</span>";
+} // end if ratings ?>
<strong><?php echo _('Actions'); ?>:</strong><br />
&nbsp;&nbsp;<a href="<?php echo $web_path; ?>/artists.php?action=show_all_songs&amp;artist=<?php echo $artist_id; ?>"><?php echo _("Show All Songs By") . " " . $artist->full_name; ?></a><br />
&nbsp;&nbsp;<a href="<?php echo $web_path; ?>/song.php?action=artist&amp;artist_id=<?php echo $artist_id; ?>"><?php echo _("Play All Songs By") . " " . $artist->full_name; ?></a><br />
diff --git a/templates/show_localplay_control.inc.php b/templates/show_localplay_control.inc.php
index a0177603..4e83bdef 100644
--- a/templates/show_localplay_control.inc.php
+++ b/templates/show_localplay_control.inc.php
@@ -23,36 +23,29 @@
$web_path = conf('web_path');
$localplay = init_localplay();
-$required_info = "&user_id=" . $GLOBALS['user']->id . "&sessid=" . session_id();
-$ajax_url = $web_path . '/server/ajax.server.php';
+$required_info = conf('ajax_info');
+$ajax_url = conf('ajax_url');
?>
-<script language="javascript" type="text/javascript">
-<!--
-var lp_control = new Array(2);
-lp_control[0] = "lp_state";
-lp_control[1] = "lp_playing";
--->
-</script>
<div class="localplaycontrol" style="display:table-cell;cursor:pointer;padding:2px;">
<?php if ($localplay->has_function('prev')) { ?>
-<span class="prev_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=prev<?php echo $required_info; ?>',lp_control);return true;">
+<span class="prev_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=prev<?php echo $required_info; ?>');return true;">
<img src="<?php echo $web_path; ?>/images/localplay/prev.gif" alt="prev" />
</span>
<?php } ?>
-<span class="stop_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=stop<?php echo $required_info; ?>',lp_control);return true;">
+<span class="stop_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=stop<?php echo $required_info; ?>');return true;">
<img src="<?php echo $web_path; ?>/images/localplay/stop.gif" alt="stop" />
</span>
<?php if ($localplay->has_function('pause')) { ?>
-<span class="pause_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=pause<?php echo $required_info; ?>',lp_control);return true;">
+<span class="pause_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=pause<?php echo $required_info; ?>');return true;">
<img src="<?php echo $web_path; ?>/images/localplay/pause.gif" alt="pause" />
</span>
<?php } ?>
-<span class="play_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=play<?php echo $required_info; ?>',lp_control);return true;">
+<span class="play_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=play<?php echo $required_info; ?>');return true;">
<img src="<?php echo $web_path; ?>/images/localplay/play.gif" alt="play" />
</span>
<?php if ($localplay->has_function('next')) { ?>
-<span class="next_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=next<?php echo $required_info; ?>',lp_control);return true;">
+<span class="next_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=next<?php echo $required_info; ?>');return true;">
<img src="<?php echo $web_path; ?>/images/localplay/next.gif" alt="next" />
</span>
<?php } ?>
diff --git a/templates/show_localplay_switch.inc.php b/templates/show_localplay_switch.inc.php
index 32e535f9..a0ca8cd1 100644
--- a/templates/show_localplay_switch.inc.php
+++ b/templates/show_localplay_switch.inc.php
@@ -1,6 +1,6 @@
-<span <?php echo $stream; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=change_play_type&amp;type=stream<?php echo $required_info; ?>','play_type');return true;">
+<span <?php echo $stream; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=change_play_type&amp;type=stream<?php echo $required_info; ?>');return true;">
<?php echo _('Stream') ?>
</span><br /><br />
-<span <?php echo $localplay; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=change_play_type&amp;type=localplay<?php echo $required_info; ?>','play_type');return true;">
+<span <?php echo $localplay; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=change_play_type&amp;type=localplay<?php echo $required_info; ?>');return true;">
<?php echo _('Localplay'); ?>
</span>
diff --git a/templates/show_object_rating.inc.php b/templates/show_object_rating.inc.php
index 05bd3633..7be0a870 100644
--- a/templates/show_object_rating.inc.php
+++ b/templates/show_object_rating.inc.php
@@ -29,10 +29,10 @@ echo "<ul class=\"star-rating\">\n";
/* Handle the "Not rated" possibility */
if ($rating->rating == '-1') {
- echo "<li class=\"zero-stars\"><span onclick=\"ajaxPut('" . $base_url . "&rating=-1',r_" . $rating->id . "_" . $rating->type . ");return true;\" title=\"don't play\" class=\"zero-stars\"></span></li>\n";
+ echo "<li class=\"zero-stars\"><span onclick=\"ajaxPut('" . $base_url . "&rating=-1');return true;\" title=\"don't play\" class=\"zero-stars\"></span></li>\n";
}
else {
- echo "<li class=\"zero-stars\"><span onclick=\"ajaxPut('" . $base_url . "&rating=-1',r_" . $rating->id . "_" . $rating->type . ");return true;\" title=\"remove rating\" class=\"zero-stars\"></span></li>\n";
+ echo "<li class=\"zero-stars\"><span onclick=\"ajaxPut('" . $base_url . "&rating=-1');return true;\" title=\"remove rating\" class=\"zero-stars\"></span></li>\n";
}
// decide width of rating. image is 16 px wide
$width = $rating->rating*16;
@@ -48,19 +48,19 @@ else echo "$rating->rating of 5</li>\n";
//it did not like my "1-star", "2-star" ... css styles, and I changed it to this after I realized star1... would have worked :\
?>
<li>
- <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=1',r_<?php echo $rating->id; ?>_<?php echo $rating->type; ?>);return true;" class="one-stars" title="1 <?php echo _('out of'); ?> 5"></span>
+ <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=1');return true;" class="one-stars" title="1 <?php echo _('out of'); ?> 5"></span>
</li>
<li>
- <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=2',r_<?php echo $rating->id; ?>_<?php echo $rating->type; ?>);return true;" class="two-stars" title="2 <?php echo _('out of'); ?> 5"></span>
+ <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=2');return true;" class="two-stars" title="2 <?php echo _('out of'); ?> 5"></span>
</li>
<li>
- <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=3',r_<?php echo $rating->id; ?>_<?php echo $rating->type; ?>);return true;" class="three-stars" title="3 <?php echo _('out of'); ?> 5"></span>
+ <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=3');return true;" class="three-stars" title="3 <?php echo _('out of'); ?> 5"></span>
</li>
<li>
- <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=4',r_<?php echo $rating->id; ?>_<?php echo $rating->type; ?>);return true;" class="four-stars" title="4 <?php echo _('out of'); ?> 5"></span>
+ <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=4');return true;" class="four-stars" title="4 <?php echo _('out of'); ?> 5"></span>
</li>
<li>
- <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=5',r_<?php echo $rating->id; ?>_<?php echo $rating->type; ?>);return true;" class="five-stars" title="5 <?php echo _('out of'); ?> 5"></span>
+ <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=5');return true;" class="five-stars" title="5 <?php echo _('out of'); ?> 5"></span>
</li>
</ul>
diff --git a/templates/show_songs.inc b/templates/show_songs.inc
index bd633811..a03d9fa1 100644
--- a/templates/show_songs.inc
+++ b/templates/show_songs.inc
@@ -146,7 +146,6 @@ foreach ($song_ids as $song_id) {
</td>
<?php if(conf('ratings')) { ?>
<td id="rating_<?php echo $song->id; ?>_song">
- <?php show_ajax_js("r_" . $song->id . "_song",array("rating_" . $song->id . "_song")); ?>
<?php show_rating($song->id,'song'); ?>
</td>
<?php } ?>
diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php
index 38fef93d..09d4fd4f 100644
--- a/templates/sidebar.inc.php
+++ b/templates/sidebar.inc.php
@@ -184,15 +184,9 @@ $web_path = conf('web_path');
<br />
<?php $type = conf('play_type'); ${$type} = 'id="pt_active"'; ?>
<?php
- $required_info = "&user_id=" . $GLOBALS['user']->id . "&sessid=" . session_id();
- $ajax_url = $web_path . '/server/ajax.server.php';
+ $required_info = conf('ajax_info');
+ $ajax_url = conf('ajax_url');
?>
- <script type="text/javascript" language="javascript">
- <!--
- var lp_switch = new Array(2);
- lp_switch[0] = "play_type";
- -->
- </script>
<span class="text-action" style="cursor:pointer;" id="play_type">
<?php require_once(conf('prefix') . '/templates/show_localplay_switch.inc.php'); ?>
</span>
@@ -200,6 +194,6 @@ $web_path = conf('web_path');
<?php } // if horizontal orientation ?>
<?php } // if localplay access ?>
<?php if (conf('use_auth')) { ?>
- <li><a href="<?php echo $web_path; ?>/logout.php"><?php echo _("Logout"); ?></a></li>
+ <li><a href="<?php echo $web_path; ?>/logout.php"><?php echo _('Logout'); ?></a></li>
<?php } // end (conf('use_auth'))?>
</ul>