Add com.palm.app.musicplayer

From 3.0.5 webOS Doctor
This commit is contained in:
Herman van Hazendonk committed 2021-12-22 11:15:42 +01:00
1 parent 5eb8001716
commit cc74f8e10b
233 files changed
+31347

No files matched your search

+1
View File
@@ -0,0 +1 @@
rvm use ruby-1.9.2-p180@palm
+5
View File
@@ -0,0 +1,5 @@
source "http://rubygems.org"
gem "eris"
gem "jasmine"
gem "rake"
+52
View File
@@ -0,0 +1,52 @@
GEM
remote: http://rubygems.org/
specs:
childprocess (0.2.0)
ffi (~> 1.0.6)
curb (0.7.15)
diff-lcs (1.1.2)
eris (0.0.10)
curb
erubis
json
rack
sinatra
thor
erubis (2.7.0)
ffi (1.0.9)
jasmine (1.0.2.1)
json_pure (>= 1.4.3)
rack (>= 1.1)
rspec (>= 1.3.1)
selenium-webdriver (>= 0.1.3)
json (1.5.3)
json_pure (1.5.3)
rack (1.3.2)
rake (0.9.2)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rubyzip (0.9.4)
selenium-webdriver (2.2.0)
childprocess (>= 0.1.9)
ffi (>= 1.0.7)
json_pure
rubyzip
sinatra (1.2.6)
rack (~> 1.1)
tilt (< 2.0, >= 1.2.2)
thor (0.14.6)
tilt (1.3.2)
PLATFORMS
ruby
DEPENDENCIES
eris
jasmine
rake
+33
View File
@@ -0,0 +1,33 @@
require 'jasmine'
namespace :jasmine do
task :server do
require 'jasmine'
require 'eris/lib/jasmine_config_overrides'
puts "your tests are here:"
puts " http://localhost:8888/"
Jasmine::Config.new.start_server
end
desc "Run continuous integration tests"
task :ci do
require 'jasmine'
require 'eris/lib/jasmine_config_overrides'
require "rspec"
require "rspec/core/rake_task"
require 'eris'
ENV['JASMINE_BROWSER'] = 'chrome'
RSpec::Core::RakeTask.new(:jasmine_continuous_integration_runner) do |t|
t.rspec_opts = ["--color", "--format", "progress"]
t.verbose = true
t.pattern = ["#{Eris::FILE_PATH}/eris/lib/jasmine_rspec_runner.rb"]
end
Rake::Task["jasmine_continuous_integration_runner"].invoke
end
end
desc "Run specs with local config"
task :jasmine => ['jasmine:server']
+16
View File
@@ -0,0 +1,16 @@
{
"id": "com.palm.app.musicplayer",
"version": "3.0.8000",
"vendor": "HP",
"type": "web",
"main": "index.html",
"title": "Music",
"icon": "icon.png",
"splashicon": "icon-256x256.png",
"miniicon": "images/notification-small.png",
"noWindow": true,
"uiRevision": 2,
"debug": false,
"removable": false,
"requiredPermissions": ["activities.manage", "applications.internal", "database", "database.internal", "networking", "networking.internal", "system", "services", "settings"]
}
Whitespace-only changes.
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash -e
source $HOME/.rvm/scripts/rvm && source .rvmrc
# install bundler if necessary
gem list --local bundler | grep bundler || gem install bundler || exit 1
# debugging info
echo USER=$USER && ruby --version && which ruby && which bundle
# conditionally install project gems from Gemfile
bundle check || bundle install || exit 1
IS_CI_BOX=true bundle exec rake jasmine:ci
@@ -0,0 +1,19 @@
{
"id":"com.palm.music.filterplaylists:1",
"owner":"com.palm.app.musicplayer",
"indexes":
[
{
"name": "playlistsByName",
"props":
[
{"name": "title", "collate": "primary"}
]
},
{
"name": "title",
"props": [{"name": "title"}]
}
],
"sync": true
}
@@ -0,0 +1,15 @@
{
"id":"com.palm.music.staticplaylists:1",
"owner":"com.palm.app.musicplayer",
"indexes":
[
{
"name": "playlistsByName",
"props":
[
{"name": "title", "collate": "primary"}
]
}
],
"sync": true
}
@@ -0,0 +1,52 @@
.superScrollAlpha
{
width: 36px;
border: solid 1px #000;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-webkit-border-bottom-left-radius: 10px;
-webkit-border-bottom-right-radius: 10px;
margin-top: 6px;
margin-bottom: 6px;
margin-right: 8px;
padding-top: 4px;
text-align: center;
}
.alphaLetter
{
padding: 0px 8px 0px 8px;
font-size: 14px;
font-weight: bold;
-webkit-transition: font-size 0.1s linear;
-webkit-transition: padding-top 0.1s linear;
/*background-color: blue;*/
}
.alphaOn
{
color: #000;
}
.alphaOff
{
color: #999;
}
.alphaGrow
{
border: solid 1px #000;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
background-color: #bbb;
color: #fff;
width: 70px;
font-size: 48px;
position: fixed;
right: 70px;
}
@@ -0,0 +1,223 @@
/*globals enyo, $L, event, console */
enyo.kind({
name: "AlphaPicker",
kind: "VFlexBox",
defaultKind: "Control",
published: {},
events: {onAlphaPicked:""},
className: "superScrollAlpha",
components: [
],
boolDragHoldPicked: false,
chrCurrAlpha: "",
create: function () {
try
{
this.inherited(arguments);
}
catch (err)
{
this.log("error: ", err);
}
},
ready: function () {
try
{
this.inherited(arguments);
}
catch (err)
{
this.log("error: ", err);
}
},
populate: function (objAlphaJumps)
{
this.log();
this.arIndexChars = enyo.g11n.Char.getIndexChars();
this.log(this.arIndexChars);
this.destroyControls();
this.createComponent({name: "alphaGrow", kind: "Control", className: "alphaGrow", showing: false});
var charAlpha;
for(var intIndexChar = 0; intIndexChar < this.arIndexChars.length; intIndexChar++)
{
charAlpha = this.arIndexChars[intIndexChar];
this.log("charAlpha: ", charAlpha);
var ctrlAlpha = this.createComponent({name: "ctrlAlpha_" + charAlpha, kind: "Control", content: charAlpha, flex: 1, className: "alphaLetter", onclick: "onClick_Alpha", ondragstart: "ondragstart_Alpha", ondragfinish: "ondragfinish_Alpha", ondrag: "ondrag_Alpha", ondrop: "ondrop_Alpha",ondragover: "ondragover_Alpha", ondragout: "ondragout_Alpha"});
if(objAlphaJumps[charAlpha] !== undefined)
{
ctrlAlpha.addClass("alphaOn");
}
else
{
ctrlAlpha.addClass("alphaOff");
}
}
this.contentChanged();
},
onClick_Alpha: function (sender, event)
{
this.log();
this.log(sender);
//this.log(event);
this.doAlphaPicked(sender.content);
},
onMouseDown_Alpha: function ()
{
this.log();
},
onMouseUp_Alpha: function ()
{
this.log();
},
onMouseOver_Alpha: function (sender, event)
{
this.log();
this.log(sender);
sender.addClass("alphaGrow");
},
onMouseOut_Alpha: function (sender, event)
{
this.log();
sender.removeClass("alphaGrow");
},
ondragstart_Alpha: function (sender, event)
{
this.log();
},
ondragfinish_Alpha: function (sender, event)
{
this.log();
},
ondrag_Alpha: function (sender, event)
{
this.log();
console.log(sender);
this.log(sender.name);
this.log(sender.content);
//this.$.alphaGrow.setShowing(true);
//this.$.alphaGrow.setContent(sender.content);
//this.$.alphaGrow.applyStyle("top",event.pageY + "px");
},
ondrop_Alpha: function (sender, event)
{
this.log();
this.doAlphaPicked(sender.content);
this.$.alphaGrow.setShowing(false);
},
ondragover_Alpha: function (sender, event)
{
if(this.chrCurrAlpha !== sender.content)
{
this.chrCurrAlpha = sender.content;
//enyo.asyncMethod(this, doAlphaPicked,sender.content)
//this.doAlphaPicked(sender.content);
this.timeDragOver = new Date();
this.boolDragHoldPicked = false;
}
var now = new Date();
this.log("time over: ", now - this.timeDragOver);
if(now - this.timeDragOver > 1000 && !this.boolDragHoldPicked)
{
enyo.asyncMethod(this, "doAlphaPicked", sender.content);
//this.doAlphaPicked(sender.content);
this.boolDragHoldPicked = true;
}
this.log();
console.log(sender);
this.log(sender.name);
this.log(sender.content);
this.$.alphaGrow.setShowing(true);
this.$.alphaGrow.setContent(sender.content);
this.$.alphaGrow.applyStyle("top",(event.pageY - 40) + "px");
return true;
},
ondragout_Alpha: function (sender, event)
{
this.log();
console.log(sender);
this.log(sender.name);
this.log(sender.content);
//if(this.chrCurrAlpha === sender.content)
//{
// this.$.alphaGrow.setShowing(false);
//}
},
raiseAlphaPicked: function (chrAlpha)
{
this.doAlphaPicked(chrAlpha);
}
});
@@ -0,0 +1,58 @@
/*globals enyo, $L, event */
enyo.kind({
name: "ItemGrid",
kind: "Item",
className: "enyo-item genre",
layout: "VFlexLayout",
published: {strImageURL: "", strItemText: "", strItemSubText: "", intThumbCount: 1, boolLandscape: true},
components: [
{name: "covers", className: "column cover", onclick: "onclick_imgMenu", components: [{className: "img", name: "imgContainer", showing: false, components: [{name: "imgThumb", kind: "Image", className: "thumb", onerror: "onError_imgThumb"}]}]},
{name: "lblItemText",className: "column name", content: "The Smashing Pumpkins"},
{name: "lblItemSubText",className: "column count", content: "2 genres, 23 tracks"}
],
create: function ()
{
this.inherited(arguments);
},
strImageURLChanged: function ()
{
if(this.strImageURL === undefined)
{
this.strImageURL = "";
}
this.$.imgContainer.setShowing(this.strImageURL !== "");
this.$.imgThumb.setSrc(this.strImageURL);
},
strItemTextChanged: function ()
{
this.$.lblItemText.setContent(this.strItemText);
},
strItemSubTextChanged: function ()
{
this.$.lblItemSubText.setContent(this.strItemSubText);
},
intTumbCountChanged: function ()
{
this.$.covers.addRemoveClass("many", this.intThumbCount > 1);
},
boolLandscapeChanged: function ()
{
// this.addRemoveClass("portrait", !this.boolLandscape);
},
onError_imgThumb: function (sender, event)
{
//this.log(sender.getSrc());
this.$.imgContainer.setShowing(false);
}
});
@@ -0,0 +1,39 @@
/*globals enyo, $L, event, Utilities, window, LibraryTools */
enyo.kind({
name: "listView",
kind: "VFlexBox",
events: {},
create: function () {
this.inherited(arguments);
},
highlightTrack: function (objTrackInfo)
{
this.log();
try
{
if(objTrackInfo)
{
this.log(objTrackInfo.intTrackIndex);
this.intCurrTrack = objTrackInfo.intTrackIndex;
this.intCurrTrackOrigIndex = objTrackInfo.intTrackOrigIndex;
this.strCurrTrackID = objTrackInfo.strTrackID;
this.strCurrTrackListQuery = objTrackInfo.strListQuery;
this.log(this.intCurrTrack);
}
if(this.boolViewActive)
{
this.$.listMedia.refresh();
}
}
catch(err)
{
this.log("error:" + err);
}
}
});
@@ -0,0 +1,347 @@
/*globals enyo, $L, event, Utilities, window, LibraryTools */
enyo.kind({
name: "listViewDetail",
kind: "listViewDraggable",
published: {boolViewActive: false, boolListRendered: false},
events: {onSetPlaybackList: "", onRequestMedia: "", onRequestCurrTrack: "", onListChanged: "", onListSorted: ""},
objCurr: {},
intCurrTrack: -1,
intCurrTrackOrigIndex: -1,
strCurrTrackID: "",
strSortMode: "album",
strCurrListID: "",
boolSortAsc: true,
listViewDetailType: "",//should be set by inheritor
_strListQuery: "",
//Drag & Drop related events
create: function () {
this.inherited(arguments);
this.intCurrTrack = -1;
this.intCurrTrackOrigIndex = -1;
this.boolSortAsc = true;
this.strSortMode = "album";
this.strCurrListID = Utilities.generateGuid();
},
renderList: function (obj)
{
this.log();
this.arSongs = [];
if(obj === undefined)
{
obj = this.objCurr;
}
if(obj === undefined)
{
return;
}
this.$.ctrlListViewHeader.setIntHeaderCount("");
//in case exiting msm mode
//if(this.objCurr != obj)
//{
this.strCurrListID = Utilities.generateGuid();
//}
this.objCurr = obj;
this.setStrHeaderTitle(obj.name);
this.$.listMedia.hide();
this.listQuery();
},
listQuery: function(inSender, inQuery){
this.log();
var objGetMediaRequest = {where: [{"prop": "isRingtone", "op": "=", "val": false},{"prop": this.listViewDetailType , "op": "=", "val": this.objCurr.name}], mediaType: "song", callback: enyo.bind(this, "gotSongs")};
switch(this.listViewDetailType)
{
case "genre":
objGetMediaRequest.desc = !this.boolSortAsc;
objGetMediaRequest.order = this.strSortMode;
break;
case "album":
objGetMediaRequest.where.push({"prop": "albumArtist", "op": "=", "val": this.objCurr.artist});
objGetMediaRequest.order = "sortKey.trackAndDisc";
this.strSortMode = "pos";
break;
case "artist":
objGetMediaRequest.order = "sortKey.albumDiscAndTrack";
this.strSortMode = "pos";
break;
default:
return;
}
if(this.strDbNext !== "")
{
objGetMediaRequest.page = this.strDbNext;
}
this.log("**** raising doRequestMedia");
this.log("**** objGetMediaRequest: ", objGetMediaRequest);
this.doRequestMedia(objGetMediaRequest);
},
refreshList: function ()
{
this.log();
this.$.listMedia.refresh();
this.doRequestCurrTrack();
},
resizeList: function ()
{
this.log();
this.$.listMedia.resized();
},
setStrHeaderTitle: function(name){
this.$.ctrlListViewHeader.setStrHeaderTitle(name);
},
gotSongs: function (inResponse, inRequest)
{
/*TODO: set strSortMode to whatever its original value is for each list*/
try
{
this.log("**** gotSongs");
this.log("count: " + inResponse.results.length);
if(inResponse.results.length > 0)
{
this.log("--: " + inResponse.results[0].title);
if(inRequest.objGetMediaRequest.page)
{
this.arSongs = this.arSongs.concat(inResponse.results);
}
else
{
this.arSongs = inResponse.results.slice(0);
}
}
this.log("inResponse.count: " + inResponse.count);
if(inResponse.next)
{
this.log("inResponse.next: " + inResponse.next);
this.strDbNext = inResponse.next;
this.listQuery();
}
else
{
this.strDbNext = "";
this.$.ctrlListViewHeader.setIntHeaderCount(this.arSongs.length);
this._strListQuery = inRequest.json + inResponse.count;
if(this.arSongs.length > 0)
{
//this.$.lblNumber.setStyle("width: " + (this.arSongs.length +'').length * 0.8 + "em");
//this.$.content.show();
this.strCurrAlbum = "";
this.$.listMedia.show();
this.$.listMedia.resized();
this.$.listMedia.punt();
this.doRequestCurrTrack();
if(this.objCurr.boolForcePlay)
{
this.onclick_listMedia(null, 0);
this.objCurr.boolForcePlay = false;
}
//this.$.empty.hide();
}
else
{
//this.$.content.hide();
this.$.listMedia.punt();
//this.$.listMedia.hide();
//this.doEnableControls(false, false);
if(this.$.txtResults && this.objCurr.boolShowContent)
{
this.$.txtResults.setContent($L("No " + this.listViewDetailType + " found"));
}
}
}
this.boolListRendered = true;
}
catch (err)
{
this.log("**** gotSongs error: " + err);
}
},
onclick_Sort: function(objSender, event){
try
{
var objFirstSong = this.arSongs[event.rowIndex];
this.log("onclick_Sort: " + objSender.name + " - " + this.boolSortAsc);
//this.$.txtResults.setContent("onclick_Sort<br/>" + objSender.name + "<br/>");
this.log("curr sort mode " + this.strSortMode);
var boolNewSortAsc;
var arAlbumSongs = this.arSongs;
//pull out the specific album if in artist mode
var endIndex;
if(this.listViewDetailType === "artist"){
for(endIndex = event.rowIndex; endIndex<this.arSongs.length; endIndex++){
this.log(endIndex, this.arSongs[endIndex]);
if(this.arSongs[endIndex].album !== objFirstSong.album){
break;
}
}
arAlbumSongs = this.arSongs.slice(event.rowIndex, endIndex);
}
//pull out sortType from name ***MUST BE lblSortSong lblSortPos lblSortArtist or lblSortAlbum
var sortType = objSender.name.substr(7).toLowerCase();
if(sortType === "song")
{
sortType = "title";
}
if(sortType !== "title" && sortType !== "pos" && sortType !== "artist" && sortType !== "album")
{
return;
}
boolNewSortAsc = this.strSortMode !== sortType || (this.strSortMode === sortType && !this.boolSortAsc);
this.strSortMode = sortType;
this.boolSortAsc = boolNewSortAsc;
this.log("set to " + this.boolSortAsc);
this.resetMusicListHeaders();
objSender.addClass("sorted");
objSender.addRemoveClass("asc", boolNewSortAsc);
objSender.addRemoveClass("desc", !boolNewSortAsc);
if(this.listViewDetailType === "genre")
{
this.listQuery();
}
else
{
LibraryTools.sort(this.strSortMode, arAlbumSongs, boolNewSortAsc);
//putted sorted list back into arSongs
if(this.listViewDetailType === "artist")
{
var args = [event.rowIndex, endIndex-event.rowIndex].concat(arAlbumSongs);
Array.prototype.splice.apply(this.arSongs, args);
}
else
{
this.arSongs = arAlbumSongs;
}
this.$.listMedia.refresh();
}
this.strCurrListID = Utilities.generateGuid();
this.doListChanged(this.arSongs, this.intCurrTrackOrigIndex);
}
catch (err)
{
this.log("**** onclick_Sort error: " + err);
}
},
updateUISongInfo: function(objSong){
if(typeof objSong === "undefined"){
return;
}
if (Utilities.isNumeric(objSong.track.position) && objSong.track.position > 0)
{
this.$.songTrack.setContent(objSong.track.position);
}
else
{
this.$.songTrack.setContent("-");
}
this.$.songTitle.setContent(objSong.title);
},
resetMusicListHeaders: function ()
{
for(var intChildIndex = 0; intChildIndex < this.$.header.children.length; intChildIndex++)
{
this.$.header.children[intChildIndex].addClass("column");
this.$.header.children[intChildIndex].removeClass("sorted");
this.$.header.children[intChildIndex].removeClass("asc");
this.$.header.children[intChildIndex].removeClass("desc");
}
},
onclick_listMedia: function (sender, event)
{
this.log(event.rowIndex);
var intClickIndex = event.rowIndex;
var objSetPlaybackList = {arSetPlaybackList : this.arSongs,
intStartTrackIndex : intClickIndex,
intStartTrackTime : 0,
strOriginListID : this.strCurrListID,
strListType : Utilities.capitalize(this.listViewDetailType),
strListText : this.objCurr.name,
strListSubText : "",
strArtist : this.objCurr.artist,
strListQuery : (this._strListQuery + this.strSortMode),
arThumbnails : this.objCurr.thumbnails};
this.doSetPlaybackList(objSetPlaybackList);
}
});
@@ -0,0 +1,328 @@
/*globals enyo, $L, event, Utilities, window */
enyo.kind({
name: "draggableItem",
kind: "Item",
onmouserelease: "itemMouserelease", ondragstart: "itemDragStart", ondragfinish: "itemDragFinish", ondrag: "onDrag_itemMedia", ondrop: "onDrop_itemMedia"
});
enyo.kind({
name: "draggableSong",
kind: "draggableItem",
onmousehold: "songMousehold"
});
enyo.kind({
name: "draggableAlbum",
kind: "draggableItem",
onmousehold: "albumMousehold"
});
enyo.kind({
name: "draggableAlbumGroup", //from listViewAlbums
kind: "draggableItem",
onmousehold: "albumGroupMousehold"
});
enyo.kind({
name: "draggableArtist",
kind: "draggableItem",
onmousehold: "artistMousehold"
});
enyo.kind({
name: "draggableGenre",
kind: "ItemGrid",
onmousehold: "genreMousehold", onmouserelease: "itemMouserelease", ondragstart: "itemDragStart", ondragfinish: "itemDragFinish", ondrag: "onDrag_itemMedia", ondrop: "onDrop_itemMedia"
});
enyo.kind({
name: "listViewDraggable",
kind: "listView",
events: {onAddToPlaylist: "", onItemDrag: "", onItemShowAvatar: "", onItemShowAvatarIcon: ""},
intJumpRowOffset: 0,
boolDragHold: false,
boolDragItem: false,
boolDraggingList: false,
dragObjType: null,
arItems: [], //will take on array of draggable items
albumGroup: false,
scrolling: false, //will only allow dragging when not scrolling
//Drag & Drop related events
create: function () {
this.inherited(arguments);
},
ready: function(){
this.inherited(arguments);
if(this.$.listMedia){
this.$.listMedia.$.scroller.scrollStop = enyo.bind(this, function(){this.setScrolling(false);});
this.$.listMedia.$.scroller.scrollStart = enyo.bind(this, function(){this.setScrolling(true);});
}
},
setScrolling: function(bool){
this.scrolling = bool;
},
setPlayingStyles: function(id, itemMedia, strListQuery){
if(id === this.strCurrTrackID)
{
itemMedia.addRemoveClass("playingHere", (this.strCurrTrackListQuery === strListQuery));
itemMedia.addClass("playing");
}
else
{
itemMedia.removeClass("playingHere");
itemMedia.removeClass("playing");
}
},
callAddToPlaylist: function (intIndex, strPlaylistID, addType, callback)
{
this.log();
var objAddToPlaylist;
var objItem = this.arItems[intIndex];
switch(addType){
case "album": //strMediaFilter should be name when in albums view
if(this.albumGroup){
objAddToPlaylist = {strMediaType: "album", strMediaFilter: objItem.name, strMediaFilterSub: objItem.artist, strPlaylistID: strPlaylistID};
}
else
{
objAddToPlaylist = {strMediaType: "album", strMediaFilter: objItem.album, strMediaFilterSub: objItem.albumArtist, strPlaylistID: strPlaylistID, callback: callback};
}
break;
case "artist":
case "genre":
objAddToPlaylist = {strMediaType: addType, strMediaFilter: objItem.name, strPlaylistID: strPlaylistID};
break;
default: //case "song":
objAddToPlaylist = {strMediaType: "song", arTracks: [Utilities.getPlaylistSongData(objItem)], strPlaylistID: strPlaylistID, callback: callback};
break;
}
this.log("**** raising doAddToPlaylist for clicked song");
this.doAddToPlaylist(objAddToPlaylist);
},
songMousehold: function(sender, event){
this.dragObjType = "song";
this.arItems = this.arSongs;
this.itemMousehold(sender, event);
},
albumMousehold: function(sender, event){
this.dragObjType = "album";
this.arItems = this.arSongs;
this.albumGroup = false;
this.itemMousehold(sender, event);
},
albumGroupMousehold: function(sender, event){
this.dragObjType = "album";
this.arItems = this.arAlbums;
this.albumGroup = true;
this.itemMousehold(sender, event);
},
artistMousehold: function(sender, event){
this.dragObjType = "artist";
this.arItems = this.arArtists;
this.itemMousehold(sender, event);
},
genreMousehold: function(sender, event){
this.dragObjType = "genre";
this.arItems = this.arGenres;
this.itemMousehold(sender, event);
},
itemMousehold: function(sender, event)
{
this.log();
if(this.boolEditMode === undefined)
{
this.boolEditMode = false;
}
if(this.boolEditMode || this.scrolling)
{
return false;
}
var intDragIndex = this.getDragIndex(sender, event);
this.setItemHighlighted(true);
var strDragThumb = "";
var objItem = this.arItems[intDragIndex];
if(objItem && window.PalmSystem)
{
var objThumb = Utilities.getItemThumb(objItem.thumbnails, 88);
if(objThumb)
{
if(objThumb.intThumbsTotalCount > 0)
{
strDragThumb = objThumb.strThumbURL;
}
}
}
this.boolDragHold = true;
this.doItemDrag(event);
this.doItemShowAvatar(true, strDragThumb);
return false;
},
itemMouserelease: function()
{
this.log();
if (!this.boolDragItem)
{
this.setItemHighlighted(false);
this.doItemShowAvatar(false);
this.dragObjType = null;
}
this.boolDragHold = false;
return true;
},
itemDragStart: function(sender, event)
{
if(this.boolDragHold && !this.boolEditMode)
{
var intDragIndex = this.getDragIndex(sender, event);
var objItem = this.arItems[intDragIndex];
//event.rowIndex is sometimes off
if(objItem === undefined){
this.log("Given an invalid dragIndex");
this.itemMouserelease();
return;
}
this.boolDraggingList = true;
this.boolDragItem = true;
switch(this.dragObjType)
{
case "song":
event.dragInfo = {dragItemIndex: intDragIndex, addType: "song", addTitle: objItem.title};
break;
case "album":
if(this.albumGroup)
{
event.dragInfo = {dragItemIndex: intDragIndex, addType: "album", addTitle: objItem.name, boolShowIcon: false};
}
else
{
event.dragInfo = {dragItemIndex: intDragIndex, addType: "album", addTitle: objItem.album, boolShowIcon: false};
}
break;
case "artist":
event.dragInfo = {dragItemIndex: intDragIndex, addType: "artist", addTitle: objItem.name, boolShowIcon: false};
break;
case "genre":
event.dragInfo = {dragItemIndex: intDragIndex, addType: "genre", addTitle: objItem.name, boolShowIcon: false};
break;
}
this.setItemHighlighted(true);
this.doItemDrag(event);
return true;
}
},
onDrag_itemMedia: function (sender, event)
{
//this.log();
if(event.dragInfo)
{
this.doItemShowAvatarIcon(event.dragInfo.boolShowIcon);
}
if (this.boolDragItem)
{
this.doItemDrag(event);
}
},
itemDragFinish: function(sender, event)
{
//NOTE: listViewPlaylist has it's own
this.log();
this.boolDraggingList = false;
if (this.boolDragItem) {
event.dragInfo.boolShowIcon = false;
if(event.dragInfo.strPlaylistID)
{
this.callAddToPlaylist(event.dragInfo.dragItemIndex, event.dragInfo.strPlaylistID, event.dragInfo.addType);
}
if(this.dragObjType === "genre"){
this.$.listMedia.prepareRow(Math.floor(event.dragInfo.dragItemIndex/this.intColumns));
}else{
this.$.listMedia.prepareRow(event.dragInfo.dragItemIndex);
}
this.setItemHighlighted(false);
this.doItemShowAvatarIcon(false);
this.doItemShowAvatar(false);
this.boolDragItem = false;
this.dragObjType = null;
}
//return true;
},
setItemHighlighted: function(inHighlight)
{
if(this.$.itemMedia){
this.$.itemMedia.addRemoveClass("selected", inHighlight);
}
},
onDrop_itemMedia: function (sender, event)
{
this.log(event.keys);
if(this.boolDraggingList)
{
this.boolSuspendClick = true;
}
return true;
},
getDragIndex: function(sender, event){
if(this.dragObjType === "genre"){
return (event.rowIndex * this.intColumns) + sender.intColumnIndex;
}else{
return event.rowIndex + this.intJumpRowOffset;
}
}
});
@@ -0,0 +1,7 @@
.truncating-text {
max-width:346px;
}
.landscape .truncating-text {
max-width:590px;
}
@@ -0,0 +1,119 @@
/*globals enyo, $L, event */
enyo.kind({
name: "ctrlListViewHeader",
kind: "Toolbar",
className: "enyo-toolbar enyo-toolbar-light list-header",
pack: "justify",
layoutKind: "HFlexLayout",
events: {onSearch_Header: "", onEditMode: "", onSetMultiSelect: "" },
published: {strHeaderTitle: $L("Songs"), intHeaderCount: -1, boolShowDragHandle: false, boolShowEditPlaylist: false, boolShowMultiSelect: false, boolShowSearchBtn: true},
components: [
{name: "dragHandle", slidingHandler: true, kind: "GrabButton", showing: false},
{kind: "Control", layoutKind: "HLayout", className: "list-header-title-layout",components:[
{name: "lblHeaderTitle", content: "", className: "title enyo-text-ellipsis truncating-text",flex:1},
{name: "lblSongTitleCount", content: "", className: "count", showing: false}
]},
{name: "buttonContainer", className: "buttons", kind: "Control", layoutKind: "HFlexLayout",components: [
{name: "btnEditPlaylist", kind: "IconButton", icon: "images/btn_edit.png", showing: false, onclick: "doEditMode"},
{name: "btnMultiSelect", kind: "IconButton", caption: $L("MS"), /*icon: "images/btn_editPlaylist.png",*/ showing: false, onclick: "doSetMultiSelect"},
{name: "btnGetSearch", kind: "IconButton", icon: "images/btn_search.png", onclick: "onClick_btnGetSearch", showing: true}
]},
{name: "SearchInput", kind: "SearchControl", onSearch: "doSearch_Header", onClose: "onClose_SearchInput", TypeDownSearch: true, showing: false}
],
boolShowSearch: false,
drawHeader: function()
{
this.$.lblHeaderTitle.setContent(this.strHeaderTitle);
if(this.intHeaderCount >= 0)
{
this.$.lblSongTitleCount.setContent("(" + this.intHeaderCount + ")");
this.$.lblSongTitleCount.show();
}
else
{
this.$.lblSongTitleCount.hide();
}
this.$.dragHandle.setShowing(this.boolShowDragHandle);
this.$.btnEditPlaylist.setShowing(this.boolShowEditPlaylist);
this.$.btnMultiSelect.setShowing(this.boolShowMultiSelect);
this.$.btnGetSearch.setShowing(this.boolShowSearchBtn);
},
strHeaderTitleChanged: function ()
{
this.drawHeader();
},
intHeaderCountChanged: function ()
{
this.drawHeader();
},
boolShowDragHandleChanged: function ()
{
this.drawHeader();
},
boolShowEditPlaylistChanged: function ()
{
this.drawHeader();
},
boolShowMultiSelectChanged: function ()
{
this.drawHeader();
},
boolShowSearchBtnChanged: function ()
{
this.drawHeader();
},
clearSearchInput: function (boolForceRefresh)
{
this.$.SearchInput.clearSearchInput(boolForceRefresh);
this.onClose_SearchInput();
},
onClick_btnGetSearch: function (sender, event)
{
this.boolShowSearch = true;
this.$.SearchInput.show();
this.$.buttonContainer.hide();
this.log(this.boolShowSearch);
this.$.SearchInput.focusSearch();
},
onClose_SearchInput: function (sender, event)
{
this.boolShowSearch = false;
this.$.SearchInput.hide();
this.$.buttonContainer.show();
},
onClick_btnEditPlaylist: function (sender, event)
{
this.doEditMode();
}
});
@@ -0,0 +1,132 @@
/*globals enyo, $L, event */
enyo.kind({
name: "ctrMediaItemMenu",
kind: "Menu",
events: {onMenuClick: "", onRequestPlaylists: ""},
published: {strMediaType: "" },
components: [
{name: "mitemPlay", caption: $L("Play"), onclick: "onMenuItemClick"},
{name: "mitemView", caption: $L("View"), onclick: "onMenuItemClick"},
{name: "mitemAddToPlaylist", caption: $L("Add to Playlist"), components: [
]}
],
create: function ()
{
this.inherited(arguments);
this.local_play_Templ = new enyo.g11n.Template($L("Play #{strMediaType}"));
this.local_view_Templ = new enyo.g11n.Template($L("View #{strMediaType} Tracks"));
this.local_addToPlayList_Templ = new enyo.g11n.Template($L("Add #{strMediaType} to Playlist"));
},
ready: function ()
{
this.inherited(arguments);
},
drawMenu: function ()
{
this.log();
this.$.mitemPlay.setCaption(this.local_play_Templ.evaluate({strMediaType: this.strMediaType}));
this.$.mitemView.setCaption(this.local_view_Templ.evaluate({strMediaType: this.strMediaType}));
this.$.mitemAddToPlaylist.setCaption(this.local_addToPlayList_Templ.evaluate({strMediaType: this.strMediaType}));
this.getPlaylists();
},
openMenu: function ()
{
this.intClickIndex = event.rowIndex;
this.$.mitemAddToPlaylist.setOpen(false);
this.$.client.setScrollTop(0);
this.openAtEvent(event, {left: 0});
return true;
},
getPlaylists: function () // gets list of playlists for menu
{
this.log();
var objGetPlaylistsRequest = {where: [], playlistType: "static", callback: enyo.bind(this, "gotPlaylists")};
this.log("**** raising doRequestMedia");
this.log("**** objGetMediaRequest:", objGetPlaylistsRequest);
this.doRequestPlaylists(objGetPlaylistsRequest);
},
gotPlaylists: function (inResponse)
{
this.log();
try
{
if(inResponse.results)
{
this.arPlaylists = inResponse.results.slice(0);
this.$.mitemAddToPlaylist.destroyControls();
if(this.arPlaylists.length > 0)
{
for(var intPlaylist = 0 ; intPlaylist < this.arPlaylists.length; intPlaylist++)
{
this.log("Checking item ", intPlaylist);
var mitemPlaylist;
if(this.arPlaylists[intPlaylist] !== undefined)
{
this.log("Adding item ", intPlaylist);
mitemPlaylist = this.$.mitemAddToPlaylist.createComponent({kind: "MenuItem", caption: this.arPlaylists[intPlaylist].name, onclick: "onMenuItemClick", plid: this.arPlaylists[intPlaylist]._id });
}
else
{
mitemPlaylist = this.createComponent({caption: ""});
}
mitemPlaylist.setOwner(this);
//mitemPlaylist.setParent(this.$.mitemAddToPlaylist);
//mitemPlaylist.setContainer(this.$.mitemAddToPlaylist);
}
}
this.$.mitemAddToPlaylist.contentChanged();
}
}
catch (err)
{
this.log("error: ", err);
}
},
onMenuItemClick: function (sender, event)
{
this.doMenuClick(sender);
}
});
@@ -0,0 +1,21 @@
.searchInput
{
background: white;
min-height: 36px;
height: 36px;
margin:8px 12px 8px 0px;
}
.searchInput .enyo-input
{
min-height: 29px;
font-size: 14px;
}
.searchInput .enyo-fancy-input-inner
{
padding-top: 2px;
}
@@ -0,0 +1,124 @@
/*globals enyo, $L, event */
enyo.kind({
name: "SearchControl",
kind: "Control",
className: "search",
published: {TypeDownSearch: false},
events: {onSearch:"", onClose: ""},
components: [
{
align: "center",
name: "txtSearch",
kind: "RoundedInput",
hint: "",
//hint: $L("Search"),
autocorrect: false,
spellcheck: false,
changeOnInput: true,
disabled: false,
keypressInputDelay: 0.5,
//onkeypress: "onkeypress_SearchInput",
onchange: "onChangeSearch",
components: [
{name: "imgSearchClose", kind: "Control", className:"close", onclick: "onClickClose"}
]
}
],
boolClearSearch: false,
clearSearchInput: function (boolForceRefresh)
{
this.log();
if(boolForceRefresh === undefined)
{
boolForceRefresh = true;
}
this.$.txtSearch.setValue("");
if(boolForceRefresh)
{
this.doSearch("");
}
//this.boolClearSearch = false;
},
focusSearch: function ()
{
this.$.txtSearch.setDisabled(false);
this.$.txtSearch.forceFocus();
},
runSearch: function ()
{
this.log(this.$.txtSearch.getValue());
//this.boolClearSearch = true;
this.doSearch(this.$.txtSearch.getValue());
},
onClickSearch: function ()
{
this.log(this.$.txtSearch.getValue());
},
onClickClose: function ()
{
this.log();
this.doClose();
this.$.txtSearch.forceBlur();
this.$.txtSearch.setDisabled(true);
this.clearSearchInput(true);
//this.$.imgSearchClose.hide();
//this.log(this.$.txtSearch.getValue());
this.$.txtSearch.setValue("");
this.doSearch("");
},
/*
onkeypress_SearchInput: function (sender, event)
{
this.log(event.keyCode);
if(event.keyCode === 13)
{
this.runSearch();
//this.$.txtSearch.forceBlur();
}
},*/
onChangeSearch: function (sender, event)
{
this.log(this.$.txtSearch.getValue());
/*
if(this.$.txtSearch.getValue() !== "")
{
this.$.imgSearchClose.show();
}
else
{
this.$.imgSearchClose.hide();
}
*/
if(this.TypeDownSearch)
{
this.runSearch();
}
}
});
+732
View File
@@ -0,0 +1,732 @@
/* To see framework overrides, search for FWOV */
body {
position:relative;
}
.wrapper,
.enyo-bg {
/* background:url(../images/bg_wrapper.png) repeat 50% 50%;*/
}
/* nav side */
.navigation {
background-color: #e5e5e5;
border-right: 1px solid #c3c3c3;
}
.navigation .playing {
position: relative;
margin-bottom:-5px;
}
.navigation .playing .cover {
background:url(../images/bg_item_cover.png) no-repeat 0 0;
width: 52px;
height: 52px;
-webkit-box-sizing:content-box;
text-align:center;
padding: 0;
}
.navigation .playing .cover .img {
/*background: #000;*/
margin: 5px;
height: 38px;
width: 38px;
overflow: hidden;
}
.navigation .playing .info {
margin: 5px 4px 0 5px;
}
.navigation .playing .info div {
width: 100%;
line-height: 1.35em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.navigation .playing .label {
font-size: 18px;
font-weight: bold:
}
.navigation .playing .title {
font-size: 14px;
}
.navigation .library {
padding-top: 10px;
}
.navigation .enyo-divider-caption {
text-transform:uppercase;
font-size:14px;
}
.navigation .enyo-item {
line-height: 36px;
padding: 8px;
font-size: 18px;
font-weight: normal;
}
.navigation .enyo-item.active {
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(218, 235, 251, 0.398438)), to(rgba(197, 224, 249, 0.398438)));
}
.navigation .enyo-item.editing {
background:url(../images/bg_navigation_item_edit.png) repeat-x 0 0;
border-color:#000;
color:white;
}
.navigation .enyo-item.songs,
.navigation .enyo-item.enyo-first {
border-top:0;
}
.navigation .enyo-item.genres,
.navigation .enyo-item.enyo-last {
border-bottom:0;
}
.navigation .enyo-item .icon {
width:28px;
height:36px;
margin:0 8px 0 0;
background:url(../images/bg_navigation_item_icon_light.png) no-repeat 0 0;
}
.navigation .enyo-item .name {
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
max-length:200px;
}
.navigation .enyo-item .delete {
height:32px;
width:32px;
background:url(../images/btn_playlist_delete.png) no-repeat 0 -32px;
}
.navigation .enyo-item.artists .icon {
background-position:0 -36px;
}
.navigation .enyo-item.albums .icon {
background-position:0 -72px;
}
.navigation .enyo-item.genres .icon {
background-position:0 -108px;
}
.navigation .enyo-item.playlist .icon {
background-position:0 -144px;
}
.navigation .enyo-item.playlist.readonly .icon {
background-position:0 -180px
}
/* view */
.view,
.view .enyo-bg {
background:#f7f7f7 url(../images/bg_view.png) repeat-x 0 100%;
}
.view .empty {
padding: 30px;
}
.view .empty .content {
color:rgba(0,0,0,0.6);
font-size:16px;
width:380px;
margin:0 0 15px;
text-align:center;
}
.view .empty .content .heading {
font-size:20px;
margin:0 0 15px 0;
}
.view .list {
height:100%;
background:url(../images/bg_list.png) repeat-x 0 0;
}
.view .list-header .buttons {
margin: -3px 7px 0px;
}
.view .list-header .buttons .enyo-button {
-webkit-border-image:none;
background:transparent;
}
.view .list-header .search {
margin:-4px 0;
}
.view .list-header .search .close {
background:url(../images/btn_search_close.png) no-repeat 50% 50%;
height:24px;
width:24px;
margin-right:-5px;
}
/*
.view .enyo-header .title {
font-weight:bold;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
max-width:346px;
}
*/
.list-header-title-layout {
margin-left: 5px;
}
.list-header-title-layout .count{
padding:0 13px 0 8px;
}
.landscape .view .enyo-header .title {
max-width:590px;
}
.view .enyo-header .count {
color:#787878;
padding:0 13px 0 8px;
}
.view .divider {
background:rgba(0,0,0,0.04);
border-top:1px solid;
border-bottom:1px solid;
color:rgba(0,0,0,0.6);
font-size:16px;
border-color:rgba(0,0,0,0.3);
}
.view .divider.first {
border-top:0;
}
.view .divider.first div:first-child{
padding-left:36px;
}
.view .divider .column {
border:1px solid;
border-bottom:0;
border-top-color:rgba(255,255,255, 0.5);
border-left-color:rgba(255,255,255, 0.5);
border-right-color:rgba(0,0,0,0.3);
line-height:30px;
height:30px;
padding:0 12px;
text-transform:capitalize
}
.view .divider .column:last-child {
border-right:0;
}
.view .divider .column.number {
min-width:1.6em;
text-align:right;
}
.view .divider .column.sorted {
background:url(../images/bg_divider_sorted.png) repeat-x 0 0;
}
.view .enyo-item {
border-width:2px;
border-color:transparent;
font-size:14px;
padding:7px 2px;/* FWOR */
white-space:nowrap;
background-color: #f7f7f7;
}
.view .enyo-item.ArtistDetailMedia
{
padding:0px 2px;
border: 0px;
}
.view .enyo-item.enyo-held,
.view .enyo-item.playing,
.view .enyo-item.deleted,
.view .enyo-item.selected {
padding:7px 0px;
}
.view .enyo-item.odd {
/*background-color:rgba(255,255,255,0.4);*/
background-color: #f2f2f2;
}
.view .enyo-item .column {
overflow:hidden;
line-height:26px;
padding:0 12px;
text-overflow:ellipsis;
}
.view .enyo-item .count {
color:#787878;
text-transform:capitalize;
font-size:12px;
}
.view .enyo-item .cover {
background:url(../images/bg_item_cover.png) no-repeat 0 0;
width:52px;
height:52px;
-webkit-box-sizing:content-box;
text-align:center;
padding:0;
}
.view .enyo-item .cover.many {
background-position:0 -52px;
}
.view .enyo-item .cover .img {
height:38px;
margin:7px;
width:38px;
line-height:34px;
white-space:nowrap;
background-position:50% 50%;
background-color:#000;
background-repeat:no-repeat;
}
.view .enyo-item .cover .img img {
vertical-align:middle;
}
.view .song {
font-size:16px;
}
.view .song.playingHere,
.view .song.selected,
.view .song.deleted {
-webkit-border-image:url(../images/bg_item_selected.png) 2 2 repeat;
}
.view .song.playing .column:first-child {
/*background: url(../images/bg_song_playing.png) no-repeat 8px 50%;*/
background: url(../images/Music_Note_Blue.png) no-repeat 3px 50%;
height: 26px;
}
.view .song .number {
font-size:14px;
padding:0 12px;
min-width: 1.8em;
text-align:right;
}
.view .song .title {
/* padding:0 4px 0 12px; FWOR */
}
.view .song .delete {
position:absolute;
right:5px;
margin:-3px 0 0 0;
height:32px;
width:32px;
background:url(../images/btn_playlist_delete.png) no-repeat 0 0;
}
.view .song.deleted .delete {
background-position: 0 -64px;
}
.view .editing .song .column.artist {
padding:0 22px;
}
/* single artist album header */
.view .header.album {
padding:0;
border-top:1px solid;
border-bottom:1px solid;
border-top-color:rgba(0,0,0,0.2);
border-bottom-color:rgba(0,0,0,0.3);
}
.view .header.album.first {
border-top-width:0px;
}
.view .header.album .content {
-webkit-border-image:url(../images/bg_artist_album.png) 7 5 repeat;
border-width:7px 5px;
}
.view .header.album .cover {
background:url(../images/bg_navigation_playing_cover.png) no-repeat 0 0;
width:64px;
height:64px;
margin:0 7px 0 3px;
display:inline-block;
-webkit-box-sizing:content-box;
text-align:center;
padding:0;
}
.view .header.album .cover .img {
margin:5px;
height:54px;
width:54px;
line-height:48px;
white-space:nowrap;
background-color:#000;
vertical-align:middle;
}
.view .header.album .cover .img img {
vertical-align:middle;
}
.view .header.album .name {
font-size:20px;
padding:0 0 4px;
color:#000;
}
.view .header.album .count {
padding:0;
}
.view .artist {
padding:3px 2px;
}
.view .artist.enyo-held,
.view .artist.selected {
-webkit-border-image: url(../images/bg_artist_selected.png) 2 1 repeat;
padding:3px 0;
}
.view .artist .column {
line-height:1.3em;
vertical-align: middle;
}
.view .artist .cover {
margin:-4px 0;
}
.view .artist .name {
font-size:18px;
color:#000;
}
.view .artist .count {
padding:5px 0 0 0;
}
.view .album {
padding:3px 2px;
}
.view .album.enyo-held,
.view .album.selected {
-webkit-border-image: url(../images/bg_artist_selected.png) 2 1 repeat;
padding:3px 0;
}
.view .album.selected.header {
-webkit-border-image: url(../images/bg_header_selected.png) 2 1 repeat;
padding: 0;
border-width: 0px 0px 1px;
}
.view .header.album.selected .content {
-webkit-border-image: none;
border-width: 0px;
padding:7px 5px;
}
.view .album .column {
line-height:1.3em;
}
.view .album .name {
font-size:18px;
color:#000;
}
.view .album .cover {
margin:-4px 0;
}
.view .album .count {
padding:6px 0 0 0;
}
.view .genre {
margin: 20px 0px 0px 20px; /*TEMP*/
text-align:center;
padding: 0;
width: 150px; /*TEMP*/
}
.portrait .view .genre {
margin: 20px 0px 0px 18px; /*TEMP*/
width: 120px;
}
.view .genre .column {
padding:0;
line-height:1.3em;
}
.view .genre .cover {
background:url(../images/bg_genre_cover.png) no-repeat 0 0;
height:102px;
width:102px;
margin:0 auto 10px auto;
}
.view .genre .cover.many {
background-position:0 -102px;
}
.view .genre .cover .img {
height:88px;
width:88px;
line-height:81px;
}
.view .genre .name {
font-size:16px;
}
/* controls */
.controls {
background:url(../images/bg_controls.png) repeat-x 0 0;
height:80px;
color:#1c1c1c;
font-size:14px;
border:0;
}
.controls .current {
width: 100%;
max-width: 580px;
min-width: 255px;
}
.controls .info {
margin:0 6px;
text-align:center;
height: 32px;
font-size: 14px;
line-height: 1.3em;
}
.controls .info div {
font-weight:bold;
overflow:hidden;
text-overflow:ellipsis;
width: 100%;
white-space:nowrap;
}
.controls .info .title {
font-weight:normal;
}
.controls .progress {
font-size:12px;
line-height:1em;
margin:6px 0 0 0;
padding:8px 0 6px;
color:#000;
max-width:580px;
min-width:255px;
width:100%;
}
.controls .progress .label {
width:65px;
overflow:hidden;
}
.controls .progress .elapsed {
text-align:right;
margin:0 13px 0 0;
}
.controls .progress .duration {
text-align:left;
margin:0 0 0 13px;
}
.controls .volume {
padding:8px 13px 6px 35px;
background:url(../images/bg_controls_volume.png) no-repeat 0 50%;
}
.controls .playback .enyo-button {
vertical-align:middle;
margin:0 0 0 6px;
background:url(../images/bg_controls_button.png) no-repeat 0 0;
min-width: 0;
padding:0;
height:48px;
width:48px;
-webkit-border-image:none;
border:0;
}
.controls .playback .enyo-button.prev {
margin:0 0 0 11px;
}
.controls .playback .enyo-button-down {
background-position:0 -48px;
}
/* FWrk override for DFISH-13306 */
.controls .playback .enyo-button-disabled {
opacity:1;
}
.controls .playback .enyo-button-disabled .enyo-button-icon {
opacity:0.5;
}
/* End FWrk override for DFISH-13306 */
.controls .playback .enyo-button .enyo-button-icon {
height:32px;
width:32px;
margin: 8px;
background-position:50% 50%;
}
.controls .playback .enyo-button.play {
-webkit-border-image:none;
width:58px;
height:58px;
background:url(../images/bg_controls_play.png) no-repeat 0 0;
-webkit-border-image:none;
}
.controls .playback .enyo-button-down.play {
background-position:0 -58px;
}
.controls .playback .enyo-button.play .enyo-button-icon {
margin:13px;
background-position:0 -32px;
}
.controls .playback .enyo-button.play.paused .enyo-button-icon {
background-position:0 0;
}
.toggleMode {
height:32px;
width:32px;
background:no-repeat 0 0;
}
.toggleMode.all,
.toggleMode.on {
background-position:0 -64px;
}
.toggleMode.repeat.all,
.toggleMode.shuffle.on {
background-position: 0 -32px;
}
.toggleMode.blue {
background-position: 0 -32px;
}
.toggleMode.on.blue {
background-position: 0 -96px;
}
.toggleMode.one {
background-position:0 -64px
}
.toggleMode.shuffle {
margin:0 38px 0 0;
background-image:url(../images/btn_controls_shuffle.png);
}
.toggleMode.repeat {
margin:0 0 0 38px;
background-image:url(../images/btn_controls_repeat.png);
}
.toggleMode.fullscreen {
background-image:url(../images/btn_controls_fullscreen.png);
margin: 0 8px 7px 10px;
}
.flow {
width: 100%;
height: 100%;
background:url(../images/bg_wrapper.png) repeat 50% 50%;
}
.flow .scrollH {
margin-left: -234px;
}
.flow .scrollV {
padding:100px 0;
margin-left: -369px; /* copied over from somewhere wrong, sorry */
}
.flow .mask {
position:absolute;
height:100%;
width:100%;
background: url(../images/bg_flow_landscape.png) no-repeat 50% 50%;
z-index:999;
top:0;
}
.portrait .flow .mask {
background: url(../images/bg_flow_portrait.png) no-repeat 50% 50%;
}
.flow .item {
margin:0 7px;
width:488px;
opacity:0.25;
-webkit-transform:translateZ(0);
}
.flow .item.focused {
opacity:1;
}
.flow .item .info {
color:rgba(255,255,255,0.2);
padding:20px 3px 15px 3px;
}
.flow .item.focused .info {
color:rgb(255,255,255);
}
.flow .item .info div {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
font-size:18px;
line-height:1em;
padding:5px 0;
}
.flow .item .info .album {
font-size:30px;
}
.flow .item .info .indicator {
float:left;
margin:4px 5px 0 0
}
.flow .item .cover {
background:url(../images/bg_flow_cover.png) no-repeat 50% 50%;
width:488px;
height:488px;
-webkit-box-sizing:content-box;
overflow:hidden;
}
.flow .item .cover .img {
margin:4px;
height:480px;
overflow:hidden;
width:480px;
background-position:50% 50%;
background-repeat: no-repeat;
background-color:#000;
}
.drag {
position: absolute;
pointer-events: none;
width: 106px;
height: 106px;
top: 0;
left: 0;
-webkit-transform: translate3d(0,0,0);
}
.drag .cover {
width:106px;
height:106px;
background:url(../images/bg_drag_cover.png) no-repeat 50% 50%;
}
.drag .cover .img {
margin:9px;
width:88px;
height:88px;
overflow:hidden;
position:absolute;
background:#000;
line-height:81px;
}
.drag .cover .img img {
vertical-align:middle;
}
.drag .action {
width:48px;
height:48px;
background:url(../images/bg_drag_icon.png) no-repeat 50% 50%;
position:absolute;
top:-16px;
left:-16px;
display:none;
}
.drag .action.on {
display:block;
}
.drag .action div {
width:32px;
height:32px;
margin:8px;
background:url(../images/bg_drag_action.png) no-repeat 0 0;
}
.drag .action .order {
background-position:0 -32px;
}
/*TEMP JC*/
.timelabelContainer
{
width: 50px;
height: 16px;
overflow: hidden;
}
.timelabelContainer.currentTime
{
text-align: right;
}
.confirmpromptbox .enyo-button {
width: 100px;
}
.confirm-content {
padding-bottom: 10px;
padding-left: 10px;
}
.song_genre_Blueicon {
margin: 0em -0.6em 0px 0.6em;
}
.album_artist_Blueicon {
margin: 0em -1em 0px 1em;
}
+20
View File
@@ -0,0 +1,20 @@
<!doctype html>
<html>
<head>
<title>Music</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!--<script src="/usr/palm/frameworks/enyo/0.10/framework/enyo.js" type="text/javascript" launch="nobridge"></script>-->
<script src="/usr/palm/frameworks/enyo/0.10/framework/enyo.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
window.PalmSystem && PalmSystem.stageReady();
console.log("Dashboard Page");
var dashControlsApp = new DashControlsApp().renderInto(document.body);
</script>
</body>
</html>
@@ -0,0 +1,40 @@
body {
background:transparent;
}
.music-notification {
padding:0 5px;
background:transparent;
}
.music-notification .playback-controls .enyo-button {
-webkit-border-image:none;
background:none;
}
.music-notification .playback-controls .enyo-button.play .enyo-button-icon {
background-position:-32px 0;
}
.music-notification .playback-controls .enyo-button.enyo-button-down.play .enyo-button-icon {
background-position:-32px -32px;
}
.music-notification .playback-controls .enyo-button.play.paused .enyo-button-icon {
background-position:0 0;
}
.music-notification .playback-controls .enyo-button.enyo-button-down.play .enyo-button-icon {
background-position:0 -32px;
}
.music-notification .info {
font-size:14px;
line-height:1.3em;
margin: 0 0 0 8px;
color:#fff;
}
.music-notification .info div {
overflow:hidden;
text-overflow:ellipsis;
width: 100%;
white-space:nowrap;
}
.music-notification .info .title {
font-weight:bold;
font-size:16px;
line-height:1.4em;
}
@@ -0,0 +1,107 @@
/*globals enyo, $L, event, Utilities, window */
enyo.kind({
name: "DashControlsApp",
kind: "HFlexBox",
align:"center",
className: "music-notification",
components: [
{ name: "appEvent", kind: "ApplicationEvents", onWindowParamsChange: "windowParamsChangeHandler"},
{kind: "Control", flex:1, className: "info", onclick: "onclick_focus", components: [
{name: "lblSongTitle", content: $L("Song"), className: "title"},
{name: "lblArtistName", content: $L("Artist"), className: "artist"}
]},
{kind: "Control", className: "playback-controls", layoutKind: "HFlexLayout", pack: "start", align: "center", components: [
{name: "btnPrev", kind: "IconButton", className: "prev", icon:"images/btn_dashboard_prev.png", onclick: "onclick_prev"}, // This needs to be changed to switch icons like btnPlay
{name: "btnPlay", kind: "IconButton", className: "play paused", icon:"images/btn_dashboard_play.png", label: " ", onclick: "onclick_playpause"},
{name: "btnNext", kind: "IconButton", className: "next", icon:"images/btn_dashboard_next.png", onclick: "onclick_next"} // This needs to be changed to switch icons like btnPlay
]}
],
create: function ()
{
this.inherited(arguments);
this.log();
},
windowParamsChangeHandler: function()
{
this.log(enyo.windowParams.objTrackInfo);
if(enyo.windowParams.objTrackInfo)
{
this.updateTrackInfoDisplay(enyo.windowParams.objTrackInfo);
}
if(enyo.windowParams.boolAudioPlaying !== undefined)
{
this.setPlayPause(enyo.windowParams.boolAudioPlaying);
}
},
updateTrackInfoDisplay: function(objTrackInfo)
{
this.log();
this.$.lblSongTitle.setContent(objTrackInfo.strTrackTitle);
this.$.lblArtistName.setContent(objTrackInfo.strTrackArtist);
},
setPlayPause: function (boolAudioPlaying)
{
this.log(boolAudioPlaying);
this.$.btnPlay.addRemoveClass("paused", !boolAudioPlaying);
//this.$.btnPlay.srcChanged();
},
onclick_prev: function (sender, event)
{
this.log();
this.sendCommand("prev");
},
onclick_playpause: function (sender, event)
{
this.log();
this.sendCommand("playpause");
},
onclick_next: function (sender, event)
{
this.log();
this.sendCommand("next");
},
onclick_focus: function(sender, event){
this.log();
enyo.windows.activate(undefined, "com.palm.app.musicplayer", {"gotoNowPlaying": true});
},
sendCommand: function (cmdType)
{
this.log();
//var winRoot = enyo.windows.getRootWindow();
var winRoot = enyo.windows.fetchWindow("com.palm.app.musicplayer");
if(winRoot)
{
enyo.windows.setWindowParams(winRoot, {cmdType: cmdType });
}
}
});
@@ -0,0 +1,23 @@
{
"_id":1234,
"name":"My Filter Playlist",
"filters":
[
{
"type": "artist",
"filterText": "Beatles"
},
{
"type": "artist",
"filterText": "The Who"
},
{
"type": "album",
"filterText": "Dark Side"
},
{
"type": "genre",
"filterText": "Acid Rock"
}
]
}
@@ -0,0 +1,17 @@
{
"_id":1234,
"name":"My Playlist",
"tracks":
[
{
"title":"Strawberry Fields Forever",
"artist":"The Beatles",
"path":"/media/internal/music/StrawberryFieldsForever.mp3"
},
{
"title":"White Room",
"artist":"Cream",
"path":"/media/internal/music/WhiteRoom.mp3"
}
]
}
+54
View File
@@ -0,0 +1,54 @@
/*globals Utilities, enyo, $L, event, Utilities, window, PalmSystem, MediaIndex, escape */
enyo.depends(
"source/app.js",
"css/music.css",
"source/playcontrols.js",
"source/playmodecontrols.js",
"source/songinfocontrols.js",
"source/navPanel.js",
"source/navplaylists.js",
"controls/itemGrid.js",
"controls/listView.js",
"controls/listViewDraggable.js",
"controls/listViewDetail.js",
"source/listViewSongs.js",
"source/listViewArtists.js",
"source/listViewArtistDetail.js",
"source/listViewAlbums.js",
"source/listViewAlbumDetail.js",
"source/listViewGenres.js",
"source/listViewGenreDetail.js",
"source/listViewPlaylist.js",
"source/albumartview.js",
"source/albumartitem.js",
"source/playerControl.js",
"controls/searchinput.js",
"controls/alphapicker.js",
"controls/alphapicker.css",
"controls/listViewHeader.js",
"controls/listViewHeader.css",
"controls/mediaItemMenu.js",
"utility/mediaindex.js",
"utility/mediawatcher.js",
"utility/librarytools.js",
"utility/playlistmanager.js",
"utility/audiomanager.js",
"utility/playback.js",
"utility/playbacklist.js",
"utility/utilities.js",
"utility/dashboardmanager.js",
"dashboard/dashControls.js",
"dashboard/dashControls.css",
"launch/MusicAppLauncher.js"
);
@@ -0,0 +1,8 @@
{
"localEnyoRoot": "/usr/palm/frameworks/",
"ciEnyoRoot": "/usr/palm/frameworks/",
"enyoVersion": "0.10",
"enyoLaunchParams": {
"nobridge": true
}
}
@@ -0,0 +1 @@
{"logLevel":99}
Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Loaded 100 of 233 files, more files were not shown because too many files have changed in this diff. Show more