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:
@@ -20,9 +20,9 @@
|
||||
User list
|
||||
</div>
|
||||
<div class="dynamicListPlaceholder">
|
||||
Please enter a value in the filter field.
|
||||
Sorry, there's no users matching this filter.
|
||||
</div>
|
||||
<div class="dynamicListItem" id="person_item_pattern" style="display:none;height:0px;width:0px;">
|
||||
<div class="dynamicListItemPattern" id="person_item_pattern" style="display:none;height:0px;width:0px;">
|
||||
<div id="person_name" style="display:table-cell;">Name</div>
|
||||
<div style="display:table-cell">
|
||||
<a href="#" id="person_add_token">+</a>
|
||||
@@ -31,6 +31,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="button" id="sendNotificationsButton" value="Send email notifications" style="display:none;"/>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -799,6 +799,12 @@ div.user_new {
|
||||
.button .down {
|
||||
background-image: url(../images/button-box-down.png);
|
||||
}
|
||||
.button .hover div {
|
||||
background-image: url(../images/button-box-hover.png);
|
||||
}
|
||||
.button .down div {
|
||||
background-image: url(../images/button-box-down.png);
|
||||
}
|
||||
|
||||
.to-right {
|
||||
float: right;
|
||||
|
||||
Reference in New Issue
Block a user