diff --git a/assets/javascripts/controllers/library.controller.js b/assets/javascripts/controllers/library.controller.js index a375296..11f50cd 100644 --- a/assets/javascripts/controllers/library.controller.js +++ b/assets/javascripts/controllers/library.controller.js @@ -1,2 +1,7 @@ mpdClient.controller('library', function ($scope, api) { + $scope.show = false + + $scope.$on('library:show', function () { $scope.show = true }) + + $scope.hide = function () { $scope.show = false } }) diff --git a/assets/javascripts/controllers/mpd-client.controller.js b/assets/javascripts/controllers/mpd-client.controller.js new file mode 100644 index 0000000..8fc4f3d --- /dev/null +++ b/assets/javascripts/controllers/mpd-client.controller.js @@ -0,0 +1,5 @@ +mpdClient.controller('mpd-client', function ($rootScope, $scope) { + $scope.showLibrary = function () { + $scope.$broadcast('library:show') + } +}) diff --git a/assets/javascripts/libs/angular-resource.js b/assets/javascripts/libs/angular-resource.js old mode 100755 new mode 100644 diff --git a/assets/javascripts/views/library.html b/assets/javascripts/views/library.html index c5e0411..c5bfdce 100644 --- a/assets/javascripts/views/library.html +++ b/assets/javascripts/views/library.html @@ -1,6 +1,6 @@ -
+
- Close + Close

Library

diff --git a/assets/javascripts/views/queue.html b/assets/javascripts/views/queue.html index 5ce6333..5956e90 100644 --- a/assets/javascripts/views/queue.html +++ b/assets/javascripts/views/queue.html @@ -1,9 +1,9 @@ -
+
- Library + Library

Queue

-
    +
    1. {{ song.title }}

      {{ song.artist }}

      diff --git a/views/index.erb b/views/index.erb index b62fac9..1ac656f 100644 --- a/views/index.erb +++ b/views/index.erb @@ -8,7 +8,7 @@ -
      +