commit
f55368fe89
8 changed files with 161 additions and 135 deletions
|
@ -1,15 +1,22 @@
|
|||
<!-- edit details of an Event -->
|
||||
<div class="container">
|
||||
<h1><span ng-if="!event.title">{{'New event' | translate}}</span>{{event.title}}
|
||||
<div class="panel panel-primary table-striped top5">
|
||||
<div class="panel-heading">
|
||||
<h1>
|
||||
<button ng-if="event._id" ng-click="$state.go('event.info', {id: event._id})" class="btn btn-success">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
<span class="fa fa-info-circle vcenter"></span>
|
||||
{{'Info' | translate}}
|
||||
</button>
|
||||
<span ng-if="!event.title">{{'New event' | translate}}</span>{{event.title}}
|
||||
</h1>
|
||||
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form name="eventForm" ng-model="eventdetails" ng-submit="save()">
|
||||
<div ng-class="{clearfix: true, alert: true, 'alert-success': !eventForm.$dirty, 'alert-danger': eventForm.$dirty}">
|
||||
<button type="button" class="btn btn-default pull-right" ng-click="save($event)" ng-disabled="!eventForm.$dirty">{{'save' | translate}}</button>
|
||||
<button type="button" class="btn btn-default pull-right" ng-click="save($event)" ng-disabled="!eventForm.$dirty">
|
||||
<span class="fa fa-floppy-o vcenter"></span>
|
||||
{{'save' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-lg">
|
||||
|
@ -23,7 +30,7 @@
|
|||
<div id="begin-date" class="input-group col-sm-9">
|
||||
<input type="text" class="form-control" datepicker-popup="dd-MMMM-yyyy" ng-model="event['begin-date']" is-open="opened" ng-required="true" />
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
<button type="button" class="btn btn-default" ng-click="open($event)"><i class="fa fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -39,7 +46,7 @@
|
|||
<div id="end-date" class="input-group col-sm-9">
|
||||
<input type="text" class="form-control" datepicker-popup="dd-MMMM-yyyy" ng-model="event['end-date']" is-open="opened" ng-required="true" />
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
|
||||
<button type="button" class="btn btn-default" ng-click="open($event)"><i class="fa fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -52,3 +59,5 @@
|
|||
<input type="submit" class="outside-screen" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="col-md-7 col-xs-7 vcenter">
|
||||
<h1>{{event.title}}
|
||||
<button ng-if="event._id" ng-click="$state.go('event.edit', {id: event._id})" class="btn btn-success">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
<span class="fa fa-pencil-square-o vcenter"></span>
|
||||
{{'Edit' | translate}}
|
||||
</button>
|
||||
</h1>
|
||||
|
@ -56,18 +56,18 @@
|
|||
<p ng-if="person.company || person.job_title"><i ng-if="person.job_title">{{person.job_title}}</i><span ng-if="person.company && person.job_title"> @ </span><i ng-if="person.company">{{person.company}}</i></p>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-link" reset-focus name="switch-attended" ng-click="setPersonAttributeAndRefocus(person, 'attended', !person.attended)"><span class="glyphicon {{(person.attended) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button>
|
||||
<button class="btn btn-link" reset-focus name="switch-attended" ng-click="setPersonAttributeAndRefocus(person, 'attended', !person.attended)"><span class="fa fa-lg {{(person.attended) && 'fa-check-circle text-success' || 'fa-times-circle text-danger'}}"></span></button>
|
||||
</td>
|
||||
<td class="text-center" ng-repeat="col in customFields">
|
||||
<span ng-if="col.type == 'boolean'">
|
||||
<button class="btn btn-link" ng-click="setPersonAttribute(person, col.key, !person[col.key])"><span class="glyphicon {{(person[col.key]) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button>
|
||||
<button class="btn btn-link" ng-click="setPersonAttribute(person, col.key, !person[col.key])"><span class="fa fa-lg {{(person[col.key]) && 'fa-check-circle text-success' || 'da-times-circle text-danger'}}"></span></button>
|
||||
</span>
|
||||
<span ng-if="col.type != 'boolean'">
|
||||
{{person[col.key]}}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button ng-click="removeAttendee(person)" type="button" class="btn btn-link glyphicon glyphicon-trash"></button>
|
||||
<button ng-click="removeAttendee(person)" type="button" class="btn btn-link fa fa-lg fa-trash"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -104,7 +104,7 @@
|
|||
</div>
|
||||
|
||||
<button reset-focus ng-disabled="!(newPerson.name && newPerson.surname)" ng-click="fastAddPerson(newPerson, true)" class="btn btn-success top5">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
<span class="fa fa-plus-circle vcenter"></span>
|
||||
{{'Add' | translate}}
|
||||
</button>
|
||||
</form>
|
||||
|
@ -129,7 +129,7 @@
|
|||
{{person.email}}
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<button reset-focus ng-click="fastAddPerson(person)" type="button" class="btn btn-link glyphicon glyphicon-plus-sign"></button>
|
||||
<button reset-focus ng-click="fastAddPerson(person)" type="button" class="btn btn-link fa fa-plus-circle vcenter"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="container">
|
||||
<h1>{{'Events' | translate}}
|
||||
<button ng-click="$state.go('event.new')" class="btn btn-success">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
<span class="fa fa-plus-circle vcenter"></span>
|
||||
{{'Add event' | translate}}
|
||||
</button>
|
||||
</h1>
|
||||
|
@ -41,7 +41,7 @@
|
|||
{{'Ends:' | translate}} {{event['end-date']}}</p>
|
||||
</td>
|
||||
<td>
|
||||
<button ng-click="remove(event._id)" type="button" class="btn btn-link glyphicon glyphicon-trash"></button>
|
||||
<button ng-click="remove(event._id)" type="button" class="btn btn-link fa fa-trash fa-lg"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -51,7 +51,12 @@
|
|||
<li ng-class="{active: n.isActive('/persons') || n.isActive('/person') || n.isActive('/import/persons')}"><a ui-sref="persons">{{'Persons' | translate}}</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="/logout">{{'logout' | translate}}</a></li>
|
||||
<li>
|
||||
<button class="btn btn-link">
|
||||
<span class="fa fa-sign-out vcenter"></span>
|
||||
<a href="/logout">{{'logout' | translate}}</a>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
12
angular_app/js/controllers.js
vendored
12
angular_app/js/controllers.js
vendored
|
@ -82,8 +82,8 @@ eventManControllers.controller('EventsListCtrl', ['$scope', 'Event', '$modal', '
|
|||
);
|
||||
|
||||
|
||||
eventManControllers.controller('EventDetailsCtrl', ['$scope', 'Event', 'Person', 'EventUpdates', '$stateParams', 'Setting', '$log',
|
||||
function ($scope, Event, Person, EventUpdates, $stateParams, Setting, $log) {
|
||||
eventManControllers.controller('EventDetailsCtrl', ['$scope', '$state', 'Event', 'Person', 'EventUpdates', '$stateParams', 'Setting', '$log',
|
||||
function ($scope, $state, Event, Person, EventUpdates, $stateParams, Setting, $log) {
|
||||
$scope.personsOrder = ["name", "surname"];
|
||||
$scope.countAttendees = 0;
|
||||
$scope.message = {};
|
||||
|
@ -101,7 +101,9 @@ eventManControllers.controller('EventDetailsCtrl', ['$scope', 'Event', 'Person',
|
|||
}
|
||||
);
|
||||
});
|
||||
$scope.allPersons = Person.all();
|
||||
|
||||
if ($state.is('event.info')) {
|
||||
// Handle WebSocket connection used to update the list of persons.
|
||||
$scope.EventUpdates = EventUpdates;
|
||||
$scope.EventUpdates.open();
|
||||
|
@ -114,7 +116,7 @@ eventManControllers.controller('EventDetailsCtrl', ['$scope', 'Event', 'Person',
|
|||
$scope.event.persons = $scope.EventUpdates.data.persons;
|
||||
}
|
||||
);
|
||||
$scope.allPersons = Person.all();
|
||||
}
|
||||
}
|
||||
|
||||
$scope.updateOrded = function(key) {
|
||||
|
@ -147,7 +149,7 @@ eventManControllers.controller('EventDetailsCtrl', ['$scope', 'Event', 'Person',
|
|||
} else {
|
||||
$scope.event = Event.update(this_event);
|
||||
}
|
||||
$scope.eventForm.$dirty = false;
|
||||
$scope.eventForm.$setPristine(false);
|
||||
};
|
||||
|
||||
$scope.calcAttendees = function() {
|
||||
|
@ -348,7 +350,7 @@ eventManControllers.controller('PersonDetailsCtrl', ['$scope', '$stateParams', '
|
|||
}
|
||||
});
|
||||
}
|
||||
$scope.personForm.$dirty = false;
|
||||
$scope.personForm.$setPristine(false);
|
||||
};
|
||||
|
||||
$scope.setPersonAttributeAtEvent = function(evnt, key, value) {
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
<!-- show details of a Person -->
|
||||
<div class="container">
|
||||
<h1><span ng-if="!(person.name || person.surname)">{{'New person' | translate}}</span>{{person.name}} {{person.surname}}
|
||||
<div class="panel panel-primary table-striped top5">
|
||||
<div class="panel-heading">
|
||||
<h1>
|
||||
<button ng-if="person._id" ng-click="$state.go('person.info', {id: person._id})" class="btn btn-success">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
<span class="fa fa-info-circle vcenter"></span>
|
||||
{{'Info' | translate}}
|
||||
</button>
|
||||
<span ng-if="!(person.name || person.surname)">{{'New person' | translate}}</span>{{person.name}} {{person.surname}}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<form name="personForm" ng-model="persondetails" ng-submit="save()">
|
||||
<div ng-class="{clearfix: true, alert: true, 'alert-success': !personForm.$dirty, 'alert-danger': personForm.$dirty}">
|
||||
<button type="button" class="btn btn-default pull-right" ng-click="save($event)" ng-disabled="!personForm.$dirty">{{'save' | translate}}</button>
|
||||
<button type="button" class="btn btn-default pull-right" ng-click="save($event)" ng-disabled="!personForm.$dirty">
|
||||
<span class="fa fa-floppy-o vcenter"></span>
|
||||
{{'save' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-lg">
|
||||
|
@ -56,4 +64,6 @@
|
|||
<input type="submit" class="outside-screen" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="container">
|
||||
<h1>{{person.name}} {{person.surname}}
|
||||
<button ng-if="person._id" ng-click="$state.go('person.edit', {id: person._id})" class="btn btn-success">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
<span class="fa fa-pencil-square-o vcenter"></span>
|
||||
{{'Edit' | translate}}
|
||||
</button>
|
||||
</h1>
|
||||
|
@ -28,18 +28,18 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th>{{'Event' | translate}}</th>
|
||||
<th>{{'Registered' | translate}}</th>
|
||||
<th>{{'Attended' | translate}}</th>
|
||||
<th class="text-center">{{'Registered' | translate}}</th>
|
||||
<th class="text-center">{{'Attended' | translate}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="event in events | splittedFilter:query | orderBy:eventsOrderProp">
|
||||
<td><strong><a ui-sref="event.info({id: event._id})">{{event.title}}</a></strong></td>
|
||||
<td>
|
||||
<button class="btn btn-link" name="switch-registered" ng-click="switchRegistered(event, person, !event.person_data.person_id)"><span class="glyphicon {{(event.person_data.person_id) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-link" name="switch-registered" ng-click="switchRegistered(event, person, !event.person_data.person_id)"><span class="fa fa-lg {{(event.person_data.person_id) && 'fa-check-circle text-success' || 'fa-times-circle text-danger'}}"></span></button>
|
||||
</td>
|
||||
<td>
|
||||
<button ng-disabled="!event.person_data.person_id" class="btn btn-link" name="switch-attended" ng-click="setPersonAttributeAtEvent(event, 'attended', !event.person_data.attended)"><span class="glyphicon {{(event.person_data.attended) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button>
|
||||
<td class="text-center">
|
||||
<button ng-disabled="!event.person_data.person_id" class="btn btn-link" name="switch-attended" ng-click="setPersonAttributeAtEvent(event, 'attended', !event.person_data.attended)"><span class="fa fa-lg {{(event.person_data.attended) && 'fa-check-circle text-success' || 'fa-times-circle text-danger'}}"></span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
<div class="col-md-7 col-xs-7 vcenter">
|
||||
<h1>{{'Persons' | translate}}
|
||||
<button ng-click="$state.go('person.new')" class="btn btn-success">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
<span class="fa fa-plus-circle vcenter"></span>
|
||||
{{'Add person' | translate}}
|
||||
</button>
|
||||
<button ng-click="$state.go('import.persons')" class="btn btn-success">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
<span class="fa fa-download vcenter"></span>
|
||||
{{'Import persons' | translate}}
|
||||
</button>
|
||||
</h1>
|
||||
|
@ -53,14 +53,14 @@
|
|||
</td>
|
||||
<td ng-repeat="col in customFields" class="text-center">
|
||||
<span ng-if="col.type == 'boolean'">
|
||||
<button class="btn btn-link" ng-click="setAttribute(person, col.key, !person[col.key])"><span class="glyphicon {{(person[col.key]) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button>
|
||||
<button class="btn btn-link" ng-click="setAttribute(person, col.key, !person[col.key])"><span class="fa fa-lg {{(person[col.key]) && 'fa-check-circle text-success' || 'fa-times-circle text-danger'}}"></span></button>
|
||||
</span>
|
||||
<span ng-if="col.type != 'boolean'">
|
||||
{{person[col.key]}}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button ng-click="remove(person._id)" type="button" class="btn btn-link glyphicon glyphicon-trash"></button>
|
||||
<button ng-click="remove(person._id)" type="button" class="btn btn-link fa fa-trash fa-lg"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in a new issue