Author: vdegtyarev
Date: Mon Jul 29 05:29:53 2013
New Revision: 1507940
URL: http://svn.apache.org/r1507940
Log:
OPENMEETINGS-719 is fixed
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html?rev=1507940&r1=1507939&r2=1507940&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html
Mon Jul 29 05:29:53 2013
@@ -90,5 +90,6 @@
</table>
</form>
<div wicket:id="addAttendees"></div>
+ <div wicket:id="confirmDelete"></div>
</wicket:panel>
</html>
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java?rev=1507940&r1=1507939&r2=1507940&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
Mon Jul 29 05:29:53 2013
@@ -66,6 +66,10 @@ import org.slf4j.Logger;
import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
+import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButtons;
+import com.googlecode.wicket.jquery.ui.widget.dialog.DialogIcon;
+import com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog;
+
public class AppointmentDialog extends AbstractFormDialog<Appointment> {
@@ -79,6 +83,7 @@ public class AppointmentDialog extends A
private final CalendarPanel calendar;
protected final FeedbackPanel feedback;
final MeetingMemberDialog addAttendees;
+ final MessageDialog confirmDelete;
@Override
public int getWidth() {
@@ -107,6 +112,23 @@ public class AppointmentDialog extends A
add(form);
addAttendees = new MeetingMemberDialog("addAttendees",
WebSession.getString(812), model, form.get("attendeeContainer"));
add(addAttendees);
+ confirmDelete = new MessageDialog("confirmDelete",
WebSession.getString(814), WebSession.getString(833), DialogButtons.OK_CANCEL,
DialogIcon.WARN){
+ private static final long serialVersionUID = 1L;
+
+ public void onClose(AjaxRequestTarget target,
DialogButton button)
+ {
+ if (button.equals(DialogButtons.OK)){
+ deleteAppointment(target);
+ }
+ }
+
+ };
+ add(confirmDelete);
+ }
+
+ protected void deleteAppointment(AjaxRequestTarget target) {
+
getBean(AppointmentLogic.class).deleteAppointment(getModelObject().getAppointmentId(),
getUserId(), getLanguage());
+ calendar.refresh(target);
}
@Override
@@ -132,8 +154,7 @@ public class AppointmentDialog extends A
@Override
public void onClose(AjaxRequestTarget target, DialogButton button) {
if (delete.equals(button)) {
-
getBean(AppointmentLogic.class).deleteAppointment(getModelObject().getAppointmentId(),
getUserId(), getLanguage());
- calendar.refresh(target);
+ confirmDelete.open(target);
}
}