Search in sources :

Example 1 with DialogButton

use of com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton in project openmeetings by apache.

the class MessageDialog method onInitialize.

@Override
protected void onInitialize() {
    getTitle().setObject(getString("1209"));
    send = new DialogButton("send", getString("218"));
    cancel = new DialogButton("cancel", getString("lbl.cancel"));
    form.add(feedback.setOutputMarkupId(true));
    form.add(new UserMultiChoice("to", modelTo).setRequired(true));
    form.add(new TextField<String>("subject"));
    DefaultWysiwygToolbar toolbar = new DefaultWysiwygToolbar("toolbarContainer");
    form.add(toolbar);
    form.add(new WysiwygEditor("message", toolbar));
    form.add(roomParamsBlock.setOutputMarkupId(true));
    final CheckBox bookedRoom = new CheckBox("bookedRoom");
    form.add(bookedRoom.setOutputMarkupId(true).add(new AjaxEventBehavior(EVT_CLICK) {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onEvent(AjaxRequestTarget target) {
            PrivateMessage p = MessageDialog.this.getModelObject();
            p.setBookedRoom(!p.isBookedRoom());
            roomParams.setVisible(p.isBookedRoom());
            target.add(bookedRoom, roomParamsBlock);
        }
    }));
    bookedRoom.setVisible(cfgDao.getBool(CONFIG_MYROOMS_ENABLED, true));
    roomParamsBlock.add(roomParams);
    roomParams.add(new RoomTypeDropDown("room.type"));
    roomParams.add(start);
    roomParams.add(end);
    add(form.setOutputMarkupId(true));
    super.onInitialize();
}
Also used : WysiwygEditor(com.googlecode.wicket.jquery.ui.plugins.wysiwyg.WysiwygEditor) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) DialogButton(com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton) DefaultWysiwygToolbar(com.googlecode.wicket.jquery.ui.plugins.wysiwyg.toolbar.DefaultWysiwygToolbar) UserMultiChoice(org.apache.openmeetings.web.util.UserMultiChoice) AjaxEventBehavior(org.apache.wicket.ajax.AjaxEventBehavior) CheckBox(org.apache.wicket.markup.html.form.CheckBox) RoomTypeDropDown(org.apache.openmeetings.web.util.RoomTypeDropDown) PrivateMessage(org.apache.openmeetings.db.entity.user.PrivateMessage)

Example 2 with DialogButton

use of com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton in project openmeetings by apache.

the class UserInfoDialog method onInitialize.

@Override
protected void onInitialize() {
    getTitle().setObject(getString("1235"));
    cancel = new DialogButton("cancel", getString("lbl.cancel"));
    message = new DialogButton("message", getString("1253"));
    contacts = new DialogButton("contacts", getString("1186"));
    add(container.add(new WebMarkupContainer("body")).setOutputMarkupId(true));
    super.onInitialize();
}
Also used : DialogButton(com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Example 3 with DialogButton

use of com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton in project openmeetings by apache.

the class CreatePollDialog method onInitialize.

@Override
protected void onInitialize() {
    getTitle().setObject(getString("18"));
    create = new DialogButton("create", getString("22"));
    cancel = new DialogButton("cancel", getString("lbl.cancel"));
    super.onInitialize();
}
Also used : DialogButton(com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton)

Example 4 with DialogButton

use of com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton 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();
}
Also used : DialogButton(com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton) MainPanel(org.apache.openmeetings.web.common.MainPanel) RoomMessage(org.apache.openmeetings.db.util.ws.RoomMessage) IPartialPageRequestHandler(org.apache.wicket.core.request.handler.IPartialPageRequestHandler) MessageDialog(com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog) RoomPoll(org.apache.openmeetings.db.entity.room.RoomPoll)

Example 5 with DialogButton

use of com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton in project openmeetings by apache.

the class UploadDialog method onInitialize.

@Override
protected void onInitialize() {
    getTitle().setObject(getString("304"));
    upload = new DialogButton("upload", getString("593"), false) {

        private static final long serialVersionUID = 1L;

        @Override
        public boolean isIndicating() {
            return true;
        }
    };
    cancel = new DialogButton("close", getString("85"));
    super.onInitialize();
}
Also used : DialogButton(com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton)

Aggregations

DialogButton (com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton)26 IPartialPageRequestHandler (org.apache.wicket.core.request.handler.IPartialPageRequestHandler)10 MessageDialog (com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog)6 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)5 NonClosableMessageDialog (org.apache.openmeetings.web.util.NonClosableMessageDialog)3 JQueryBehavior (com.googlecode.wicket.jquery.core.JQueryBehavior)2 Room (org.apache.openmeetings.db.entity.room.Room)2 PrivateMessage (org.apache.openmeetings.db.entity.user.PrivateMessage)2 Component (org.apache.wicket.Component)2 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)2 EmptyPanel (org.apache.wicket.markup.html.panel.EmptyPanel)2 JSONObject (com.github.openjson.JSONObject)1 Droppable (com.googlecode.wicket.jquery.ui.interaction.droppable.Droppable)1 WysiwygEditor (com.googlecode.wicket.jquery.ui.plugins.wysiwyg.WysiwygEditor)1 DefaultWysiwygToolbar (com.googlecode.wicket.jquery.ui.plugins.wysiwyg.toolbar.DefaultWysiwygToolbar)1 Calendar (java.util.Calendar)1 FastDateFormat (org.apache.commons.lang3.time.FastDateFormat)1 StrongPasswordValidator (org.apache.openmeetings.core.util.StrongPasswordValidator)1 IWsClient (org.apache.openmeetings.db.entity.basic.IWsClient)1 WsClient (org.apache.openmeetings.db.entity.basic.WsClient)1