use of com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog in project openmeetings by apache.
the class PollResultsDialog method onInitialize.
@Override
protected void onInitialize() {
getTitle().setObject(getString("37"));
cancel = new DialogButton("cancel", getString("lbl.cancel"));
close = new DialogButton("close", getString("1418"));
delete = new DialogButton("delete", getString("1420"));
add(closeConfirm = new MessageDialog("closeConfirm", getString("1418"), getString("1419"), DialogButtons.YES_NO, DialogIcon.WARN) {
private static final long serialVersionUID = 1L;
@Override
public void onClose(IPartialPageRequestHandler handler, DialogButton button) {
if (button != null && button.match(YES)) {
Long id = dispForm.getModelObject().getId();
pollDao.close(roomId);
selForm.updateModel(handler);
RoomPoll p = pollDao.get(id);
selForm.select.setModelObject(p);
dispForm.updateModel(p, true, handler);
sendRoom(new RoomMessage(roomId, findParent(MainPanel.class).getClient(), RoomMessage.Type.pollUpdated));
}
}
});
add(deleteConfirm = new MessageDialog("deleteConfirm", getString("1420"), getString("1421"), DialogButtons.YES_NO, DialogIcon.WARN) {
private static final long serialVersionUID = 1L;
@Override
public void onClose(IPartialPageRequestHandler handler, DialogButton button) {
if (button != null && button.match(YES)) {
pollDao.delete(dispForm.getModelObject());
selForm.updateModel(handler);
dispForm.updateModel(selForm.select.getModelObject(), true, handler);
sendRoom(new RoomMessage(roomId, findParent(MainPanel.class).getClient(), RoomMessage.Type.pollUpdated));
}
}
});
super.onInitialize();
}
use of com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog in project openmeetings by apache.
the class UsersPanel method onInitialize.
@Override
protected void onInitialize() {
final MessageDialog warning = new MessageDialog("warning", getString("797"), getString("warn.nogroup"), DialogButtons.OK, DialogIcon.WARN) {
private static final long serialVersionUID = 1L;
@Override
public void onClose(IPartialPageRequestHandler handler, DialogButton button) {
// no-op
}
};
form = new UserForm("form", listContainer, userDao.getNewUserInstance(userDao.get(getUserId())), warning);
form.showNewRecord();
add(form, warning);
super.onInitialize();
}
use of com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog in project openmeetings by apache.
the class HashPage method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
StringValue secure = p.get(HASH);
StringValue invitation = p.get(INVITATION_HASH);
WebSession ws = WebSession.get();
ws.checkHashes(secure, invitation);
String errorMsg = getString("invalid.hash");
recContainer.setVisible(false);
add(new EmptyPanel(PANEL_MAIN).setVisible(false));
if (!invitation.isEmpty()) {
Invitation i = ws.getInvitation();
if (i == null) {
errorMsg = getString("error.hash.invalid");
} else if (!i.isAllowEntry()) {
FastDateFormat sdf = FormatHelper.getDateTimeFormat(i.getInvitee());
errorMsg = Valid.OneTime == i.getValid() ? getString("error.hash.used") : String.format("%s %s - %s, %s", getString("error.hash.period"), sdf.format(i.getValidFrom()), sdf.format(i.getValidTo()), i.getInvitee().getTimeZoneId());
} else {
Recording rec = i.getRecording();
if (rec != null) {
vi.setVisible(!i.isPasswordProtected());
vp.setVisible(!i.isPasswordProtected());
if (!i.isPasswordProtected()) {
vi.update(null, rec);
vp.update(null, rec);
}
recContainer.setVisible(true);
error = false;
}
Room r = i.getRoom();
if (r != null && !r.isDeleted()) {
createRoom(r.getId());
if (i.isPasswordProtected() && rp != null) {
mp.getChat().setVisible(false);
rp.setOutputMarkupPlaceholderTag(true).setVisible(false);
}
}
}
} else if (!secure.isEmpty()) {
Long recId = getRecordingId(), roomId = ws.getRoomId();
if (recId == null && roomId == null) {
errorMsg = getString("1599");
} else if (recId != null) {
recContainer.setVisible(true);
Recording rec = recDao.get(recId);
vi.update(null, rec);
vp.update(null, rec);
error = false;
} else {
createRoom(roomId);
}
}
StringValue swf = p.get(SWF);
StringValue app = swf.isEmpty() ? p.get(APP) : swf;
if (!app.isEmpty()) {
if (APP_TYPE_NETWORK.equals(app.toString())) {
replace(new NetTestPanel(PANEL_MAIN).add(AttributeModifier.append("class", "app")));
error = false;
}
if (APP_TYPE_SETTINGS.equals(app.toString())) {
replace(new VideoSettings(PANEL_MAIN).replace(new OmWebSocketPanel("ws-panel") {
private static final long serialVersionUID = 1L;
private WsClient c = null;
@Override
protected void onConnect(ConnectedMessage message) {
c = new WsClient(message.getSessionId(), message.getKey().hashCode());
}
@Override
protected IWsClient getWsClient() {
return c;
}
}).add(new OmAjaxClientInfoBehavior() {
private static final long serialVersionUID = 1L;
@Override
protected void onClientInfo(AjaxRequestTarget target, WebClientInfo info) {
super.onClientInfo(target, info);
target.appendJavaScript(String.format("VideoSettings.init(%s);VideoSettings.open();", VideoSettings.getInitJson("noclient")));
}
}));
error = false;
}
}
add(recContainer.add(vi.setShowShare(false).setOutputMarkupPlaceholderTag(true), vp.setOutputMarkupPlaceholderTag(true)), new InvitationPasswordDialog("i-pass", this));
remove(urlParametersReceivingBehavior);
add(new MessageDialog("access-denied", getString("invalid.hash"), errorMsg, DialogButtons.OK, DialogIcon.ERROR) {
private static final long serialVersionUID = 1L;
@Override
public void onConfigure(JQueryBehavior behavior) {
super.onConfigure(behavior);
behavior.setOption("autoOpen", error);
behavior.setOption("resizable", false);
}
@Override
public void onClose(IPartialPageRequestHandler handler, DialogButton button) {
// no-op
}
});
}
use of com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog in project openmeetings by apache.
the class AppointmentDialog method onInitialize.
@Override
protected void onInitialize() {
getTitle().setObject(getString("815"));
save = new DialogButton("save", getString("144"));
cancel = new DialogButton("cancel", getString("lbl.cancel"));
delete = new DialogButton("delete", getString("80"));
enterRoom = new DialogButton("enterRoom", getString("1282"));
confirmDelete = new MessageDialog("confirmDelete", getString("80"), getString("833"), DialogButtons.OK_CANCEL, DialogIcon.WARN) {
private static final long serialVersionUID = 1L;
@Override
public void onClose(IPartialPageRequestHandler handler, DialogButton button) {
if (button != null && button.match(AbstractDialog.OK)) {
deleteAppointment(handler);
}
}
};
add(confirmDelete);
super.onInitialize();
}
use of com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog in project openmeetings by apache.
the class CalendarDialog method onInitialize.
@Override
protected void onInitialize() {
getTitle().setObject(getString("calendar.dialogTitle"));
save = new DialogButton("save", getString("144"));
cancel = new DialogButton("cancel", getString("lbl.cancel"));
delete = new DialogButton("delete", getString("80"));
confirmDelete = new MessageDialog("confirmDelete", getString("80"), getString("833"), DialogButtons.OK_CANCEL, DialogIcon.WARN) {
private static final long serialVersionUID = 1L;
@Override
public void onClose(IPartialPageRequestHandler handler, DialogButton button) {
if (button != null && button.match(AbstractDialog.OK)) {
apptManager.deleteCalendar(form.getModelObject());
calendarPanel.refresh(handler);
calendarPanel.refreshCalendars(handler);
}
}
};
add(confirmDelete);
super.onInitialize();
}
Aggregations