From 70ca10b423de4a57a395798aa94189ba4da7840f Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Thu, 21 Jul 2016 19:13:16 +0200
Subject: moved editor to raw_view mode, add content_file_upload

---
 web/src/js/components/common/CodeEditor.jsx | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'web/src/js/components/common/CodeEditor.jsx')

diff --git a/web/src/js/components/common/CodeEditor.jsx b/web/src/js/components/common/CodeEditor.jsx
index 5b2305a8..ad7af39d 100644
--- a/web/src/js/components/common/CodeEditor.jsx
+++ b/web/src/js/components/common/CodeEditor.jsx
@@ -13,10 +13,6 @@ export default class CodeEditor extends Component{
         super(props)
     }
 
-    componentWillMount(){
-        this.props.onChange(this.props.content)
-    }
-
     render() {
         let options = {
             lineNumbers: true
-- 
cgit v1.2.3


From f578bf512248c609296d2ff0ea2007a6feac561f Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Fri, 22 Jul 2016 19:07:53 +0200
Subject: file upload updates contentview, editable contentloader, diffs on
 upload

---
 web/src/js/components/common/CodeEditor.jsx | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

(limited to 'web/src/js/components/common/CodeEditor.jsx')

diff --git a/web/src/js/components/common/CodeEditor.jsx b/web/src/js/components/common/CodeEditor.jsx
index ad7af39d..95f1b98b 100644
--- a/web/src/js/components/common/CodeEditor.jsx
+++ b/web/src/js/components/common/CodeEditor.jsx
@@ -3,24 +3,19 @@ import { render } from 'react-dom';
 import Codemirror from 'react-codemirror';
 
 
-export default class CodeEditor extends Component{
-     static propTypes = {
+CodeEditor.propTypes = {
         content: PropTypes.string.isRequired,
         onChange: PropTypes.func.isRequired,
-    }
+}
 
-    constructor(props){
-        super(props)
-    }
+export default function CodeEditor ( { content, onChange} ){
 
-    render() {
-        let options = {
-            lineNumbers: true
-        };
-        return (
-            <div onKeyDown={e => e.stopPropagation()}>
-                <Codemirror value={this.props.content} onChange={this.props.onChange} options={options}/>
-            </div>
-        )
-    }
+    let options = {
+        lineNumbers: true
+    };
+    return (
+        <div onKeyDown={e => e.stopPropagation()}>
+            <Codemirror value={content} onChange={onChange} options={options}/>
+        </div>
+    )
 }
-- 
cgit v1.2.3


From 70dbd1b32d13d30e15c03ee91b0fab7bfdf429b3 Mon Sep 17 00:00:00 2001
From: Maximilian Hils <git@maximilianhils.com>
Date: Mon, 25 Jul 2016 17:03:50 -0700
Subject: web: refactor ContentLoader

---
 web/src/js/components/common/CodeEditor.jsx | 21 ---------------------
 1 file changed, 21 deletions(-)
 delete mode 100644 web/src/js/components/common/CodeEditor.jsx

(limited to 'web/src/js/components/common/CodeEditor.jsx')

diff --git a/web/src/js/components/common/CodeEditor.jsx b/web/src/js/components/common/CodeEditor.jsx
deleted file mode 100644
index 95f1b98b..00000000
--- a/web/src/js/components/common/CodeEditor.jsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import React, { Component, PropTypes } from 'react'
-import { render } from 'react-dom';
-import Codemirror from 'react-codemirror';
-
-
-CodeEditor.propTypes = {
-        content: PropTypes.string.isRequired,
-        onChange: PropTypes.func.isRequired,
-}
-
-export default function CodeEditor ( { content, onChange} ){
-
-    let options = {
-        lineNumbers: true
-    };
-    return (
-        <div onKeyDown={e => e.stopPropagation()}>
-            <Codemirror value={content} onChange={onChange} options={options}/>
-        </div>
-    )
-}
-- 
cgit v1.2.3

