Skip to content

Commit

Permalink
in prep for changing imagebox collection format
Browse files Browse the repository at this point in the history
  • Loading branch information
jessevondoom committed Aug 16, 2010
1 parent beb4a47 commit 3f48288
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
2 changes: 1 addition & 1 deletion uncompressed/media/flower_imagebox.js
Expand Up @@ -160,7 +160,7 @@ var FlowerImagebox = new Class({
var divCollection = 'default',
elid = el.get('id');
if (elid) {divCollection = elid;}
el.getElements('a[href*=.jpg],a[href*=.jpeg],a[href*=.gif],a[href*=.png]').each(function(a){
el.getElements('a[href*=.jpg],a[href*=.jpeg],a[href*=.gif],a[href*=.png]').each(function(a){
this.addFromLink(a,divCollection);
}.bind(this));
}
Expand Down
35 changes: 6 additions & 29 deletions uncompressed/soundplayer/flower_soundplayer.js
Expand Up @@ -38,7 +38,7 @@ var FlowerSoundPlayer = new Class({
this.sm2Loaded = false;
this.currentSound = null;
this.currentPlaylist = null;
this.Playlists = new Hash();
this.Playlists = $H();
this.soundManager = null;
this.sm2LoadTimer = null;
this.sm2LoadTime = 0;
Expand Down Expand Up @@ -90,21 +90,6 @@ var FlowerSoundPlayer = new Class({
soundManager.beginDelayedInit(); // start SM2 init.
},




/*
*
*
*
*
Taken directly from imagebox
*
*
*
*
*/

attachToElement: function(el) {
/*
Function attachToElement(anchor element el)
Expand Down Expand Up @@ -456,7 +441,7 @@ var SoundPlaylist = new Class({

initialize: function(name) {
this.SoundPlayer = null;
this.sounds = new Hash();
this.sounds = $H();
this.currentSound = null;
this.currentKey = 0;
this.usingHTML5 = false;
Expand Down Expand Up @@ -629,15 +614,7 @@ var SoundPlaylist = new Class({
stopCurrentSound: function() {
this.makeCurrent();
if (this.currentSound.sound.playState != 0) {
/*
this.currentSound.sound.setPosition(0);
if (this.currentSound.sound.isHTML5) {
// HTML5 has no true "stop" — unloading the media can cause warnings that confuse and bewilder the iphone
this.currentSound.sound.pause();
} else {
*/
this.currentSound.sound.stop();
//}
this.currentSound.sound.stop();
this.SoundPlayer.fireEvent('stop');
}
},
Expand Down Expand Up @@ -763,7 +740,7 @@ var defaultSoundPlayerUI = new Class({
if (this.options.forceAppleiDevice) {
this.isAppleiDevice = true;
}
this.allPlaylistLi = new Hash();
this.allPlaylistLi = $H();
this.notesSpan = new Element('span',{
text:'(tap to stop)',
'styles':{'display':'none','color':'#111','padding-left':'1em'}
Expand All @@ -775,7 +752,7 @@ var defaultSoundPlayerUI = new Class({
// positionStyle - the position indicator
// controlsStyle - the div containing control buttons
//
this.elementStyles = new Hash({
this.elementStyles = $H({
'seekbarSpc': {'position':'relative','background-color':'#666','height':'9px','width':'100%','margin-top':'4px','overflow':'hidden'},
'seekbar': {'position':'absolute','background-color':'#c00','height':'9px','width':'0%','cursor':'pointer','z-index':'10'},
'position': {'position':'absolute','left':'0%','width':'3px','height':'9px','background-color':'#000','z-index':'15'},
Expand Down Expand Up @@ -873,7 +850,7 @@ var defaultSoundPlayerUI = new Class({
tmpLi.addEvent('click', function(){
this.handlePlaylistLiClick(track.sound.url);
}.bind(this));
this.allPlaylistLi.set(track.sound.url,new Hash({'li':tmpLi,'titlespan':tmpTitleSpan,'timespan':tmpTimeSpan}));
this.allPlaylistLi.set(track.sound.url,$H({'li':tmpLi,'titlespan':tmpTitleSpan,'timespan':tmpTimeSpan}));
},this);

this.mainPlaylistOl.inject(this.playerSpc);
Expand Down

0 comments on commit 3f48288

Please sign in to comment.