diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java index 8f967a6137..bae680cec3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java @@ -62,6 +62,7 @@ import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.MaximizeEvent; import org.zkoss.zul.Anchorchildren; import org.zkoss.zul.Anchorlayout; +import org.zkoss.zul.Caption; import org.zkoss.zul.Html; import org.zkoss.zul.Iframe; import org.zkoss.zul.Include; @@ -159,12 +160,13 @@ public class DashboardController implements EventListener { } Panel panel = new Panel(); + Caption caption = new Caption(dc.get_Translation(MDashboardContent.COLUMNNAME_Name)); + panel.appendChild(caption); panel.setAttribute("PA_DashboardContent_ID", dp.getPA_DashboardContent_ID()); panel.setAttribute("PA_DashboardPreference_ID", dp.getPA_DashboardPreference_ID()); panelList.add(panel); panel.addEventListener(Events.ON_MAXIMIZE, this); panel.setSclass("dashboard-widget"); - panel.setTitle(dc.get_Translation(MDashboardContent.COLUMNNAME_Name)); panel.setMaximizable(true); String description = dc.get_Translation(MDashboardContent.COLUMNNAME_Description); @@ -176,7 +178,7 @@ public class DashboardController implements EventListener { panel.addEventListener(Events.ON_OPEN, this); panel.setDroppable("true"); - panel.setDraggable("true"); + panel.getCaption().setDraggable("true"); panel.addEventListener(Events.ON_DROP, this); panel.setBorder("normal"); @@ -455,11 +457,16 @@ public class DashboardController implements EventListener { DropEvent de = (DropEvent) event; Component dragged = de.getDragged(); - if(dragged instanceof Panel) + if(dragged instanceof Caption) { - Panel panel = (Panel) dragged; - - if(comp instanceof Panel) + Caption caption = (Caption) dragged; + Panel panel = null; + if (caption.getParent() instanceof Panel) + panel = (Panel) caption.getParent(); + + if (panel == null) + ; + else if(comp instanceof Panel) { Panel target = (Panel) comp; diff --git a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp index ad97af5834..625c91e190 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -592,10 +592,19 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none { .z-panel-hl .z-panel-header { padding: 0 0 2px 0; color: #262626; + background: #F4F4F4; font-weight: 300; font-size: 13px; } +.z-caption .z-caption-l, .z-caption .z-caption-r { + padding: 0 0 2px 0; + color: #262626; + font-weight: 300; + font-size: 13px; + cursor: move; +} + .desktop-home-tabpanel .z-panel-tl, .desktop-home-tabpanel .z-panel-tr, .desktop-home-tabpanel .z-panel-hr, .desktop-home-tabpanel .z-panel-hl, .desktop-home-tabpanel .z-panel-hm {