// Licensed Materials - Property of IBM // // IBM Cognos Products: pps // // (C) Copyright IBM Corp. 2005, 2017 // // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. //The drag and Drop gloabl object that allows for a common Drag and Drop //Framework between Netscape and IE. function dragAndDropManager() { //Memeber variables this.isDragging = false; this.isXtabElementDragging = false; this.isCarrying = false; this.data = ""; this.clickedItem = null; this.isMeasure = false; this.hierRootofDraggedCategory = 0; this.setDrag = function(text) { this.isDragging = true; this.data = text; } this.isDraggingAnItem = function() { return (this.isDragging || this.isXtabElementDragging || this.isCarrying); } this.setCarry = function(item) { this.isCarrying = true; this.isMeasure = gDimensionInfo[item.getAttribute("dimIdx")].isMeasureDimension; this.clickedItem = item; window.TreeToolBar.setAllButtons(); } this.setHierRootOfDraggedCategory = function(hierRoot) { this.hierRootofDraggedCategory = hierRoot; } this.getHierRootOfDraggedCategory = function() { return this.hierRootofDraggedCategory; } this.setXtabElementDrag = function(obj) { this.isXtabElementDragging = true; this.data = obj; } this.cancelDrag = function() { if (this.isCarrying) { this.clickedItem = null; this.isCarrying = false; window.TreeToolBar.setAllButtons(); } this.isDragging = false; this.isXtabElementDragging = false; this.hierRootofDraggedCategory = 0; window.DimTree.deselectAll(); } this.getData = function() { if (this.isDragging || this.isXtabElementDragging) return this.data; else return ""; } } function clickProcessDrop(event) { var dndManager = topparent.getGlobal("dndManager"); if (dndManager.isCarrying) { processDrop(event); } } function clearDrag(event) { var dndManager = topparent.getGlobal("dndManager"); if (dndManager.isCarrying) { dndManager.cancelDrag(); } } function dropOrSelect(event) { if (topparent.getGlobal("dndManager").isCarrying) processDrop(event); else processSelection(event); } function dragMouseOver(event) { if (topparent.getGlobal("dndManager").isCarrying) processDragEnter(event); } function dragMouseOut(event) { if (topparent.getGlobal("dndManager").isCarrying) processDragLeave(event); } function preventNetscapeDrag(event) { // Deprecated function: Drag&Drop now enabled on all browsers // var eventM = new eventManager(event); // eventM.preventDefault(); }