diff --git a/class/Controller/Show/Admin.php b/class/Controller/Show/Admin.php index 53b2ef6..5fdf3fd 100644 --- a/class/Controller/Show/Admin.php +++ b/class/Controller/Show/Admin.php @@ -29,7 +29,6 @@ use Canopy\Request; use slideshow\Factory\NavBar; use slideshow\Factory\ShowFactory; -use slideshow\Factory\React; // Yet to be used. class Admin extends Base { @@ -48,7 +47,7 @@ public function postCommand(Request $request) protected function listHtmlCommand(Request $request) { $this->createShowButton(); - return $this->factory->scriptView('ShowList'); + return $this->factory->scriptView('shows'); } protected function listJsonCommand(Request $request) diff --git a/class/Factory/React.php b/class/Factory/React.php deleted file mode 100644 index f8a759b..0000000 --- a/class/Factory/React.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class React -{ - - public static function view($view_name) - { - static $vendor_included = false; - if (!$vendor_included) { - $script[] = self::getScript('vendor'); - $vendor_included = true; - } - $script[] = self::getScript($view_name); - $react = implode("\n", $script); - $content = << -$react -EOF; - return $content; - } - - public static function getScript($filename) - { - $root_directory = PHPWS_SOURCE_HTTP . 'mod/slideshow/javascript/'; - if (SYSTEMS_REACT_DEV) { - $path = "dev/$filename.js"; - } else { - $path = "build/$filename.js"; - } - $script = ""; - return $script; - } - -} diff --git a/config/react.php b/config/react.php deleted file mode 100644 index 55b363b..0000000 --- a/config/react.php +++ /dev/null @@ -1,3 +0,0 @@ -) } else { cards = this.props.shows.map(function (id) { - return + return }.bind(this)) } diff --git a/javascript/Show/ShowView.jsx b/javascript/Show/ShowView.jsx index a0410e5..5fc7bcb 100644 --- a/javascript/Show/ShowView.jsx +++ b/javascript/Show/ShowView.jsx @@ -3,20 +3,21 @@ import React, {Component} from 'react' import ShowList from './ShowList.jsx' export default class ShowView extends Component { - constructor(props) { + constructor() { + super() this.state = {} } - } - render() [ + + render() { return (

Shows:

// TODO: ALl the current shows that are associtaed with the admin user - // will be rendered her somehow... - + // will be rendered here somehow... maybe json of slides +
) - ] + } } diff --git a/javascript/index.jsx b/javascript/Show/index.jsx similarity index 50% rename from javascript/index.jsx rename to javascript/Show/index.jsx index 066d582..33f5330 100644 --- a/javascript/index.jsx +++ b/javascript/Show/index.jsx @@ -1,7 +1,7 @@ 'use strict' import React from 'react' import ReactDOM from 'react-dom' -import ShowView from 'ShowView.jsx' +import ShowView from './ShowView.jsx' ReactDOM.render( - , document.getElementById('ShowList')) + , document.getElementById('ShowView'))