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.
......@@ -108,19 +108,18 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
}
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{
......@@ -133,12 +132,12 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
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:""});
......@@ -149,7 +148,7 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
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();
......@@ -238,6 +237,8 @@ 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"){
newEventCtrl.getEventDetails(event);
$('.typeahead').typeahead('val','');
......
......@@ -3,41 +3,61 @@
<div class="group-overview-title">
<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 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>
<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 class="fa fa-th-large" aria-hidden="true" ng-click="eventsCtrl.switchView('details')" ng-class="{'active':eventsCtrl.screen=='details'}" style="margin-left:8px">
<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-if="_userGroups[_getFullGroup()]!='ADMIN'" ng-click="eventsCtrl.openPopup('new')">{{::_labels.addEventBtn}}</button>
<button class="pull-right" ng-click="eventsCtrl.openPopup('new')"
ng-if="_userGroups[_getFullGroup()]!='ADMIN'">{{::_labels.addEventBtn}}
</button>
</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;">
<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" 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>
<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><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>
<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>
......@@ -49,33 +69,38 @@
</div>
</div>
</div>
</div>
<div class='separator clearfix'></div>
<div class='separator clearfix'></div>
<!--
<div class="btn-group">
<!--
<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>
-->
<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>
<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>
<!--<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>
!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,titleClass:"toast-title",toastClass:"toast"})}(),function(){"use strict";function t(t){function e(t,e,n,s){function o(){var t=(i-(new Date).getTime())/a*100;e.css("width",t+"%")}var r,a,i;s.progressBar=t,t.start=function(t){r&&clearInterval(r),a=parseFloat(t),i=(new Date).getTime()+a,r=setInterval(o,10)},t.stop=function(){r&&clearInterval(r)},t.$on("$destroy",function(){clearInterval(r)})}return{require:"^toast",templateUrl:function(){return t.templates.progressbar},link:e}}angular.module("toastr").directive("progressBar",t),t.$inject=["toastrConfig"]}(),function(){"use strict";function t(){this.progressBar=null,this.startProgressBar=function(t){this.progressBar&&this.progressBar.start(t)},this.stopProgressBar=function(){this.progressBar&&this.progressBar.stop()}}angular.module("toastr").controller("ToastController",t)}(),function(){"use strict";function t(t,e,n,s){function o(n,o,r,a){function i(t){return a.startProgressBar(t),e(function(){a.stopProgressBar(),s.remove(n.toastId)},t,1)}function l(){n.progressBar=!1,a.stopProgressBar()}function c(){return n.options.closeHtml}var u;if(n.toastClass=n.options.toastClass,n.titleClass=n.options.titleClass,n.messageClass=n.options.messageClass,n.progressBar=n.options.progressBar,c()){var p=angular.element(n.options.closeHtml),f=t.get("$compile");p.addClass("toast-close-button"),p.attr("ng-click","close(true, $event)"),f(p)(n),o.children().prepend(p)}n.init=function(){n.options.timeOut&&(u=i(n.options.timeOut)),n.options.onShown&&n.options.onShown()},o.on("mouseenter",function(){l(),u&&e.cancel(u)}),n.tapToast=function(){angular.isFunction(n.options.onTap)&&n.options.onTap(),n.options.tapToDismiss&&n.close(!0)},n.close=function(t,e){e&&angular.isFunction(e.stopPropagation)&&e.stopPropagation(),s.remove(n.toastId,t)},n.refreshTimer=function(t){u&&(e.cancel(u),u=i(t||n.options.timeOut))},o.on("mouseleave",function(){0===n.options.timeOut&&0===n.options.extendedTimeOut||(n.$apply(function(){n.progressBar=n.options.progressBar}),u=i(n.options.extendedTimeOut))})}return{templateUrl:function(){return n.templates.toast},controller:"ToastController",link:o}}angular.module("toastr").directive("toast",t),t.$inject=["$injector","$interval","toastrConfig","toastr"]}();
\ No newline at end of file
!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,
titleClass: "toast-title",
toastClass: "toast"
})
}(), function () {
"use strict";
function t(t) {
function e(t, e, n, s) {
function o() {
var t = (i - (new Date).getTime()) / a * 100;
e.css("width", t + "%")
}
var r, a, i;
s.progressBar = t, t.start = function (t) {
r && clearInterval(r), a = parseFloat(t), i = (new Date).getTime() + a, r = setInterval(o, 10)
}, t.stop = function () {
r && clearInterval(r)
}, t.$on("$destroy", function () {
clearInterval(r)
})
}
return {
require: "^toast", templateUrl: function () {
return t.templates.progressbar
}, link: e
}
}
angular.module("toastr").directive("progressBar", t), t.$inject = ["toastrConfig"]
}(), function () {
"use strict";
function t() {
this.progressBar = null, this.startProgressBar = function (t) {
this.progressBar && this.progressBar.start(t)
}, this.stopProgressBar = function () {
this.progressBar && this.progressBar.stop()
}
}
angular.module("toastr").controller("ToastController", t)
}(), function () {
"use strict";
function t(t, e, n, s) {
function o(n, o, r, a) {
function i(t) {
return a.startProgressBar(t), e(function () {
a.stopProgressBar(), s.remove(n.toastId)
}, t, 1)
}
function l() {
n.progressBar = !1, a.stopProgressBar()
}
function c() {
return n.options.closeHtml
}
var u;
if (n.toastClass = n.options.toastClass, n.titleClass = n.options.titleClass, n.messageClass = n.options.messageClass, n.progressBar = n.options.progressBar, c()) {
var p = angular.element(n.options.closeHtml), f = t.get("$compile");
p.addClass("toast-close-button"), p.attr("ng-click", "close(true, $event)"), f(p)(n), o.children().prepend(p)
}
n.init = function () {
n.options.timeOut && (u = i(n.options.timeOut)), n.options.onShown && n.options.onShown()
}, o.on("mouseenter", function () {
l(), u && e.cancel(u)
}), n.tapToast = function () {
angular.isFunction(n.options.onTap) && n.options.onTap(), n.options.tapToDismiss && n.close(!0)
}, n.close = function (t, e) {
e && angular.isFunction(e.stopPropagation) && e.stopPropagation(), s.remove(n.toastId, t)
}, n.refreshTimer = function (t) {
u && (e.cancel(u), u = i(t || n.options.timeOut))
}, o.on("mouseleave", function () {
0 === n.options.timeOut && 0 === n.options.extendedTimeOut || (n.$apply(function () {
n.progressBar = n.options.progressBar
}), u = i(n.options.extendedTimeOut))
})
}
return {
templateUrl: function () {
return n.templates.toast
}, controller: "ToastController", link: o
}
}
angular.module("toastr").directive("toast", t), t.$inject = ["$injector", "$interval", "toastrConfig", "toastr"]
}();
\ No newline at end of file
This diff is collapsed.
......@@ -79,7 +79,7 @@ function $eventsFactory($rootScope, $http,$serverFactory,$rightFactory) {
/**
* [addEvent add en event to the project]
* @param {[type]} projectId [description]
* @param {[int]} projectId [description]
* @param {[object]} event [title, description, type [object {id}],params [object {}], location [object {LOCATION}],beginDate, endDate,
* displayAll, displayByJob, invitationByJob, invitationJobs [object {id}], invitationByUrl, url, generateDocTemplate ]
* @param {[type]} success [description]
......@@ -91,9 +91,9 @@ function $eventsFactory($rootScope, $http,$serverFactory,$rightFactory) {
/**
* [updateEvent description]
* @param {[type]} projectId [description]
* @param {[int]} projectId [description]
* @param {[type]} event [description]
* @param {[type]} eventId [description]
* @param {[int]} eventId [description]
* @param {[type]} success [description]
* @param {[type]} failure [description]
* @return {[type]} [description]
......@@ -104,7 +104,8 @@ function $eventsFactory($rootScope, $http,$serverFactory,$rightFactory) {
/**
* [getEventDetails description]
* @param {[type]} projectId [description]
* @param {[int]} projectId [description]
* @param {[int]} eventId [description]
* @param {[type]} success [description]
* @param {[type]} failure [description]
* @return {[type]} [description]
......@@ -115,20 +116,20 @@ function $eventsFactory($rootScope, $http,$serverFactory,$rightFactory) {
/**
* [joinEvent description]
* @param {[type]} projectId [description]
* @param {[type]} eventId [description]
* @param {[int]} eventId [description]
* @param {[int]} userId [description]
* @param {[type]} value [description]
* @param {[type]} success [description]
* @param {[type]} failure [description]
* @return {[type]} [description]
*/
returns.joinEvent = function(projectId,eventId, value,success, failure){
return $serverFactory.runCommand("joinEvent", {projectId:projectId, eventId:eventId, value:value},success,failure);
returns.joinEvent = function(eventId, userId, value,success, failure){
return $serverFactory.runCommand("post_joinEvent", {eventId:eventId, userId:userId, value:value},success,failure);
};
/**
* [getEventsByProject description]
* @param {[type]} projectId [description]
* @param {[int]} projectId [description]
* @param {[type]} success [description]
* @param {[type]} failure [description]
* @return {[type]} [description]
......@@ -139,8 +140,8 @@ function $eventsFactory($rootScope, $http,$serverFactory,$rightFactory) {
/**
* [deleteEventByProject description]
* @param {[type]} projectId [description]
* @param {[type]} eventId [description]
* @param {[int]} projectId [description]
* @param {[int]} eventId [description]
* @param {[type]} success [description]
* @param {[type]} failure [description]
* @return {[type]} [description]
......
......@@ -72,6 +72,7 @@ function $alertFactory($languageFactory, $location, $injector, $inputErrorFactor
if (codeWaza.substring(0,1) == "2") {
$inputErrorFactory.newInputError($languageFactory._labels.errors_waza[codeWaza]);
}
else toastAlert(type, $languageFactory._labels.errors_waza[codeWaza]);
}
else showHttpAlert(type, code.substr(0,3));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment