OpenCms 8.5 修改编辑器 CmsPopup 弹出框

OpenCms 8.5 修改编辑器 CmsPopup 弹出框

升级后效果:
1.调用编辑器使用8.0.4编辑面板风格;
2.固定的弹出窗口拖动BUG修正(当样式属性Position为FIXED时);
3.增加弹出窗口拖拽控制大小效果。
[img]http://dl.iteye.com/upload/attachment/0082/8367/dfd9e667-8cdc-3119-a3b1-6844276e79c6.jpg[/img]

[b]一、内容的编辑处理程序[/b]
[b]org.opencms.ade.containerpage.client.CmsContentEditorHandler[/b]
修改openDialog()方法
注释CmsContentEditor打开的编辑器,只使用CmsContentEditorDialog 8.0.4弹出窗口——如取消经典编辑器模式的判断:
[u]m_handler.m_controller.getData().isUseClassicEditor()[/u]

[b]二、修改弹出框功能[/b]
[b]org.opencms.gwt.client.ui.CmsPopup[/b]
增加拖拽控制大小功能,(代码片段):

/** The panel for the resize button. */
private ResizeButton resizeable;

/** Flag if resizing. */
private boolean j_resizing;

/** panel's offset width. */
private int j_clientWidth;

/** panel's offset height. */
private int j_clientHeight;

// TODO 用户拖拽动态调整大小
public void addDialogResizeable() {
if (resizeable == null) {
resizeable = new ResizeButton();

resizeable.setTitle("拖拽控制窗口大小!");
resizeable.addStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().resizePopup());
resizeable.setImageClass(I_CmsLayoutBundle.INSTANCE.dialogCss().resizeablePopupImage());
resizeable.setButtonStyle(ButtonStyle.TRANSPARENT, null);

DOM.appendChild(m_containerElement, resizeable.getElement());
adopt(resizeable);
}
}


[b]三、编辑器窗口调用[/b]
[b]org.opencms.gwt.client.ui.contenteditor.CmsContentEditorDialog[/b]
openDialog()方法中增加弹出窗口可拖拽控制调用
m_dialog.addDialogResizeable();
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值