Changeset 27489
- Timestamp:
- 03/10/2014 12:14:42 AM (12 years ago)
- Location:
- trunk/src/wp-includes/js/mediaelement
- Files:
-
- 2 edited
-
wp-mediaelement.css (modified) (2 diffs)
-
wp-playlist.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/mediaelement/wp-mediaelement.css
r27481 r27489 125 125 .wp-playlist-item-length { 126 126 position: absolute; 127 right: 0;127 right: 3px; 128 128 top: 0; 129 129 } … … 137 137 position: relative; 138 138 cursor: pointer; 139 padding: 0 3px; 139 140 border-bottom: 1px solid #ccc; 141 } 142 143 .wp-playlist-dark .wp-playlist-item { 144 color: #dedede; 145 } 146 147 .wp-playlist-playing { 148 font-weight: bold; 149 background: #f7f7f7; 150 } 151 152 .wp-playlist-dark .wp-playlist-playing { 153 background: #000; 154 color: #fff; 140 155 } 141 156 -
trunk/src/wp-includes/js/mediaelement/wp-playlist.js
r27320 r27489 26 26 27 27 if ( this.data.tracklist ) { 28 this.playingClass = 'wp-playlist-playing'; 28 29 this.renderTracks(); 29 30 } … … 58 59 59 60 renderTracks : function () { 60 var that= this, i = 1, tracklist = $( '<div class="wp-playlist-tracks"></div>' );61 var self = this, i = 1, tracklist = $( '<div class="wp-playlist-tracks"></div>' ); 61 62 this.tracks.each(function (model) { 62 if ( ! that.data.images ) {63 if ( ! self.data.images ) { 63 64 model.set( 'image', false ); 64 65 } 65 model.set( 'artists', that.data.artists );66 model.set( 'index', that.data.tracknumbers ? i : false );67 tracklist.append( that.itemTemplate( model.toJSON() ) );66 model.set( 'artists', self.data.artists ); 67 model.set( 'index', self.data.tracknumbers ? i : false ); 68 tracklist.append( self.itemTemplate( model.toJSON() ) ); 68 69 i += 1; 69 70 }); 70 71 this.$el.append( tracklist ); 72 73 this.$( '.wp-playlist-item' ).eq(0).addClass( this.playingClass ); 71 74 }, 72 75 … … 116 119 setCurrent : function () { 117 120 this.current = this.tracks.at( this.index ); 121 122 if ( this.data.tracklist ) { 123 this.$( '.wp-playlist-item' ) 124 .removeClass( this.playingClass ) 125 .eq( this.index ) 126 .addClass( this.playingClass ); 127 } 128 118 129 this.loadCurrent(); 119 130 this.player.play();
Note: See TracChangeset
for help on using the changeset viewer.