clean branch from develop to add audio

This commit is contained in:
Adrien Lemaire
2014-08-08 23:03:52 +09:00
parent b19649ce37
commit 3d2d8fbfef
27 changed files with 58 additions and 6 deletions
+4 -2
View File
@@ -1,11 +1,13 @@
"use strict";
habitrpg.controller("TasksCtrl", ['$scope', '$location', 'User','Notification', '$http', 'API_URL', '$timeout', 'Shared',
function($scope, $location, User, Notification, $http, API_URL, $timeout, Shared) {
habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','Notification', '$http', 'API_URL', '$timeout', 'Shared',
function($scope, $rootScope, $location, User, Notification, $http, API_URL, $timeout, Shared) {
$scope.obj = User.user; // used for task-lists
$scope.user = User.user;
$scope.score = function(task, direction) {
if (direction === 'down') $rootScope.playSound('Minus_Habit');
if (direction === 'up') $rootScope.playSound('Plus_Habit');
User.user.ops.score({params:{id: task.id, direction:direction}})
};