diff --git a/app/js/controllers/queue.js b/app/js/controllers/queue.js index 0ae2705..403b2ed 100644 --- a/app/js/controllers/queue.js +++ b/app/js/controllers/queue.js @@ -1,6 +1,7 @@ 'use strict'; EiskaltApp.controller('QueueCtrl', function ($scope, $interval, settings, EiskaltRPC) { + $scope.queue = [] $scope.refreshQueue = function () { EiskaltRPC.ListQueue().success(function(queue) { $scope.queue = queue; @@ -15,7 +16,14 @@ EiskaltApp.controller('QueueCtrl', function ($scope, $interval, settings, Eiskal EiskaltApp.controller('QueueItemCtrl', function ($scope, EiskaltRPC) { $scope.collapsed = false; - $scope.abort = function (item) { - EiskaltRPC.RemoveQueueItem(item.Target).success($scope.refreshQueue); + + $scope.changePrio = function (direction) { + EiskaltRPC.SetPriorityQueueItem( + $scope.item.Target, + $scope.item.PriorityOrder + direction + ).success($scope.refreshQueue); + }; + $scope.abort = function () { + EiskaltRPC.RemoveQueueItem($scope.item.Target).success($scope.refreshQueue); }; }); diff --git a/app/partials/queue.html b/app/partials/queue.html index 7685e9f..83ed9fd 100644 --- a/app/partials/queue.html +++ b/app/partials/queue.html @@ -35,15 +35,29 @@ {{ item.Status }}