Our customer editors complained that they have problems with using drag and drop functionality of ContentArea. They quite often use Remote Desktop connection to access the edit mode. The placeholder for ContentArea dragged element is relatively small. With the combination of RDP display lags makes using this feature difficult.
We decide to help them by increasing the drop area for ContentArea. We would like to achieve similar effect like in jQuery UI where size of drop placeholder is equals to regular item.
I didn’t want to write a lot of custom code and prepare a separated widget to represent the drop area. That’s why I tried to simply change the layout using CSS. The drop area is top and bottom borders of a regular item. I increased the size from 1px to 30px.
.Sleek .epi-tree-mngr .dojoDndItemBefore
.Sleek .epi-tree-mngr .dojoDndItemAfter
Then I included custom CSS in a global module.config file. We need to add path to a custom styles Styles/CustomEditMode.css.
<?xml version="1.0" encoding="utf-8"?>
<!-- This adds the Alloy template assembly to the "default module" -->
<add assembly="ChildrenGridView" />
<add name="epi-cms.widgets.base" path="Styles/Styles.css" resourceType="Style"/>
<add name="epi-cms.widgets.base" path="Styles/CustomEditMode.css" resourceType="Style"/>
<!-- Add a mapping from alloy to ~/ClientResources/Scripts to the dojo loader configuration -->
<add name="alloy" path="Scripts" />
The result adding those two additional styles:
Now when editor is sorting or adding new items and he need to place it between two existing items, the drop placeholder should be better accessible.