Search in sources :

Example 1 with WysiwygEditor

use of com.googlecode.wicket.jquery.ui.plugins.wysiwyg.WysiwygEditor 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)

Aggregations

WysiwygEditor (com.googlecode.wicket.jquery.ui.plugins.wysiwyg.WysiwygEditor)1 DefaultWysiwygToolbar (com.googlecode.wicket.jquery.ui.plugins.wysiwyg.toolbar.DefaultWysiwygToolbar)1 DialogButton (com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton)1 PrivateMessage (org.apache.openmeetings.db.entity.user.PrivateMessage)1 RoomTypeDropDown (org.apache.openmeetings.web.util.RoomTypeDropDown)1 UserMultiChoice (org.apache.openmeetings.web.util.UserMultiChoice)1 AjaxEventBehavior (org.apache.wicket.ajax.AjaxEventBehavior)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 CheckBox (org.apache.wicket.markup.html.form.CheckBox)1