Rename public to www

This commit is contained in:
Ben Ramey
2014-03-22 20:21:21 -05:00
parent f9479b7734
commit 6ddedf901e
31 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
var CreateOrderController, lunchControllers;
lunchControllers = angular.module('lunchControllers');
lunchControllers.controller('CreateOrderCtrl', [
'$scope', 'socket', '$routeParams', '$location', CreateOrderController = function($scope, socket, $routeParams, $location) {
$scope.show = false;
$scope.showMenuUrl = false;
socket.get('/run/' + $routeParams['id'], function(response) {
$scope.show = true;
$scope.showMenuUrl = response.menuUrl !== '';
$scope.run = response;
$scope.invitee = _.find(response.invitees, function(i) {
return i.name.toLowerCase() === $routeParams['inviteeName'];
});
$scope.invitees = response.invitees;
return $scope.$apply();
});
return $scope.submit = function(invitee) {
var invitees;
invitees = _.map($scope.invitees, function(i) {
if (i.name === invitee.name) {
return invitee;
}
return i;
});
return socket.put('/run/' + $routeParams['id'], {
invitees: invitees
}, function(response) {
$location.path('/run/' + response.id);
return $scope.$apply();
});
};
}
]);