mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-05 10:37:30 +02:00
Update & Bugfixes
- added comments - updated favicon - updated example on
This commit is contained in:
parent
69559ed8aa
commit
309540a322
27 changed files with 87 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
|||
angular.module('rallly')
|
||||
.directive('poll', function(Participant, ConfirmModal){
|
||||
.directive('poll', function($timeout, Participant, ConfirmModal){
|
||||
return {
|
||||
restrict : 'A',
|
||||
templateUrl : 'templates/directives/poll.html',
|
||||
|
@ -10,6 +10,21 @@ angular.module('rallly')
|
|||
scope.defaults = [];
|
||||
scope.participant = {};
|
||||
var datesCount = [];
|
||||
var unbindListener;
|
||||
scope.event.$promise.then(function(event){
|
||||
var examplesNames = ['John Example', 'Jane Specimen','Mark Instance', 'Mary Case'];
|
||||
var examples = [];
|
||||
for (var i = 0; i < examplesNames.length; i++){
|
||||
var example = { name : examplesNames[i] };
|
||||
example.dates = [];
|
||||
for (var j = 0; j < event.dates.length; j++){
|
||||
var answer = Math.random()<.5;
|
||||
example.dates[j] = answer;
|
||||
}
|
||||
examples.push(example);
|
||||
}
|
||||
scope.examples = examples;
|
||||
})
|
||||
scope.delete = function(participant){
|
||||
var modal = new ConfirmModal({
|
||||
title : 'Delete ' + participant.name + '?',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue