Remove www folder
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
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();
|
||||
});
|
||||
};
|
||||
}
|
||||
]);
|
||||
@@ -1,31 +0,0 @@
|
||||
var CreateRunController, lunchControllers;
|
||||
|
||||
lunchControllers = angular.module('lunchControllers');
|
||||
|
||||
lunchControllers.controller('CreateRunCtrl', [
|
||||
'$scope', '$http', '$location', 'socket', CreateRunController = function($scope, $http, $location, socket) {
|
||||
$scope.run = {
|
||||
name: 'run name',
|
||||
creatorName: 'ben ramey',
|
||||
creatorEmail: 'ben.ramey@gmail.com',
|
||||
invitees: [
|
||||
{
|
||||
name: 'bob',
|
||||
email: 'bob@bob.com'
|
||||
}
|
||||
],
|
||||
restaurant: 'subway'
|
||||
};
|
||||
$scope.addInvitee = function() {
|
||||
return $scope.run.invitees.push({});
|
||||
};
|
||||
return $scope.create = function(run) {
|
||||
var data;
|
||||
data = angular.copy(run);
|
||||
return socket.post('/run', data, function(response) {
|
||||
$location.path('/run/' + response.id);
|
||||
return $scope.$apply();
|
||||
});
|
||||
};
|
||||
}
|
||||
]);
|
||||
@@ -1,5 +0,0 @@
|
||||
var HomeController, lunchControllers;
|
||||
|
||||
lunchControllers = angular.module('lunchControllers');
|
||||
|
||||
lunchControllers.controller('HomeCtrl', ['$scope', HomeController = function($scope) {}]);
|
||||
@@ -1,3 +0,0 @@
|
||||
var controllersModule;
|
||||
|
||||
controllersModule = angular.module('lunchControllers', []);
|
||||
@@ -1,20 +0,0 @@
|
||||
var lunchControllers;
|
||||
|
||||
lunchControllers = angular.module('lunchControllers');
|
||||
|
||||
lunchControllers.controller('RunCtrl', [
|
||||
'$scope', 'socket', '$routeParams', function($scope, socket, $routeParams) {
|
||||
$scope.show = false;
|
||||
socket.get('/run/' + $routeParams['id'], function(response) {
|
||||
$scope.show = true;
|
||||
$scope.run = response;
|
||||
return $scope.$apply();
|
||||
});
|
||||
return socket.on('message', function(m) {
|
||||
if (m.verb === 'update' && m.id === $routeParams.id) {
|
||||
$scope.run = m.data;
|
||||
return $scope.$apply();
|
||||
}
|
||||
});
|
||||
}
|
||||
]);
|
||||
Reference in New Issue
Block a user