Commit 7bc5455e authored by Anthony Geourjon's avatar Anthony Geourjon
Browse files

Merge branch 'EDCAMPUS-21-participation-a-un-evenement-dun-projet' into 'master'

Edcampus 21 participation a un evenement dun projet

See merge request !14
parents 59f2b907 f6f9fe95
This diff is collapsed.
......@@ -3,8 +3,8 @@
<ul class="top">
<li class="year" style='width: 100; text-align: center;margin-bottom:5px;'>
<div data-calendar-nav="prev" class="project-icon"><i class="fa fa-chevron-left"></i></div>
<span id="" ng-model="currentDate.year">{{currentDate.year}}</span>
<div data-calendar-nav="next" class="project-icon"><i style="margin-left:2px;" class="fa fa-chevron-right"></i></div>
<span id="" ng-model="currentDate.year">{{currentDate.year}}</span>
<div data-calendar-nav="next" class="project-icon"><i style="margin-left:2px;" class="fa fa-chevron-right"></i></div>
</li>
</ul>
<ul class="middle ">
......@@ -12,7 +12,7 @@
<span>{{month.label}}</span>
</li>
</ul>
<div >
<div id="calendar"></div>
......
......@@ -12,7 +12,7 @@
<div class="form-group has-error">
<label for="inputLabel">{{::_labels.titleEvent}}</label><span class="required-item"> *</span>
<input type="text" name="title" id="inputLabel" placeholder="{{::_labels.enterTitleEvent}}" ng-model="newEventCtrl.newEvent.title" required=true></input>
</div>
<div class="form-group">
<label for="inputLocation">{{::_labels.location}}</label>
......@@ -44,7 +44,7 @@
</div>
</div>-->
<div class="col-md-6" selected-value="newEventCtrl.newEvent.timeBegin" time-picker>
</div>
</div>
<div class="form-group row">
......@@ -65,7 +65,7 @@
</div> -->
</div>
</div>
<div class="separator"></div>
<div class="hide">
......@@ -78,9 +78,9 @@
<select ng-model="newEventCtrl.newEvent.invitationJobs" ng-options="model.name for model in newEventCtrl.projectJobs" ng-change="newEventCtrl.newEvent.invitationByJob=true"></select>
</div>
<div class="clearfixbutton"></div>
<div class="WelcomeCtrlBtns" style="right: 10px;bottom: 10px;text-align: right">
<div class="WelcomeCtrlBtns" style="right: 10px;bottom: 10px;text-align: right">
<button class="WelcomeCtrlBtn cancel" type="button" ng-click="newEventCtrl.cancelManager()">{{::_labels.cancelBtn}}</button>
<button class="WelcomeCtrlBtn primary" type="submit" >{{::_labels.editModeOn}}</button>
<button class="WelcomeCtrlBtn primary" type="submit" >{{::_labels.editModeOn}}</button>
</div>
</form>
</div>
......@@ -118,7 +118,7 @@
</div>
<div class="col-md-6">
<label for="inputDate">{{::_labels.time}}</label><span class="required-item"> *</span>
<minutes-picker selected-value="newEventCtrl.newEvent.myBeginMinutes" required=true></minute-picker >
<minutes-picker selected-value="newEventCtrl.newEvent.myBeginMinutes" required=true></minute-picker >
</div>
</div>
</div>
......@@ -140,14 +140,14 @@
</div>
</div> </div>
</div>
<div class="separator"></div>
<div class="clearfixbutton"></div>
<div class="WelcomeCtrlBtns" style="right: 10px;bottom: 10px;text-align: right">
<div class="WelcomeCtrlBtns" style="right: 10px;bottom: 10px;text-align: right">
<button class="WelcomeCtrlBtn cancel" type="button" ng-click="newEventCtrl.cancelManager()">{{::_labels.cancelBtn}}</button>
<button class="WelcomeCtrlBtn primary" type="submit" >{{::_labels.editModeOn}}</button>
<button class="WelcomeCtrlBtn primary" type="submit" >{{::_labels.editModeOn}}</button>
</div>
</form>
</div>
......@@ -156,9 +156,9 @@
<div class="sepator" style="background: #f08317; height: 2px; width: 200px; margin: 0 auto 20px auto;"></div>
<div>
<div class="col-md-12" style="margin-bottom: 10px;">
<label><i class="fa fa-user"></i> {{_formatUser(newEventCtrl.newEvent.organizer).shortName}} </label>
<br>
<label><i class="fa fa-clock-o"></i> {{newEventCtrl.newEvent.date | formatDate}} </label>
......@@ -167,11 +167,11 @@
</span>
<p>{{newEventCtrl.newEvent.description}}</p>
</div>
<div class="">
<div class="col-md-6">
<div class="event-options">
<h6>{{::_labels.eventInvitedUsers}}:</h6>
<div ng-if='newEventCtrl.newEvent.organizer.id==_getSession().user'>
<!--<div class="separator"></div>
......@@ -195,16 +195,16 @@
<div class="">
<label>{{::_labels.externalUsers}}</label>
<div ng-repeat="user in newEventCtrl.newEvent.details.invitedExternal" class="media-object thumb" style="margin: 5px;">
<user label="true" labelPosition="right" user="user" size="25"></user>
</div>
</div>
<div class="media-object thumb" style="margin: 5px;" ng-if="!newEventCtrl.newEvent.details.invited.length">
<p>{{::_labels.noneP}}</p>
</div>
<div class="clearfix"></div>
</div>
</div>
......@@ -228,7 +228,7 @@
<div class="clearfix"></div>
</div>
<div class="clearfixbutton"></div>
<div class="WelcomeCtrlBtns" style="right: 10px;bottom: 10px;text-align: right">
<div class="WelcomeCtrlBtns" style="right: 10px;bottom: 10px;text-align: right">
<button class="WelcomeCtrlBtn" ng-click="newEventCtrl.cancelManager()">{{::_labels.closeBtn}}</button>
</div>
......
......@@ -3,19 +3,19 @@
/* Controllers */
root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactory','$userFactory', '$state','$languageFactory', function($scope, $http,$stateParams, $eventsFactory,$userFactory, $state,$languageFactory) {
var newEventCtrl=this;
newEventCtrl.shortName = $stateParams.projectName;
//newEventCtrl.file = $stateParams.action;
newEventCtrl.section = "eventNew";
newEventCtrl.currentStep = 0;
newEventCtrl.eventTypes = [];
newEventCtrl.steps = [1,2];
newEventCtrl.newEvent = {title:"",fixedDate:1};
newEventCtrl.newEvent.commonDates = [{id:1,value:""}];
newEventCtrl.newEvent.url = $scope._urls.root+"#/e/"+$scope._hashCode(newEventCtrl.shortName+(new Date()).getTime(),10)
......@@ -23,19 +23,19 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
newEventCtrl.newEvent.myBeginHours="12";
newEventCtrl.newEvent.myEndMinutes="00";
newEventCtrl.newEvent.myEndHours="12";
var session = $scope._getSession();
newEventCtrl.cancelManager=function(value){
if(value) $eventsFactory.set_popupState(false, true);
if(value) $eventsFactory.set_popupState(false, true);
else $eventsFactory.set_popupState(false);
}
newEventCtrl.getCategories = function(){
$eventsFactory.getEventCategories(function(data){
if(data.status == "success"){
......@@ -57,11 +57,11 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
newEventCtrl.newEvent.myDateEnd = $("#myDateEnd" ).val();
}});
})
}
newEventCtrl.addEvent = function(){
var data = {};
......@@ -74,16 +74,16 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
else data.event.endDate = newEventCtrl.newEvent.myDateEnd+" "+myTimeEnd;//tbl[0]["value"];
$eventsFactory.addEvent($scope._getProject(),data.event,function(data){
if(data.status == "success"){
newEventCtrl.joinEvent({eventId:data.details},1, 'newEvent');
$scope._showAlert({status:1,message:$languageFactory._labels.alerts_addEventSuccess});
}
else{
$scope._showAlert({status:3,message:$languageFactory._labels.alerts_addEventFailure});
}
})
}
newEventCtrl.updateEvent=function(){
......@@ -102,54 +102,53 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
newEventCtrl.cancelManager(true);
}
else{
$scope._showAlert({status:3,message:$languageFactory._labels.alerts_deleteEventFailure});
$scope._showAlert({status:3,message:$languageFactory._labels.alerts_deleteEventFailure});
}
})
}
newEventCtrl.getEventDetails = function(event){
$eventsFactory.getEventDetails($scope._getProject,event.eventId, function(data){
$eventsFactory.getEventDetails($scope._getProject(),newEventCtrl.newEvent.eventId, function(data){
if(data.status == "success"){
$scope._showAlert({status:1,message:""});
var invited = [];
var externalInvited = [];
var participants = [];
var myId = $scope._getSession().user;
event.iParticipate = false;
newEventCtrl.newEvent.iParticipate = false;
for(var i=0;i<data.details.invited.length;i++){
var index = $scope._arrayObjectIndexOf(newEventCtrl.members,data.details.invited[i].id,"id");
if(index>=0){
//var label = newEventCtrl.members[index].firstName||newEventCtrl.members[index].lastName?newEventCtrl.members[index].firstName+" "+newEventCtrl.members[index].lastName:newEventCtrl.members[index].shortName
// var label = newEventCtrl.members[index].firstName||newEventCtrl.members[index].lastName?newEventCtrl.members[index].firstName+" "+newEventCtrl.members[index].lastName:newEventCtrl.members[index].shortName
invited.push(data.details.invited[i]);
}
else{
externalInvited.push(data.details.invited[i])
}
}
for(i=0;i<data.details.participants.length;i++){
var index = $scope._arrayObjectIndexOf(newEventCtrl.members,data.details.participants[i].id,"id");
participants.push(data.details.participants[i]);
if(data.details.participants[i].id==myId){
event.iParticipate = true;
newEventCtrl.newEvent.iParticipate = true;
}
}
event.details = {invited:invited,participants:participants,invitedExternal:externalInvited};
newEventCtrl.newEvent.details = {invited:invited,participants:participants,invitedExternal:externalInvited};
}
else{
$scope._showAlert({status:3,message:""});
}
})
}
newEventCtrl.joinEvent = function(event,value, mode){
console.log("on va rejoindre");
$eventsFactory.joinEvent($scope._getProject(), event.eventId,value,function(data){
$eventsFactory.joinEvent(newEventCtrl.newEvent.eventId,$scope._getSession().user, value,function(data){
if(data.status == "success"){
if(mode){
$eventsFactory.newEvent();
......@@ -161,12 +160,12 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
newEventCtrl.getEventDetails(event);
console.log("y avait pas de mode");
}
$scope._showAlert({status:1,message:""});
}
})
}
//$("#inputLocation").geocomplete();
newEventCtrl.changeSearchMembers=function(){
......@@ -189,7 +188,7 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
if(data.status == "success"){
newEventCtrl.members = data.details;
var pos=newEventCtrl.members.map(function(item) { return item.login });
newEventCtrl.positionsBlood = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.whitespace,
......@@ -206,26 +205,26 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
{
name: 'positions',
source: newEventCtrl.positionsBlood.ttAdapter(),
});
typeahead.on('typeahead:selected',function(evt,data){
var index=$scope._arrayObjectIndexOf(newEventCtrl.members, data, "login");
if(index > -1){
newEventCtrl.newRecipient=newEventCtrl.members[index];
}
//newEventCtrl.newRecipient=data;
//newEventCtrl.newRecipient=data;
newEventCtrl.newEvent.recipient="";
});
setTimeout(function() { $('#inputMembers').focus(); }, 0);
}
else{
......@@ -238,7 +237,9 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
var event = newEventCtrl.newEvent;
$eventsFactory.inviteUserToEvent($scope._getProject(),event.eventId,newEventCtrl.newRecipient.id,function(data){
if(data.status == "success"){
if(data.status == "success"){
newEventCtrl.getEventDetails(event);
$('.typeahead').typeahead('val','');
$("#inputMembers").typeahead('val','');
......@@ -263,7 +264,7 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
myDate=newEventCtrl.eventPopup.event.endDate.split(" ");
newEventCtrl.newEvent.myDateEnd=myDate["0"];
var myDateEndTime=myDate[1];
newEventCtrl.newEvent.timeBegin=myDateBeginTime;
var tempBeginTime=myDateBeginTime.split(":");
......@@ -276,7 +277,7 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
newEventCtrl.newEvent.myEndHours=tempEndTime[0];
newEventCtrl.newEvent.myEndMinutes=tempEndTime[1];
}
}
if(newEventCtrl.eventPopup.mode=="details"){
......@@ -288,6 +289,6 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
}
newEventCtrl.init();
}]);
<div class="clearfix group-overview">
<div>
<div class="group-overview-title">
<h4 style="text-align: center"><span ng-bind="::_labels.calendar"></span></h4>
<h4 style="text-align: center"><span ng-bind="::_labels.calendar"></span></h4>
<div class="sepator" style="background: #f08317; height: 2px; width: 200px; margin: 0 auto 20px auto;"></div>
</div>
<div class="sepator"
style="background: #f08317; height: 2px; width: 200px; margin: 0 auto 20px auto;"></div>
</div>
<div class="ajouters">
<div style="margin-bottom:20px;height:40px">
<div class="pull-left" id="switchCalendarView" style="border: 1px solid lightgray;padding: 2px 5px;">
<div class="custom-tooltip">
<i class="fa fa-calendar" aria-hidden="true" ng-click="eventsCtrl.switchView('calendar')" ng-class="{'active':eventsCtrl.screen=='calendar'}"></i><span class="tooltiptext">Vue globale</span>
</div>
<div class="custom-tooltip">
<i class="fa fa-th-large" aria-hidden="true" ng-click="eventsCtrl.switchView('details')" ng-class="{'active':eventsCtrl.screen=='details'}" style="margin-left:8px">
<div style="margin-bottom:20px;height:40px">
<div class="pull-left" id="switchCalendarView" style="border: 1px solid lightgray;padding: 2px 5px;">
<div class="custom-tooltip">
<i aria-hidden="true" class="fa fa-calendar" ng-class="{'active':eventsCtrl.screen=='calendar'}"
ng-click="eventsCtrl.switchView('calendar')"></i><span
class="tooltiptext">Vue globale</span>
</div>
<div class="custom-tooltip">
<i aria-hidden="true" class="fa fa-th-large" ng-class="{'active':eventsCtrl.screen=='details'}"
ng-click="eventsCtrl.switchView('details')" style="margin-left:8px">
</i>
<span class="tooltiptext" ng-bind="::_labels.detailledView"></span>
</div>
</div>
<button class="pull-right" ng-click="eventsCtrl.openPopup('new')"
ng-if="_userGroups[_getFullGroup()]!='ADMIN'">{{::_labels.addEventBtn}}
</button>
</div>
<button class="pull-right" ng-if="_userGroups[_getFullGroup()]!='ADMIN'" ng-click="eventsCtrl.openPopup('new')">{{::_labels.addEventBtn}}</button>
</div>
<div ng-if="eventsCtrl.screen=='details'">
<div>
<div ng-if="eventsCtrl.screen=='details'">
<div>
<section class="shadow-section" ng-class="{active:eventsCtrl.currentEvent==event}" ng-repeat="event in eventsCtrl.currentEvents | orderBy:'-event.date'" ng-if="(eventsCtrl.currentScreen=='upcoming') || (eventsCtrl.currentScreen=='archived' && _isLate(event.date)=='late') ">
<img ng-if="event.thumbUrl" height="100" ng-src="{{event.thumbUrl}}" alt="Image" style="float: left; background-color: #f6f7f8; margin-right: 12px; position: relative;">
<div style="text-align: left;">
<h6 class="pointerOn" ng-click="eventsCtrl.openPopup('details', event)" style="text-transform: uppercase">{{event.fullName | limitTo:40}}<span ng-if="event.fullName.length>40">...</span></h5>
<p class="pull-right" style="position: absolute;top:20px; right: 30px" ng-if="event.organizer.id==_getSession().user">
<i class="fa fa-pencil" ng-click="eventsCtrl.openPopup('edit', event);$event.stopPropagation();"></i>
<i class="fa fa-trash" ng-click="eventsCtrl.deleteEventPrompt(event);$event.stopPropagation();"></i>
</p>
<p><i class="fa fa-user"></i> {{::_labels.organizer}}: <strong>{{_formatUser(event.organizer).shortName}}</strong></p>
<p ng-if="event.projectName"><i class="fa fa-cube"></i> {{::_labels.project}}: <strong>{{event.projectName}}</strong></p>
<section class="shadow-section" ng-class="{active:eventsCtrl.currentEvent==event}"
ng-if="(eventsCtrl.currentScreen=='upcoming') || (eventsCtrl.currentScreen=='archived' && _isLate(event.date)=='late') "
ng-repeat="event in eventsCtrl.currentEvents | orderBy:'-event.date'">
<img alt="Image" height="100" ng-if="event.thumbUrl" ng-src="{{event.thumbUrl}}"
style="float: left; background-color: #f6f7f8; margin-right: 12px; position: relative;">
<div style="text-align: left;">
<h6 class="pointerOn" ng-click="eventsCtrl.openPopup('details', event)"
style="text-transform: uppercase">{{event.fullName | limitTo:40}}<span
ng-if="event.fullName.length>40">...</span></h5>
<p class="pull-right" ng-if="event.organizer.id==_getSession().user"
style="position: absolute;top:20px; right: 30px">
<i class="fa fa-pencil"
ng-click="eventsCtrl.openPopup('edit', event);$event.stopPropagation();"></i>
<i class="fa fa-trash"
ng-click="eventsCtrl.deleteEventPrompt(event);$event.stopPropagation();"></i>
</p>
<p><i class="fa fa-user"></i> {{::_labels.organizer}}: <strong>{{_formatUser(event.organizer).shortName}}</strong>
</p>
<p ng-if="event.projectName"><i class="fa fa-cube"></i> {{::_labels.project}}: <strong>{{event.projectName}}</strong>
</p>
<p class="date {{_isLate(event.date)}}"><i class="fa fa-clock-o"></i> {{event.date | formatDate}}</p>
<p><i class="fa fa-map-marker"></i> {{event.location?event.location:_labels.noLocation}}</p>
<p ng-if="(eventsCtrl.currentScreen=='upcoming' && _isLate(event.date)=='')">{{event.participants}} <span ng-if="event.participants>1">{{::_labels.eventParticipantsMultiple}}</span><span ng-if="event.participants<2">{{::_labels.eventParticipantsOne}}</span></p>
</div>
<p class="date {{_isLate(event.date)}}"><i class="fa fa-clock-o"></i> {{event.date |
formatDate}}</p>
<p><i class="fa fa-map-marker"></i> {{event.location?event.location:_labels.noLocation}}
</p>
<p ng-if="(eventsCtrl.currentScreen=='upcoming' && _isLate(event.date)=='')">
{{event.participants}} <span ng-if="event.participants>1">{{::_labels.eventParticipantsMultiple}}</span><span
ng-if="event.participants<2">{{::_labels.eventParticipantsOne}}</span></p>
</div>
</section>
</section>
</div>
</div>
<div ng-if="eventsCtrl.screen=='calendar'" ng-include="__root+'components/dashboard/calendar.html'">
</div>
</div>
<div ng-if="eventsCtrl.screen=='calendar'" ng-include="__root+'components/dashboard/calendar.html'">
</div>
</div>
</div>
<div class='separator clearfix'></div>
<!--
<div class="btn-group">
<label class="btn btn-primary" ng-model="timeEvent" btn-radio="'invited'" ng-click="refreshEvents('invited')">{{::_labels.invited}}</label>
<label class="btn btn-primary" ng-model="timeEvent" btn-radio="'upcoming'" ng-click="refreshEvents('upcoming')">{{::_labels.upcoming}}</label>
<label class="btn btn-primary" ng-model="timeEvent" btn-radio="'history'" ng-click="refreshEvents('history')">{{::_labels.history}}</label>
<label class="btn btn-primary" ng-model="timeEvent" btn-radio="'myEvents'" ng-click="refreshEvents('myEvents')">{{::_labels.myEvents}}</label>
</div>
-->
<div class="chatPopupManager" ng-if="eventsCtrl.confirmDeletion">
<div modal-scroll class="dialog tiny" style='min-width: 625px;width: 125px;height: 160px;'>
<i class="fa fa-times closePopup" ng-click="cancelManager();" aria-hidden="true"></i>
<div class="sepator" style="background:none;height: 2px; width: 200px; margin: 0 auto 20px auto;"></div>
<div class='separator clearfix'></div>
<!--
<div class="btn-group">
<label class="btn btn-primary" ng-model="timeEvent" btn-radio="'invited'" ng-click="refreshEvents('invited')">{{::_labels.invited}}</label>
<label class="btn btn-primary" ng-model="timeEvent" btn-radio="'upcoming'" ng-click="refreshEvents('upcoming')">{{::_labels.upcoming}}</label>
<label class="btn btn-primary" ng-model="timeEvent" btn-radio="'history'" ng-click="refreshEvents('history')">{{::_labels.history}}</label>
<label class="btn btn-primary" ng-model="timeEvent" btn-radio="'myEvents'" ng-click="refreshEvents('myEvents')">{{::_labels.myEvents}}</label>
</div>
-->
<div class="chatPopupManager" ng-if="eventsCtrl.confirmDeletion">
<div class="dialog tiny" modal-scroll style='min-width: 625px;width: 125px;height: 160px;'>
<i aria-hidden="true" class="fa fa-times closePopup" ng-click="cancelManager();"></i>
<div class="sepator" style="background:none;height: 2px; width: 200px; margin: 0 auto 20px auto;"></div>
<p>{{::_labels.confirmDeletion}} {{eventsCtrl.eventToDelete.fullName}} ?</p>
<div class="clearfixbutton"></div>
<div class="WelcomeCtrlBtns" style="right: 10px;bottom: 10px;text-align: right">
<button class="WelcomeCtrlBtn cancel" ng-click="eventsCtrl.cancelManager()">{{::_labels.cancelBtn}}
</button>
<button class="WelcomeCtrlBtn primary" ng-click="eventsCtrl.deleteEvent()">{{::_labels.editModeOn}}
</button>
</div>
<p>{{::_labels.confirmDeletion}} {{eventsCtrl.eventToDelete.fullName}} ?</p>
<div class="clearfixbutton"></div>
<div class="WelcomeCtrlBtns" style="right: 10px;bottom: 10px;text-align: right">
<button class="WelcomeCtrlBtn cancel" ng-click="eventsCtrl.cancelManager()">{{::_labels.cancelBtn}}</button>
<button class="WelcomeCtrlBtn primary" ng-click="eventsCtrl.deleteEvent()" >{{::_labels.editModeOn}}</button>
</div>
</div>
</div>
<!--<div class="modal" id='confirmUpdateEvent' ng-include src="__root+'components/utils/modalPromptForm.html'" ng-controller="ModalPromptCtr"></div>-->
<div class="chatPopupManager" ng-if="eventsCtrl.eventDetails" ng-include src="__root+'components/projects/events/details-popup.html'"></div>
<div class="chatPopupManager" ng-if="eventsCtrl.eventPopup().state==true" ng-controller="EventNewCtrl as newEventCtrl" ng-include src="__root+'components/projects/events/new-popup.html'"></div>
<!--<div class="modal" id='confirmUpdateEvent' ng-include src="__root+'components/utils/modalPromptForm.html'" ng-controller="ModalPromptCtr"></div>-->
<div class="chatPopupManager" ng-if="eventsCtrl.eventDetails" ng-include
src="__root+'components/projects/events/details-popup.html'"></div>
<div class="chatPopupManager" ng-controller="EventNewCtrl as newEventCtrl"
ng-if="eventsCtrl.eventPopup().state==true" ng-include
src="__root+'components/projects/events/new-popup.html'"></div>
......@@ -51,23 +51,23 @@ root.controller('EventOverviewCtrl', ['$scope', '$stateParams', '$http','$prompt
$state.go('project.events', {action: event.eventId}, {notify: false}) ;
}
$eventsFactory.set_popupState(true, mode, event);
//eventsCtrl.eventPopup=$eventsFactory.get_popupState();
}
eventsCtrl.setCurrentEvent = function(id){
if(id==-1) eventsCtrl.currentEvent = {id:null}
else {
eventsCtrl.currentEvent = eventsCtrl.currentEvents[id];
eventsCtrl.getEventDetails(eventsCtrl.currentEvent);
}
}
eventsCtrl.refreshEvents = function(value){
$eventsFactory.getEventsByProject($scope._getProject(), function(data){
if(data.status == "success"){
......
!function(){"use strict";function t(t,e,n,s,o,r,a){function i(){return B.length}function l(t){if(1!==arguments.length||t)if(t)d(t.toastId);else for(var e=0;e<B.length;e++)d(B[e].toastId)}function c(t,e,n){var s=v().iconClasses.error;return g(s,t,e,n)}function u(t,e,n){var s=v().iconClasses.info;return g(s,t,e,n)}function p(t,e,n){var s=v().iconClasses.success;return g(s,t,e,n)}function f(t,e,n){var s=v().iconClasses.warning;return g(s,t,e,n)}function m(t,e){t&&t.isOpened&&B.indexOf(t)>=0&&t.scope.refreshTimer(e)}function d(e,n){function s(t){for(var e=0;e<B.length;e++)if(B[e].toastId===t)return B[e]}function o(){return!B.length}var i=s(e);i&&!i.deleting&&(i.deleting=!0,i.isOpened=!1,t.leave(i.el).then(function(){i.scope.options.onHidden&&i.scope.options.onHidden(!!n,i),i.scope.$destroy();var t=B.indexOf(i);delete w[i.scope.message],B.splice(t,1);var e=r.maxOpened;e&&B.length>=e&&B[e-1].open.resolve(),o()&&(O.remove(),O=null,$=a.defer())}))}function g(t,e,n,s){return angular.isObject(n)&&(s=n,n=null),C({iconClass:t,message:e,optionsOverride:s,title:n})}function v(){return angular.extend({},r)}function h(e){if(O)return $.promise;O=angular.element("<div></div>"),O.attr("id",e.containerId),O.addClass(e.positionClass),O.css({"pointer-events":"auto"});var n=angular.element(document.querySelector(e.target));if(!n||!n.length)throw"Target for toasts doesn't exist";return t.enter(O,n).then(function(){$.resolve()}),$.promise}function C(n){function r(){return f.autoDismiss&&f.maxOpened&&B.length>f.maxOpened}function i(t,e,n){function s(e){if(n[e])return function(){n[e](t)}}n.allowHtml?(t.scope.allowHtml=!0,t.scope.title=o.trustAsHtml(e.title),t.scope.message=o.trustAsHtml(e.message)):(t.scope.title=e.title,t.scope.message=e.message),t.scope.toastType=t.iconClass,t.scope.toastId=t.toastId,t.scope.extraData=n.extraData,t.scope.options={extendedTimeOut:n.extendedTimeOut,messageClass:n.messageClass,onHidden:n.onHidden,onShown:s("onShown"),onTap:s("onTap"),progressBar:n.progressBar,tapToDismiss:n.tapToDismiss,timeOut:n.timeOut,titleClass:n.titleClass,toastClass:n.toastClass},n.closeButton&&(t.scope.options.closeHtml=n.closeHtml)}function l(){function t(t){for(var e=["containerId","iconClasses","maxOpened","newestOnTop","positionClass","preventDuplicates","preventOpenDuplicates","templates"],n=0,s=e.length;n<s;n++)delete t[e[n]];return t}var e={toastId:T++,isOpened:!1,scope:s.$new(),open:a.defer()};return e.iconClass=n.iconClass,n.optionsOverride&&(angular.extend(f,t(n.optionsOverride)),e.iconClass=n.optionsOverride.iconClass||e.iconClass),i(e,n,f),e.el=c(e.scope),e}function c(t){var n=angular.element("<div toast></div>"),s=e.get("$compile");return s(n)(t)}function u(){return f.maxOpened&&B.length<=f.maxOpened||!f.maxOpened}function p(){var t=f.preventDuplicates&&n.message===x,e=f.preventOpenDuplicates&&w[n.message];return!(!t&&!e)||(x=n.message,w[n.message]=!0,!1)}var f=v();if(!p()){var m=l();if(B.push(m),r())for(var g=B.slice(0,B.length-f.maxOpened),C=0,$=g.length;C<$;C++)d(g[C].toastId);return u()&&m.open.resolve(),m.open.promise.then(function(){h(f).then(function(){if(m.isOpened=!0,f.newestOnTop)t.enter(m.el,O).then(function(){m.scope.init()});else{var e=O[0].lastChild?angular.element(O[0].lastChild):null;t.enter(m.el,O,e).then(function(){m.scope.init()})}})}),m}}var O,T=0,B=[],x="",w={},$=a.defer(),D={active:i,clear:l,error:c,info:u,remove:d,success:p,warning:f,refreshTimer:m};return D}angular.module("toastr",[]).factory("toastr",t),t.$inject=["$animate","$injector","$document","$rootScope","$sce","toastrConfig","$q"]}(),function(){"use strict";angular.module("toastr").constant("toastrConfig",{allowHtml:!1,autoDismiss:!1,closeButton:!1,closeHtml:"<button>&times;</button>",containerId:"toast-container",extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},maxOpened:0,messageClass:"toast-message",newestOnTop:!0,onHidden:null,onShown:null,onTap:null,positionClass:"toast-top-right",preventDuplicates:!1,preventOpenDuplicates:!1,progressBar:!1,tapToDismiss:!0,target:"body",templates:{toast:"directives/toast/toast.html",progressbar:"directives/progressbar/progressbar.html"},timeOut:5e3,