ProShell v2.0
Dashboard
Server Info
Server: 158.106.128.192
PHP: 8.2.33
home
planet5
public_html
bansibaba.com
wp-includes
2026-09-17 11:12:57
Editing: drag-drop-context.jsx
Cancel
Save Changes
// External Dependencies import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { DragDropManager } from 'dnd-core'; import HTML5Backend from 'react-dnd-html5-backend'; // Internal Dependencies import { top_window } from '../../utils/frame-helpers'; /** * Singleton for getting HTML5 Backend context to ensure it is only initialized once. * * @see https://github.com/react-dnd/react-dnd/issues/186 */ let _dndContext; function getDndContext() { if(_dndContext) { return _dndContext; } _dndContext = new DragDropManager(HTML5Backend, {window: top_window}); return _dndContext; } /** * DnD Context Wrapper which uses context singleton to ensure no double HTML5 Backend * This wrapper also automatically switch window context for BFB */ class ETDragDropContextWrapper extends Component { static childContextTypes = { dragDropManager: PropTypes.object.isRequired }; getChildContext() { return { dragDropManager: getDndContext(), } } render() { return( <div> {this.props.children} </div> ) } } export default ETDragDropContextWrapper;
Upload Files
Cancel
Upload
Create New
Cancel
Create
Change Permissions
Cancel
Save
Change Date
Cancel
Save
Rename Item
Cancel
Save
Confirm Delete
Are you sure you want to delete the selected items?
Cancel
Delete