summaryrefslogtreecommitdiffstats
path: root/server/song.ajax.php
diff options
context:
space:
mode:
authordipsol <dipsol@ampache>2008-12-02 12:29:09 +0000
committerdipsol <dipsol@ampache>2008-12-02 12:29:09 +0000
commitb18f47b0e48762468a7a60c852b1f0936c7feda2 (patch)
tree9783e51151b17f0c2309bac9c3538f5228e2306a /server/song.ajax.php
parentee10d335e0108270250e212e092afa4ddf4a5507 (diff)
downloadampache-b18f47b0e48762468a7a60c852b1f0936c7feda2.tar.gz
ampache-b18f47b0e48762468a7a60c852b1f0936c7feda2.tar.bz2
ampache-b18f47b0e48762468a7a60c852b1f0936c7feda2.zip
fixed ticket 281, by changing the way the data was return. Now only the button will be updated instead of the whole line.
Diffstat (limited to 'server/song.ajax.php')
-rw-r--r--server/song.ajax.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/song.ajax.php b/server/song.ajax.php
index 1409ff15..99f8d3d1 100644
--- a/server/song.ajax.php
+++ b/server/song.ajax.php
@@ -36,10 +36,11 @@ switch ($_REQUEST['action']) {
$song->update_enabled($new_enabled,$song->id);
$song->enabled = $new_enabled;
$song->format();
-
- ob_start();
- require Config::get('prefix') . '/templates/show_song_row.inc.php';
- $results['song_' . $song->id] = ob_get_clean();
+
+ //Return the new Ajax::button
+ $id = 'btnFlipState_' . $song->id;
+ $button = $song->enabled ? 'disable' : 'enable';
+ $results[$id] = Ajax::button('?page=song&action=flip_state&song_id=' . $song->id,$button,_(ucfirst($button)),'flip_state_' . $song->id);
break;
default: