Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cfjedimaster committed Jul 30, 2015
1 parent eb9f85f commit a00aa83
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
15 changes: 12 additions & 3 deletions mysoundboard/www/js/controllers.js
Expand Up @@ -21,9 +21,18 @@ angular.module('mysoundboard.controllers', [])
}

$scope.delete = function(x) {
console.log('delete', x);
Sounds.delete(x).then(function() {
getSounds();
console.log('delete', x);
Sounds.get().then(function(sounds) {
var toDie = sounds[x];
window.resolveLocalFileSystemURL(toDie.file, function(fe) {
fe.remove(function() {
Sounds.delete(x).then(function() {
getSounds();
});
}, function(err) {
console.log("err cleaning up file", err);
});
});
});
}

Expand Down
5 changes: 5 additions & 0 deletions mysoundboard/www/templates/home.html
Expand Up @@ -14,6 +14,11 @@
</ion-item>
</ion-list>
</div>
<div ng-if="sounds.length < 1">
<p>
No sounds yet. Why not record a new one?
</p>
</div>

<a href="#/new" class="button button-balanced button-block" ng-show="cordova.loaded">
Record New Sound
Expand Down

0 comments on commit a00aa83

Please sign in to comment.