From 08628890397fbf7006838a40d96b6bc5d6ce5e1b Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 2 Dec 2016 04:38:43 -0300 Subject: [PATCH] Ivan - add topic viewer drag n drop functionality [skip ci] --- client/src/app-components/topic-viewer.js | 126 +++++++++++++++++++- client/src/app-components/topic-viewer.scss | 6 + 2 files changed, 130 insertions(+), 2 deletions(-) diff --git a/client/src/app-components/topic-viewer.js b/client/src/app-components/topic-viewer.js index 190875f4..c85cb52d 100644 --- a/client/src/app-components/topic-viewer.js +++ b/client/src/app-components/topic-viewer.js @@ -1,4 +1,6 @@ import React from 'react'; +import _ from 'lodash'; +import classNames from 'classnames'; import {Link} from 'react-router'; import i18n from 'lib-app/i18n'; @@ -27,6 +29,11 @@ class TopicViewer extends React.Component { editable: true }; + state = { + articles: this.props.articles, + currentDraggedId: 0 + }; + render() { return (
@@ -37,7 +44,7 @@ class TopicViewer extends React.Component { {(this.props.editable) ? this.renderDeleteButton() : null}