minor cleanup
This commit is contained in:
parent
06f0378d28
commit
d5a42b7972
src/main/java/se/su/dsv/scipro
@ -35,7 +35,7 @@
|
||||
<button wicket:id="refreshRecipients">Refresh recipient list</button><br /><br />
|
||||
<a wicket:id="showList">Show/Hide recipients</a><br />
|
||||
<select multiple wicket:id="emailList" size="15" class="span-8">
|
||||
<option>Adam Adamsson (aaa@email)</option>
|
||||
<option>Name (e-mail)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="span-10">
|
||||
|
@ -79,6 +79,7 @@ public class AdminMailPanel extends Panel {
|
||||
public AdminMailPanel(String id) {
|
||||
super(id);
|
||||
setOutputMarkupId(true);
|
||||
//Default value
|
||||
selectedRecipientSet = ProjectMailChoice.THESIS_SUPPORT;
|
||||
setUpClassSelection();
|
||||
setUpDatePanel();
|
||||
@ -86,7 +87,6 @@ public class AdminMailPanel extends Panel {
|
||||
setUpMailForm();
|
||||
}
|
||||
|
||||
|
||||
private void setUpClassSelection() {
|
||||
projectClassSelection = new ProjectClassSelector("projectClassSelection");
|
||||
add(projectClassSelection);
|
||||
@ -94,13 +94,11 @@ public class AdminMailPanel extends Panel {
|
||||
projectClassSelection.add(new AjaxFormComponentUpdatingBehavior("onchange") {
|
||||
|
||||
private static final long serialVersionUID = -1107218480527526745L;
|
||||
|
||||
@Override
|
||||
protected void onUpdate(AjaxRequestTarget target) {
|
||||
projectClassModel = projectClassSelection.getModelObject();
|
||||
updateUserSet(target);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -136,7 +134,6 @@ public class AdminMailPanel extends Panel {
|
||||
ideaChoice = new ProjectIdeaMailChoice("ideaChoices");
|
||||
projectChoice = new ProjectMailChoice("projectChoices");
|
||||
|
||||
//Default values, taken from RadioChoice constructor above (Model.of(your choice)).
|
||||
userSet = new HashSet<User>();
|
||||
userSet = getRecipients(selectedRecipientSet, projectClassModel);
|
||||
|
||||
@ -148,9 +145,7 @@ public class AdminMailPanel extends Panel {
|
||||
addChoiceBehaviors();
|
||||
|
||||
emailList = new ListChoice<String>("emailList", new ListModel<String>(new ArrayList<String>())) {
|
||||
|
||||
private static final long serialVersionUID = -6361728706320841994L;
|
||||
|
||||
@Override
|
||||
protected CharSequence getDefaultChoice(Object selected) {
|
||||
return "";
|
||||
@ -163,12 +158,10 @@ public class AdminMailPanel extends Panel {
|
||||
|
||||
showList = new AjaxLink<String>("showList"){
|
||||
private static final long serialVersionUID = 1231753648699117745L;
|
||||
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
showRecipients();
|
||||
emailList.setVisible(!emailList.isVisible());
|
||||
|
||||
target.addComponent(showList);
|
||||
target.addComponent(emailList);
|
||||
}
|
||||
@ -180,7 +173,6 @@ public class AdminMailPanel extends Panel {
|
||||
|
||||
AjaxLink<String> refreshList = new AjaxLink<String>("refreshRecipients"){
|
||||
private static final long serialVersionUID = -5312361960170366432L;
|
||||
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
updateUserSet(target);
|
||||
|
@ -160,7 +160,6 @@ public class MailFacade {
|
||||
return recipients;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method for always adding thesissupport@dsv.su.se to recipients, for backup of sent mail.
|
||||
*
|
||||
@ -169,8 +168,7 @@ public class MailFacade {
|
||||
*/
|
||||
public Set<User> addThesisSupport() {
|
||||
Set<User> thesisSupportSet = new HashSet<User>();
|
||||
User thesisSupport = userDao.getUserByEmail("emil.siverhall@gmail.com");//Remove after testing
|
||||
// User thesisSupport = userDao.getUserByEmail("thesissupport@dsv.su.se");
|
||||
User thesisSupport = userDao.getUserByEmail("thesissupport@dsv.su.se");
|
||||
if (thesisSupport!=null)
|
||||
thesisSupportSet.add(thesisSupport);
|
||||
return thesisSupportSet;
|
||||
|
Loading…
x
Reference in New Issue
Block a user