Question
Serialized Solutions Inc
CA
Last activity: 4 Feb 2017 9:21 EST
Preventing drop target when using Pega's Drag and Drop
Pega provides the ability to perform Drag and Drop on single elements (UI control needs to be added to repeating grid to be enabled) within the OOTB Case Manager View. (v. 7.1.8)
The UI control (pyUDashWorkAssignmentDragHandle) is the UI control that does this (coming from Pega-EndUserUI: 07-10-17).
The logic is controlled from instantiation of JS function: pega.util.DDProxy
Given this information, I have the following questions:
1. How do I find the API definitions for pega.util.DDProxy to determine what functionality I have available to use
2. When dragging an assignment, I would like to restrict where it gets "dropped" to -- prevent dropping it on workbaskets or worklists.
***Updated by moderator: Lochan to add Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
CA
Hi Rob,
Instead of changing the javascript file, I would recommend updating the manager portal rules that contains the case/assignment grid. Remove the control pyUDashWorkAssignmentDragHandle from the repeating grid in the section pyWorkListWidgetGridsAuto
Since the requirement is to prevent user drag and drop assignments to workbasket and worklist, why not just remove the control from UI so user wont be able to do the drag and drop?
Hope this helps.
Thanks
Tom
Pegasystems Inc.
IN
Hi Rob
I don't think there is any OOTB functionality to achieve this but we can probably use scripts to disable dropping on particular divs. Do you want the dropping feature to be disabled on multiple sections?
Serialized Solutions Inc
CA
thanks for the response. Currently, we are allowing drag and drop of only one item at a time; which allows for the customization of the UI control: pyUDashWorkAssignmentDragHandle for the single drag and drop. If there were more details for the JS function (pega.util.DDProxy), it might help...
Serialized Solutions Inc
CA
#helpMe
Pegasystems Inc.
US
Hey Rob!
Thanks for commenting so we knew you still needed assistance! I've reached out to some SMEs and added our #HelpMe tag for more visibility!
Marissa | Community Moderator | Pegasystems Inc.
Pegasystems Inc.
US
Hi Rob
I did a content search and found that it is a function defined in pega_yui_dragdrop.js.
/**
* A DragDrop implementation that inserts an empty, bordered div into
* the document that follows the cursor during drag operations. At the time of
* the click, the frame div is resized to the dimensions of the linked html
* element, and moved to the exact location of the linked element.
*
* References to the "frame" element refer to the single proxy element that
* was created to be dragged in place of all DDProxy elements on the
* page.
*
* @class DDProxy
* @extends pega.util.DD
* @constructor
* @param {String} id the id of the linked html element
* @param {String} sGroup the group of related DragDrop objects
* @param {object} config an object containing configurable attributes
* Valid properties for DDProxy in addition to those in DragDrop:
* resizeFrame, centerFrame, dragElId
*/
pega.util.DDProxy = function(id, sGroup, config) {
if (id) {
this.init(id, sGroup, config);
this.initFrame();
}
};
Hope this helps.
Bhuvana.
Serialized Solutions Inc
CA
Hi @mahab1,
thank you for the details. I will look into this.
Just curious, how did you know to search for pega_yui_dragdrop.js?
thanks,
Rob
Accepted Solution
Pegasystems Inc.
CA
Hi Rob,
Instead of changing the javascript file, I would recommend updating the manager portal rules that contains the case/assignment grid. Remove the control pyUDashWorkAssignmentDragHandle from the repeating grid in the section pyWorkListWidgetGridsAuto
Since the requirement is to prevent user drag and drop assignments to workbasket and worklist, why not just remove the control from UI so user wont be able to do the drag and drop?
Hope this helps.
Thanks
Tom
Serialized Solutions Inc
CA
@Tom, Thanks for the answer
we will look into that..