Single player vs playlist works but I can't theme them seperately because of this...

In jplayer.tpl.php <div class="jp-type-playlist"> is called wether it's a single instance or playlist. This also happens in the dev version.

On single instance this should be <div class="jp-type-single">. That way we can theme with css more efficiently, essentially making two different players.

Thanks for all your work!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drwits’s picture

found a fix here http://drupal.org/node/1289016#comment-5580530

but this should really be fixed... seems like a big issue.

thanks again.

Jorrit’s picture

Shouldn't jplayer.tpl.php contain <div class="jp-type-<?php print $mode; ?>"> instead of just <div class="jp-type-playlist">. Visually, this seems to work, but the audio file doesn't play anymore when I click the play button.

davidwbarratt’s picture

Assigned: drwits » Unassigned
Status: Active » Needs review
FileSize
1.03 KB

The attached patch fixes the class with jorritt's suggestion above, and also fixes the play button issue in jplayer.js when the class is changed to "jp-type-single".

Please test the patch and see if it works for you.

thanks!
david

pandaPowder’s picture

I just ran across this same thing and I was extremely surprised to see that it was hard coded in the template. Verified that the patch worked.

vchen’s picture

Manually applied patch and the single class is working along with play button.

However, when using patch command with SVN, this happened:

patch < single_mode-1780386-3.patch
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/theme/jplayer.js b/theme/jplayer.js
|index cf93b37..c086df1 100644
|--- a/theme/jplayer.js
|+++ b/theme/jplayer.js
--------------------------
File to patch:
Skip this patch? [y] y
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 18
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/theme/jplayer.tpl.php b/theme/jplayer.tpl.php
|index 420e4d1..80f543e 100644
|--- a/theme/jplayer.tpl.php
|+++ b/theme/jplayer.tpl.php
--------------------------
File to patch: y
y: No such file or directory
Skip this patch? [y] y
Skipping patch.
1 out of 1 hunk ignored

Not sure if I should have used -pnumber. but I did try -p0 and it had the same result.

kylesmith’s picture

Issue summary: View changes
FileSize
1006 bytes

I also had trouble applying davidwbarratt's patch from #3, so I re-created it. This patch is working with the current 2.x-dev code.

kvnm’s picture

Status: Needs review » Reviewed & tested by the community

Was just about to submit the patch in #6 -- works great.

  • markie committed bd84275 on 7.x-2.x authored by kylesmith
    Issue #1780386 by kylesmith, davidwbarratt: Single player doesn't bring...
markie’s picture

Status: Reviewed & tested by the community » Fixed

Applied patch #6 plus added a change in the info section.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.