Filter sur Admin (manage user)
Notification d'ajout de token dans admin Correction message addConference Dates Correction bug MailSenderService quand echec de l'envoi
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
var AdminManager = Class.create({
|
||||
initialize: function(){
|
||||
this.input = $('userFilterInput');
|
||||
this.input.observe('keyPress',this.userInputKeyHandler.bind(this));
|
||||
this.fillUserList();
|
||||
this.input.observe('keypress',this.userInputKeyHandler.bindAsEventListener(this));
|
||||
$('sendNotificationsButton').observe('click',this.sendNotifications.bind(this));
|
||||
this.filterTimeout = window.setTimeout(this.fillUserList.bind(this),0);
|
||||
},
|
||||
addConferenceCreationToken: function(event,user_object){
|
||||
AdminController.addConferenceCreationToken(user_object.login,
|
||||
@@ -11,6 +12,7 @@ var AdminManager = Class.create({
|
||||
updated_number);
|
||||
}
|
||||
);
|
||||
$('sendNotificationsButton').appear({duration:0.5});
|
||||
event.stop();
|
||||
},
|
||||
removeConferenceCreationToken: function(event,user_object){
|
||||
@@ -22,7 +24,16 @@ var AdminManager = Class.create({
|
||||
);
|
||||
event.stop();
|
||||
},
|
||||
userInputKeyHandler: function(){
|
||||
sendNotifications: function(){
|
||||
AdminController.sendNotifications(function(){
|
||||
alert("The users have been notified of their new rights.");
|
||||
});
|
||||
},
|
||||
userInputKeyHandler: function(event){
|
||||
window.clearTimeout(this.filterTimeout);
|
||||
this.filterTimeout = window.setTimeout(
|
||||
this.fillUserList.bind(this),1000);
|
||||
this.input.pulsate({duration:1.0,from:0.7,pulses:3});
|
||||
switch(event.keyCode){
|
||||
case Event.KEY_RETURN:
|
||||
this.addRemote();
|
||||
@@ -31,12 +42,19 @@ var AdminManager = Class.create({
|
||||
}
|
||||
},
|
||||
fillUserList: function(){
|
||||
AdminController.getUsersList(function(people){
|
||||
var filter = this.input.value;
|
||||
AdminController.getUsersList(filter,function(people){
|
||||
$$('#userDynamicList .dynamicListItem').invoke("remove");
|
||||
var content;
|
||||
var elemName;
|
||||
var contentValue;
|
||||
var id;
|
||||
var person;
|
||||
if(people.length > 0){
|
||||
$$(".dynamicListPlaceholder").invoke("fade");
|
||||
} else {
|
||||
$$(".dynamicListPlaceholder").invoke("appear");
|
||||
}
|
||||
for (var i = 0; i < people.length; i++) {
|
||||
person = people[i];
|
||||
id = "_"+person.id;
|
||||
@@ -46,6 +64,9 @@ var AdminManager = Class.create({
|
||||
dwr.util.setValue("person_name" + id, person.firstName + " " + person.lastName);
|
||||
dwr.util.setValue("person_num_tokens"+id,person.numTokens);
|
||||
|
||||
$(elemName).removeClassName("dynamicListItemPattern");
|
||||
$(elemName).addClassName("dynamicListItem");
|
||||
|
||||
$("person_add_token"+id).observe('click',
|
||||
this.addConferenceCreationToken.bindAsEventListener(this,person));
|
||||
$("person_remove_token"+id).observe('click',
|
||||
|
||||
Reference in New Issue
Block a user