Skip to content

Commit

Permalink
Merge pull request #11 from choorp/luneos-dev
Browse files Browse the repository at this point in the history
Luneos dev
  • Loading branch information
Garrett committed Mar 12, 2016
2 parents a1e872e + b15de05 commit 27e4a39
Show file tree
Hide file tree
Showing 15 changed files with 209 additions and 147 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
/.vscode
/build
/deploy
2 changes: 1 addition & 1 deletion fxos/manifest.webapp
Expand Up @@ -2,7 +2,7 @@
"name": "FoxCasts",

"description": "A fully-featured podcast app for your FirefoxOS device.",
"version": "1.3.0",
"version": "1.4.0",
"launch_path": "/index.html",
"icons": {
"256": "/assets/icon-256.png",
Expand Down
2 changes: 1 addition & 1 deletion luneos/appinfo.json
@@ -1,7 +1,7 @@
{
"title": "FoxCasts",
"id": "com.choorp.app.foxcasts",
"version": "1.3.0",
"version": "1.4.0",
"vendor": "Garrett Downs",
"vendor_url": "https://github.com/choorp/foxcasts",
"type": "web",
Expand Down
18 changes: 9 additions & 9 deletions source/style/main.less
Expand Up @@ -46,8 +46,6 @@ a {
background-size: 24px 24px;
background-position: center center;
background-repeat: no-repeat;

/*opacity: 0;*/
}
.header-button.menu {
background-image: url('../../assets/icons/menu-light.png');
Expand All @@ -70,7 +68,6 @@ a {

.menu-item {
padding: 5px 10px;
// margin-bottom: 5px;
height: 40px;
}

Expand Down Expand Up @@ -124,7 +121,7 @@ a {
display: inline-block;
position: relative;
margin: 2px 2px -2px 2px;
width: 32%; /* desired width */
width: 32%;
max-width: 200px;
}
.podcast-tile:before {
Expand All @@ -147,7 +144,6 @@ a {

.search-result {
height: 45px;
/*margin-bottom: 10px;*/
max-width: 100%;
padding: 5px 10px;
}
Expand Down Expand Up @@ -254,10 +250,8 @@ a {
}

.episode-action-popup {
/*height: 300px;*/
width: 80%;
max-width: 500px;
/*padding: 5px 0;*/
background: #333;
color: #eee;
padding: 10px;
Expand All @@ -284,18 +278,25 @@ a {


.player {
text-align: center;
// text-align: center;
}
.player .title {
font-size: 18px;
padding: 10px 10px;
}
.player .description {
padding: 0 10px;
}
.player .logo {
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
}

.audio-container {
text-align: center;
}

.time-label {
text-size: 10px;
margin: 0 10px;
Expand Down Expand Up @@ -331,7 +332,6 @@ a {
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
// background-color: #ccc;
}
.playback-button.rewind {
background-image: url("../../assets/icons/rewind_white.png");
Expand Down
12 changes: 5 additions & 7 deletions source/views/App.js
@@ -1,3 +1,7 @@
/* global DB */
/* global PodcastManager */
/* global PalmSystem */
/* global enyo */
// We need this so the back button knows what to do
var HISTORY = [1];
var PREFS = {};
Expand Down Expand Up @@ -58,19 +62,14 @@ enyo.kind({
}
break;
}
// this.log(HISTORY);
},
changePanel: function(inSender, inEvent) {
// this.log(inSender);
// this.log(inEvent);

var command;
if (inEvent.command) {
command = inEvent.command;
} else {
command = inSender.name;
}
// this.log(command);
}

switch (command) {
case "btnMenu":
Expand Down Expand Up @@ -165,7 +164,6 @@ enyo.kind({
streamEpisode: function(inSender, episode) {
this.$.player.setPlaybackType("stream");
this.$.player.setEpisode(episode);
// this.$.player.initStream();
this.changePanel({}, {command: "player"});
},
resumeEpisode: function(inSender, episode) {
Expand Down
4 changes: 2 additions & 2 deletions source/views/EpisodeItem.js
Expand Up @@ -43,7 +43,7 @@ enyo.kind({
}

if (e.played == "true") {
this.applyStyle("opacity", .4);
this.applyStyle("opacity", 0.4);
} else {
this.applyStyle("opacity", 1);
}
Expand All @@ -63,7 +63,7 @@ enyo.kind({
this.$.drawer.setOpen(false);
this.applyStyle("background-color", null);
} else {
if (this.$.summary.getContent() == "") {
if (this.$.summary.getContent() === "") {
this.$.summary.setContent(this.episode.description);
}
this.$.drawer.setOpen(true);
Expand Down
13 changes: 6 additions & 7 deletions source/views/FeedParser.js
@@ -1,19 +1,18 @@
var ParseFeed = function(xml, podcast, dateLimit, dataType) {
var ParseFeed = function(data, podcast, dateLimit, dataType) {
console.log("Begin parseFeed");
console.log(xml);
console.log(data);

if (!dateLimit) {
dateLimit = 0;
}


var episodes = [];

// if (dataType == 'xml') {
if (xml.contentType && xml.contentType == 'text/xml') {
if (data.contentType && data.contentType == 'text/xml') {
console.log('Parsing episodes as XML');

var items = xml.getElementsByTagName("item");
var items = data.getElementsByTagName("item");
for (var i = 0; i < items.length; i++) {
var e = items[i];
// console.log(e);
Expand Down Expand Up @@ -82,7 +81,7 @@ var ParseFeed = function(xml, podcast, dateLimit, dataType) {
} else {
console.log('Parsing episodes as JSON');

var items = xml.rss.channel.item;
var items = data.rss.channel.item;
for (var i = 0; i < items.length; i++) {
var e = items[i];
// console.log(e);
Expand Down Expand Up @@ -152,4 +151,4 @@ var ParseFeed = function(xml, podcast, dateLimit, dataType) {
// console.log(episodes);
// console.log("parseFeed done.");
return(episodes);
}
};
2 changes: 1 addition & 1 deletion source/views/FilteredList.js
Expand Up @@ -62,7 +62,7 @@ enyo.kind({
this.$.episodes.createComponent({kind: "EpisodeItem", title: episodes[i].name, subTitle: episodes[i].title, episode: episodes[i], onShowPopup: "showPopup", onStreamEp: "stream", onDownloadEp: "download", onResumeEp: "resume", owner: this});
}

if (episodes.length == 0) {
if (episodes.length === 0) {
this.$.episodes.createComponent({classes: "empty-list-text", content: "No episodes."});
}

Expand Down

0 comments on commit 27e4a39

Please sign in to comment.