Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add library/favorite/smile/frown buttons

  • Loading branch information...
commit a4bcc5a7bebeadb2151177401474e66b5271479a 1 parent b7dbad9
@adammw authored
View
38 data/css/sharkzapper_popup.css
@@ -234,6 +234,31 @@ button span {
-webkit-mask-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,1) 8px, rgba(0,0,0,1) 222px, rgba(0,0,0,0));
}
+/* queue buttons (bad name, i know) */
+#queueButtons {
+ padding: 0 8px;
+ vertical-align:bottom;
+ -webkit-box-align:end;
+}
+#queueButtons button {
+ display: inline-block;
+ margin: 0 4px 4px 0;
+}
+#queueButtons #song_smile,
+#queueButtons #song_frown { display: none; }
+.radio #queueButtons #song_smile,
+.radio #queueButtons #song_frown { display: inline-block; }
+
+.maskIcon {
+ background-color: #666;
+ -webkit-transition: background-color 250ms;
+}
+.maskIcon.library.selected{background-color:#7db721;}
+.maskIcon.favorite.selected{background-color:#fc0093;}
+.maskIcon.smile.selected{background-color:#ffd700;}
+.maskIcon.frown.selected{background-color:#4ab6f3;}
+.maskIcon:hover,.maskIcon.selected:hover {background-color: #fff;}
+
/* queue details */
#queuePosition {
text-align: right;
@@ -350,6 +375,12 @@ button span {
.icon {display: block; width: 16px; height: 16px; background-image: url(data:image/gif;base64,R0lGODlhMAAgAuZ/ALrS4WZmZuXl5aPnKMbl+IiIiLa2tmGHoGemz93c3HR0dMPDw//VrEtLS/aZzixWouvr6//y5ampqfrV6qBSB//jxv38/fn5+aQdEOmpa/Bqj2B9kPNmthISEv/s2P/Ll5KSkvGGp7lPYFZWVvHx8frK5dPr+vzo8/em1O1KqPb29vm33NPT05mZmeldgfyJAvWLx/fK1snJyf75/H9/f8fY4rLqY6TAlc31SslNFPXg6PZ34CsrK9p8IP70+eh3TdLyrMbuktEwVdx3lJDE58GCOv/37/R2vfSsNtpaMeLy/EhqgIau1bYoS/jgCt90stzs089sFS9SadpHaspjjun518w8jBsz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AHEQBwhgCM37vNERB2BAAHHghoSABc6LBdnLBEzwAN47COD7A+ILHdSLAOYrArZ6vFiQBEmwvs/xAIJpvj2wBVvQA38wv/UbHQ9wBmegv13QBf6LBTmQA/brHAN8BnnwBT1wwP6LAViABRgQHXkwvREcBUiABFHwB8VbvBr8AA/QwR8cwiOcwdCRByZ8BV+QA3RAB9C7J8LQcQEu/ABXAAEyTMMXYMEYHLw3IQBXUMRXsAALvMAysML65BOBAAA7); background-repeat: none; position: relative;}
/* more image assets */
+.maskIcon { /* based on http://static.a.gs-cdn.net/webincludes/css/images/icons/songRow_18px.png */
+ display: block; padding: 0; width: 18px; height: 18px;
+ -webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAABsCAYAAABn5uLmAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCBwUdFdpFVzEAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAAB0klEQVRYw+2XQWcDQRTH3zZVQmkvOZUQSgmlp157DaWEnEoJpV+i9EuUkm+QQ6VUCCGEUHJtLyWU9hJKSZWS06+XNzXZbrKzyVaI+fPIvJn9Zeet9zcj4jW3gFxaoA/gNA2QURPYSQMEMALO0wAZtYFC1Pq1hPxMGlu7WHqxR2l9/pxvS6+VtFoApo0XtRHxoFUCeXl5/Z/9ztW0s/xaRCSY9VAQBEEYYnKJQH8WT4FMBUXBZkEWKq6Xl9fC5rUH9IAxUAdyGnXN9YBdF9BD6Pb4qGGrG2sjwEhEtmL+7zMIgu04q71zqMCty9Y2tQ7T1AWyrgXPAp0ISMcZEoK1LUgrMSQEawINYMM3h5eXaY1r4BXIh5xzANSSgIbaqGUrV9HcMAkoD5RCOQFK9lu6HP3MKW1ibOdiT7XAmYiUrbeYgADHQNVlW+9aiwZwYGD6u6FzXy6gQ+DZcsZvDaMBcJTEGS+BvgXoA1dz262X18q4owA14AUoWk1b1FzN6QqnDxmHrFigX4dMAsqrG0ooSjoX75CuN8+wU67PWJsXkRMR2dfxk4jci8iba7Ez6kXjiDPkWOcyLqCWsVP9QlWNG80BtFxAPYUVIopd0Lmeb5Ql6gfg9+ho1UD+wAAAAABJRU5ErkJggg==);
+ -webkit-mask-repeat: no-repeat;
+}
+
#volumeControl, #volumeSlider .ui-slider-handle {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAABpCAYAAAAgCeOcAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGQTEwNkZENUQ2OTQxMUUwQjM2NUQ2QUIwNDFGMzh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lwnwIMAEC5LqC3tEHEAAAAAElFTkSuQmCC);
}
@@ -410,3 +441,10 @@ button span {
#player_volume.four{background-position: -295px -148px;}
#player_volume.five{background-position: -335px -148px;}
#player_volume.muted{background-position: -95px -148px;}
+
+.maskIcon.play{-webkit-mask-position: 0 0;}
+.maskIcon.pause{-webkit-mask-position: 0 -18px;}
+.maskIcon.library{-webkit-mask-position: 0 -36px;}
+.maskIcon.favorite{-webkit-mask-position: 0 -54px;}
+.maskIcon.smile{-webkit-mask-position: 0 -72px;}
+.maskIcon.frown{-webkit-mask-position: 0 -90px;}
View
7 data/html/sharkzapper_popup.html
@@ -48,7 +48,12 @@
<div class="scrollable"><a class="albumName"></a></div>
</div>
<div id="queueDetail" class="hbox">
- <div class="flex"></div>
+ <div id="queueButtons" class="hbox flex">
+ <button id="song_library" class="maskIcon library" title="Add to My Music"></button>
+ <button id="song_favorite" class="maskIcon favorite" title="Add to Favorites"></button>
+ <button id="song_smile" class="maskIcon smile"></button>
+ <button id="song_frown" class="maskIcon frown"></button>
+ </div>
<div id="queuePosition" style="display: none">
<span id="queue_current_position"></span> /
<span id="queue_total"></span>
View
46 data/js/sharkzapper_popup.js
@@ -116,10 +116,10 @@ var sharkzapper = new (function SharkZapperPopup(debug){
$('#player_shuffle').bind('click', sharkzapper.ui.listeners.shuffleClick);
$('#player_loop').bind('click', sharkzapper.ui.listeners.loopClick);
$('#player_crossfade').bind('click', sharkzapper.ui.listeners.crossfadeClick);
- $('#addToLibraryBtn').bind('click', sharkzapper.ui.listeners.addToLibraryClick);
- $('#addToFavoritesBtn').bind('click', sharkzapper.ui.listeners.addToFavoritesClick);
- $('#radioSmileBtn').bind('click', sharkzapper.ui.listeners.radioSmileClick);
- $('#radioFrownBtn').bind('click', sharkzapper.ui.listeners.radioFrownClick);
+ $('#song_library').bind('click', sharkzapper.ui.listeners.addToLibraryClick);
+ $('#song_favorite').bind('click', sharkzapper.ui.listeners.addToFavoritesClick);
+ $('#song_smile').bind('click', sharkzapper.ui.listeners.radioSmileClick);
+ $('#song_frown').bind('click', sharkzapper.ui.listeners.radioFrownClick);
$('#player_options').bind('click',sharkzapper.ui.listeners.settingsClick);
$('#pin').bind('click',sharkzapper.ui.listeners.pinClick);
$('#songDetails').on('click','.songName, .artistName, .albumName',sharkzapper.ui.listeners.songInfoClick);
@@ -146,10 +146,10 @@ var sharkzapper = new (function SharkZapperPopup(debug){
$('#player_shuffle').unbind('click', sharkzapper.ui.listeners.shuffleClick);
$('#player_loop').unbind('click', sharkzapper.ui.listeners.loopClick);
$('#player_crossfade').unbind('click', sharkzapper.ui.listeners.crossfadeClick);
- $('#addToLibraryBtn').unbind('click', sharkzapper.ui.listeners.addToLibraryClick);
- $('#addToFavoritesBtn').unbind('click', sharkzapper.ui.listeners.addToFavoritesClick);
- $('#radioSmileBtn').unbind('click', sharkzapper.ui.listeners.radioSmileClick);
- $('#radioFrownBtn').unbind('click', sharkzapper.ui.listeners.radioFrownClick);
+ $('#song_library').unbind('click', sharkzapper.ui.listeners.addToLibraryClick);
+ $('#song_favorite').unbind('click', sharkzapper.ui.listeners.addToFavoritesClick);
+ $('#song_smile').unbind('click', sharkzapper.ui.listeners.radioSmileClick);
+ $('#song_frown').unbind('click', sharkzapper.ui.listeners.radioFrownClick);
$('#player_options').unbind('click',sharkzapper.ui.listeners.settingsClick);
$('#pin').unbind('click',sharkzapper.ui.listeners.pinClick);
$('#songDetails').off('click','.songName, .artistName, .albumName',sharkzapper.ui.listeners.songInfoClick);
@@ -185,24 +185,24 @@ var sharkzapper = new (function SharkZapperPopup(debug){
$(this).siblings("input").val("").focus();
},
addToFavoritesClick: function handle_addToFavoritesClick(e) {
- if ($('#addToFavoritesBtn').hasClass('selected')) {
+ if ($('#song_favorite').hasClass('selected')) {
sharkzapper.message.send({"command": "removeFromSongFavorites"});
} else {
sharkzapper.message.send({"command": "addToSongFavorites"});
}
},
addToLibraryClick: function handle_addToLibraryClick(e) {
- if ($('#addToLibraryBtn').hasClass('selected')) {
+ if ($('#song_library').hasClass('selected')) {
sharkzapper.message.send({"command": "removeFromLibrary"});
} else {
sharkzapper.message.send({"command": "addToLibrary"});
}
},
radioSmileClick: function handle_radioSmileClick(e) {
- sharkzapper.message.send({"command": "voteSong", "vote": ($('#radioSmileBtn').hasClass('selected')) ? 0 : 1});
+ sharkzapper.message.send({"command": "voteSong", "vote": ($('#song_smile').hasClass('selected')) ? 0 : 1});
},
radioFrownClick: function handle_radioFrownClick(e) {
- sharkzapper.message.send({"command": "voteSong", "vote": ($('#radioFrownBtn').hasClass('selected')) ? 0 : -1});
+ sharkzapper.message.send({"command": "voteSong", "vote": ($('#song_frown').hasClass('selected')) ? 0 : -1});
},
loopClick: function handle_loopClick(e) {
if ($('#player_loop').hasClass("active") && $('#player_loop').hasClass("one")) {
@@ -407,25 +407,25 @@ var sharkzapper = new (function SharkZapperPopup(debug){
}
if (status.playbackStatus.activeSong.hasOwnProperty('fromLibrary')) {
- $('#addToLibraryBtn').toggleClass('selected',Boolean(status.playbackStatus.activeSong.fromLibrary));
- if ($('#addToLibraryBtn').hasClass('selected')) {
- $('#addToLibraryBtn').attr('title', 'Remove from My Music');
+ $('#song_library').toggleClass('selected',Boolean(status.playbackStatus.activeSong.fromLibrary));
+ if ($('#song_library').hasClass('selected')) {
+ $('#song_library').attr('title', 'Remove from My Music');
} else {
- $('#addToLibraryBtn').attr('title', 'Add to My Music');
+ $('#song_library').attr('title', 'Add to My Music');
}
}
if (status.playbackStatus.activeSong.hasOwnProperty('isFavorite')) {
- $('#addToFavoritesBtn').toggleClass('selected',Boolean(status.playbackStatus.activeSong.isFavorite));
- if ($('#addToFavoritesBtn').hasClass('selected')) {
- $('#addToFavoritesBtn').attr('title', 'Remove from Favorites');
+ $('#song_favorite').toggleClass('selected',Boolean(status.playbackStatus.activeSong.isFavorite));
+ if ($('#song_favorite').hasClass('selected')) {
+ $('#song_favorite').attr('title', 'Remove from Favorites');
} else {
- $('#addToFavoritesBtn').attr('title', 'Add to Favorites');
+ $('#song_favorite').attr('title', 'Add to Favorites');
}
}
if (status.playbackStatus.activeSong.hasOwnProperty('autoplayVote')) {
- $('#radioSmileBtn').toggleClass('selected', status.playbackStatus.activeSong.autoplayVote == 1);
- $('#radioFrownBtn').toggleClass('selected', status.playbackStatus.activeSong.autoplayVote == -1);
+ $('#song_smile').toggleClass('selected', status.playbackStatus.activeSong.autoplayVote == 1);
+ $('#song_frown').toggleClass('selected', status.playbackStatus.activeSong.autoplayVote == -1);
}
if (status.playbackStatus.activeSong.hasOwnProperty('urls')) {
@@ -497,7 +497,7 @@ var sharkzapper = new (function SharkZapperPopup(debug){
$('#player_loop').toggleClass('one', status.queue.repeatMode == 2); //REPEAT_ONE
}
if (status.queue.hasOwnProperty('autoplayEnabled')) {
- $('#playerDetails_nowPlaying').toggleClass('radioOn', status.queue.autoplayEnabled);
+ $('body').toggleClass('radio', status.queue.autoplayEnabled);
}
if (status.queue.hasOwnProperty('previousSong')) {
if (status.queue.previousSong) {
Please sign in to comment.
Something went wrong with that request. Please try again.