Update & Bugfixes

- added comments
- updated favicon
- updated example on
This commit is contained in:
Luke Vella 2015-01-28 11:46:03 +01:00
parent 69559ed8aa
commit 309540a322
27 changed files with 87 additions and 22 deletions

View file

@ -2,6 +2,9 @@
var debug = require('debug')('rallly');
var app = require('../app');
// Server is restricted to listen to localhost (127.0.0.1)
// to disable direct requests to the application
// Requests should come from Apache via mod_proxy on port 80
var server = app.listen(app.get('port'), '127.0.0.1', function() {
debug('Express server listening on port ' + server.address().port);
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,41 @@
{
"name": "My app",
"icons": [
{
"src": "\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -11,17 +11,6 @@ angular.module('rallly')
}, {
absolute : true
});
var examplesNames = ['John Example', 'Jane Specimen','Mark Instance', 'Mary Case'];
$scope.event.examples = [];
for (var i = 0; i < examplesNames.length; i++){
var example = { name : examplesNames[i] };
example.dates = [];
for (var j = 0; j < $scope.event.dates.length; j++){
var answer = Math.random()<.5;
example.dates[j] = answer;
}
$scope.event.examples.push(example);
}
}, function(e){
$state.go('notfound');
});

View file

@ -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 + '?',

View file

@ -7,7 +7,7 @@ $templateCache.put("templates/newevent.html","<div ng-hide=\"eventUrl\">\n <d
$templateCache.put("templates/notfound.html","<h1>Error 404</h1>\n<h2>Not Found</h2>\n");
$templateCache.put("templates/notification.html","<div class=\"notification {{notification.type}}\" ng-click=\"notification.close()\">\n <div class=\"title\">\n {{notification.title}}\n </div>\n <div class=\"message\">\n {{notification.message}}\n </div>\n</div>\n");
$templateCache.put("templates/directives/discussion.html","<ul class=\"comment-thread\" ng-show=\"event.comments.length\">\n <li ng-repeat=\"comment in event.comments\" class=\"comment\">\n <div class=\"avatar-section\">\n <img src=\"/images/avatar.png\" />\n </div>\n <div class=\"comment-section\">\n <a href=\"#\" class=\"comment-delete\" ng-click=\"deleteComment(comment)\">&times;</a>\n <div class=\"meta\">\n <span class=\"name\">{{comment.author.name}}</span>\n <span class=\"time\">{{comment.created | elapsed}}</span>\n </div>\n <div class=\"content\">{{comment.content}}</div>\n </div>\n </li>\n</ul>\n<form novalidate ng-submit=\"postComment()\" name=\"commentForm\" class=\"comment-form\">\n <div class=\"avatar-section\">\n <img src=\"/images/avatar.png\" />\n </div>\n <div class=\"input-section form-group\">\n <div class=\"content-section\">\n <textarea class=\"form-control\" required ng-model=\"comment.content\" placeholder=\"Write a comment...\"></textarea>\n </div>\n <div class=\"name-section\">\n <div class=\"name-container\">\n <input type=\"text\" class=\"form-control\" required placeholder=\"Your Name\" ng-model=\"comment.author.name\" />\n <button type=\"submit\" class=\"btn\">Post Comment</button>\n <span class=\"form-error\" ng-show=\"commentForm.$submitted && commentForm.$error\">\n <img src=\"/images/error.png\" width=\"14\" /> Make sure you fill in all the fields.\n </span>\n </div>\n </div>\n </div>\n</form>\n");
$templateCache.put("templates/directives/poll.html","<div class=\"poll-header\">\n <div class=\"header participants-header\">\n {{event.participants.length}} participants\n </div>\n <div class=\"header date-header\" ng-repeat=\"date in event.dates\">\n <div class=\"daticon\">\n <div class=\"dow\">\n {{date | date: \'EEE\'}}\n </div>\n <div class=\"day\">\n {{date | date: \'d\'}}\n </div>\n <div class=\"month\">\n {{date | date : \'MMM\'}}\n </div>\n <span class=\"count\" ng-show=\"selectedDate($index)\" ng-class={top:isTopDate($index)}>{{selectedDate($index)}}</span>\n </div>\n </div>\n <div class=\"header actions-header\">\n\n </div>\n</div>\n<div class=\"poll-body\">\n <div class=\"poll-entry\" ng-repeat=\"participant in event.participants\">\n <form novalidate ng-submit=\"update(participant); editMode = false\">\n <div class=\"cell name-cell\">\n <span class=\"avatar style-{{$index + 1}}\">\n <img src=\"/images/user.png\" width=\"11\" />\n </span>\n <input required autocomplete=\"off\" type=\"text\" class=\"form-control\" ng-model=\"participant.name\" ng-show=\"editMode\" value=\"participant.name\"/>\n <span ng-hide=\"editMode\" class=\"name editable\" ng-click=\"editMode = true && !event.isClosed; edit(participant)\">{{participant.name}}</span>\n </div>\n <div class=\"cell vote-cell\" ng-repeat=\"date in event.dates\">\n <img src=\"/images/tick@2x.png\" width=\"16\" ng-hide=\"editMode\" ng-if=\"participant.dates[$index]\" />\n <img src=\"/images/nope@2x.png\" width=\"8\" ng-hide=\"editMode\" ng-if=\"!participant.dates[$index]\" />\n <input ng-model=\"participant.dates[$index]\" ng-show=\"editMode\" ng-false-value=\"false\" type=\"checkbox\" />\n <div class=\"overlay\" ng-show=\"editMode\" ng-click=\"participant.dates[$index] = !participant.dates[$index]\"></div>\n </div>\n <div class=\"cell action-cell\" ng-hide=\"event.isClosed\">\n <button type=\"button\" ng-hide=\"editMode\" ng-click=\"editMode = true; edit(participant)\" class=\"btn hover\">Edit</button>\n <button type=\"button\" ng-hide=\"editMode\" ng-click=\"delete(participant)\" class=\"btn danger hover\">Delete</button>\n <button type=\"submit\" ng-show=\"editMode\" class=\"btn\">Save</button>\n <button type=\"button\" ng-show=\"editMode\" ng-click=\"editMode = false; cancel($index)\" class=\"btn\">Cancel</button>\n </div>\n </form>\n </div>\n <div class=\"poll-example\" ng-show=\"event.participants.length == 0\">\n <div class=\"poll-entry\" ng-repeat=\"example in event.examples\">\n <div class=\"cell name-cell\">\n <span class=\"avatar style-{{$index + 1}}\">\n <img src=\"/images/user.png\" width=\"11\" />\n </span>\n <span class=\"name\">{{example.name}}</span>\n </div>\n <div class=\"cell vote-cell\" ng-repeat=\"date in event.dates\">\n <img src=\"/images/tick@2x.png\" width=\"16\" ng-if=\"example.dates[$index]\" />\n <img src=\"/images/nope@2x.png\" width=\"8\" ng-if=\"!example.dates[$index]\" />\n </div>\n <div class=\"cell action-cell\">\n\n </div>\n </div>\n <div class=\"overlay\">\n\n </div>\n </div>\n <div ng-hide=\"event.isClosed\" class=\"poll-entry highlight\">\n <form novalidate name=\"formnew\" ng-submit=\"save()\">\n <div class=\"cell name-cell\">\n <span class=\"avatar style-{{participant.style}}\">\n <img src=\"/images/user.png\" width=\"11\" />\n </span>\n <input autocomplete=\"off\" name=\"username\" type=\"text\" class=\"form-control\" placeholder=\"Your name...\" ng-model=\"participant.name\" required value=\"participant.name\"/>\n </div>\n <div class=\"cell vote-cell\" ng-repeat=\"date in event.dates\">\n <input ng-model=\"participant.dates[$index]\" ng-false-value=\"false\" type=\"checkbox\" />\n <div class=\"overlay\" ng-click=\"participant.dates[$index] = !participant.dates[$index]\"></div>\n </div>\n <div class=\"cell action-cell\">\n <button type=\"submit\" ng-class=\"{ \'animated shake\' : formnew.$submitted && formnew.$invalid }\" class=\"btn\">Save</button>\n </div>\n </form>\n </div>\n</div>\n");
$templateCache.put("templates/directives/poll.html","<div class=\"poll-header\">\n <div class=\"header participants-header\">\n {{event.participants.length}} participants\n </div>\n <div class=\"header date-header\" ng-repeat=\"date in event.dates\">\n <div class=\"daticon\">\n <div class=\"dow\">\n {{date | date: \'EEE\'}}\n </div>\n <div class=\"day\">\n {{date | date: \'d\'}}\n </div>\n <div class=\"month\">\n {{date | date : \'MMM\'}}\n </div>\n <span class=\"count\" ng-show=\"selectedDate($index)\" ng-class={top:isTopDate($index)}>{{selectedDate($index)}}</span>\n </div>\n </div>\n <div class=\"header actions-header\">\n\n </div>\n</div>\n<div class=\"poll-body\">\n <div class=\"poll-entry\" ng-repeat=\"participant in event.participants\">\n <form novalidate ng-submit=\"update(participant); editMode = false\">\n <div class=\"cell name-cell\">\n <span class=\"avatar style-{{$index + 1}}\">\n <img src=\"/images/user.png\" width=\"11\" />\n </span>\n <input required autocomplete=\"off\" type=\"text\" class=\"form-control\" ng-model=\"participant.name\" ng-show=\"editMode\" value=\"participant.name\"/>\n <span ng-hide=\"editMode\" class=\"name editable\" ng-click=\"editMode = true && !event.isClosed; edit(participant)\">{{participant.name}}</span>\n </div>\n <div class=\"cell vote-cell\" ng-repeat=\"date in event.dates\">\n <img src=\"/images/tick@2x.png\" width=\"16\" ng-hide=\"editMode\" ng-if=\"participant.dates[$index]\" />\n <img src=\"/images/nope@2x.png\" width=\"8\" ng-hide=\"editMode\" ng-if=\"!participant.dates[$index]\" />\n <input ng-model=\"participant.dates[$index]\" ng-show=\"editMode\" ng-false-value=\"false\" type=\"checkbox\" />\n <div class=\"overlay\" ng-show=\"editMode\" ng-click=\"participant.dates[$index] = !participant.dates[$index]\"></div>\n </div>\n <div class=\"cell action-cell\" ng-hide=\"event.isClosed\">\n <button type=\"button\" ng-hide=\"editMode\" ng-click=\"editMode = true; edit(participant)\" class=\"btn hover\">Edit</button>\n <button type=\"button\" ng-hide=\"editMode\" ng-click=\"delete(participant)\" class=\"btn danger hover\">Delete</button>\n <button type=\"submit\" ng-show=\"editMode\" class=\"btn\">Save</button>\n <button type=\"button\" ng-show=\"editMode\" ng-click=\"editMode = false; cancel($index)\" class=\"btn\">Cancel</button>\n </div>\n </form>\n </div>\n <div class=\"poll-example\" ng-class=\"{hidden : event.participants.length > 0}\">\n <div class=\"poll-entry\" ng-repeat=\"example in examples\">\n <div class=\"cell name-cell\">\n <span class=\"avatar style-{{$index + 1}}\">\n <img src=\"/images/user.png\" width=\"11\" />\n </span>\n <span class=\"name\">{{example.name}}</span>\n </div>\n <div class=\"cell vote-cell\" ng-repeat=\"date in event.dates\">\n <img src=\"/images/tick@2x.png\" width=\"16\" ng-if=\"example.dates[$index]\" />\n <img src=\"/images/nope@2x.png\" width=\"8\" ng-if=\"!example.dates[$index]\" />\n </div>\n <div class=\"cell action-cell\">\n\n </div>\n </div>\n <div class=\"overlay\">\n <div class=\"overlay-text\">\n Fill in the form below to get started\n </div>\n </div>\n </div>\n <div ng-hide=\"event.isClosed\" class=\"poll-entry highlight\">\n <form novalidate name=\"formnew\" ng-submit=\"save()\">\n <div class=\"cell name-cell\">\n <span class=\"avatar style-{{participant.style}}\">\n <img src=\"/images/user.png\" width=\"11\" />\n </span>\n <input autocomplete=\"off\" name=\"username\" type=\"text\" class=\"form-control\" placeholder=\"Your name...\" ng-model=\"participant.name\" required value=\"participant.name\"/>\n </div>\n <div class=\"cell vote-cell\" ng-repeat=\"date in event.dates\">\n <input ng-model=\"participant.dates[$index]\" ng-false-value=\"false\" type=\"checkbox\" />\n <div class=\"overlay\" ng-click=\"participant.dates[$index] = !participant.dates[$index]\"></div>\n </div>\n <div class=\"cell action-cell\">\n <button type=\"submit\" ng-class=\"{ \'animated shake\' : formnew.$submitted && formnew.$invalid }\" class=\"btn\">Save</button>\n </div>\n </form>\n </div>\n</div>\n");
$templateCache.put("templates/directives/eventForm/dateForm.html","<div class=\"section-details\">\n <div class=\"section-title\">Choose Dates</div>\n <ul class=\"daticon-list\">\n <li ng-repeat=\"date in event.dates\">\n <div class=\"daticon\">\n <div class=\"dow\">\n {{date | date: \'EEE\'}}\n </div>\n <div class=\"day\">\n {{date | date: \'d\'}}\n </div>\n <div class=\"month\">\n {{date | date : \'MMM\'}}\n </div>\n <span class=\"delete\" ng-click=\"datepicker.unsetDate(date)\"></span>\n </div>\n </li>\n </ul>\n</div>\n<div class=\"section-main\">\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"email\">Calendar</label>\n <span class=\"form-error\" ng-show=\"(form.datepicker.$dirty || form.$submitted) && form.datepicker.$error.required\">\n <img src=\"/images/error.png\" width=\"14\" /> You need to select a few dates\n </span>\n <div datepicker required name=\"datepicker\" control=\"datepicker\" ng-model=\"event.dates\">\n\n </div>\n </div>\n </div>\n</div>\n");
$templateCache.put("templates/directives/eventForm/eventForm.html","<div class=\"section-details\">\n <div class=\"section-title\">Event Details</div>\n</div>\n<div class=\"section-main\">\n <div class=\"form-row\">\n <div class=\"form-col\">\n <div class=\"form-group\">\n <label for=\"title\">Title</label>\n <span class=\"form-error\" ng-show=\"(form.title.$touched || form.$submitted) && errors.title\">\n <img src=\"/images/error.png\" width=\"14\" /> {{errors.title}}\n </span>\n <input id=\"title\" name=\"title\" ng-maxlength=\"30\" required ng-model=\"event.title\" type=\"text\" placeholder=\"Monthly Meetup...\" class=\"form-control extend\"/>\n </div>\n </div>\n <div class=\"form-col\">\n <div class=\"form-group optional\">\n <label for=\"location\">Location</label>\n <span class=\"form-error\" ng-show=\"(form.location.$touched || form.$submitted) && errors.location\">\n <img src=\"/images/error.png\" width=\"14\" /> {{errors.location}}\n </span>\n <input id=\"location\" name=\"location\" ng-model=\"event.location\" ng-maxlength=\"50\" type=\"text\" placeholder=\"Rick\'s Cafe...\" class=\"form-control extend\"/>\n </div>\n </div>\n </div>\n <div class=\"form-row\">\n <div class=\"form-group optional\">\n <label for=\"description\" >Description</label>\n <textarea id=\"description\" name=\"description\" ng-model=\"event.description\" placeholder=\"Enter Description...\" class=\"form-control extend\"></textarea>\n </div>\n </div>\n</div>\n");
$templateCache.put("templates/directives/eventForm/participantsForm.html","<div class=\"section-details\">\n <div class=\"section-title\">Invite Participants</div>\n</div>\n<div class=\"section-main\">\n <div class=\"form-row\">\n <div class=\"form-group optional\">\n <label>Participant\'s Emails</label>\n <tags-input max-length=\"50\" allowed-tags-pattern=\"{{emailRegex}}\" display-property=\"email\" ng-model=\"event.emails\" placeholder=\"Add an Email\" type=\"email\" autocomplete=\"off\"></tags-input>\n </div>\n </div>\n</div>\n</section>\n");

View file

@ -38,14 +38,28 @@ $name-col-width: 235px;
min-width:100%;
.poll-example {
position:relative;
&.hidden {
display:none;
}
.overlay {
position:absolute;
top:0;
left:0;
width:100%;
height: 100%;
background: rgba(white, 0.5);
background: rgba(white, 0.75);
text-align: center;
.overlay-text {
position:absolute;
top:50%;
left:50%;
font-size: em(18px);
font-weight: bold;
color: $text-3-clr;
background: rgba(white, 0.9);
padding: 10px;
@include transform(translateX(-50%) translateY(-50%));
}
}
}
.poll-entry.highlight {

View file

@ -44,8 +44,8 @@
</div>
</form>
</div>
<div class="poll-example" ng-show="event.participants.length == 0">
<div class="poll-entry" ng-repeat="example in event.examples">
<div class="poll-example" ng-class="{hidden : event.participants.length > 0}">
<div class="poll-entry" ng-repeat="example in examples">
<div class="cell name-cell">
<span class="avatar style-{{$index + 1}}">
<img src="/images/user.png" width="11" />
@ -61,7 +61,9 @@
</div>
</div>
<div class="overlay">
<div class="overlay-text">
Fill in the form below to get started
</div>
</div>
</div>
<div ng-hide="event.isClosed" class="poll-entry highlight">