Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions class/Controller/Show/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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)
Expand Down
42 changes: 0 additions & 42 deletions class/Factory/React.php

This file was deleted.

3 changes: 0 additions & 3 deletions config/react.php

This file was deleted.

12 changes: 7 additions & 5 deletions exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ exports.APP_DIR = exports.path.resolve(__dirname, 'javascript')

exports.entry = {
vendor: ['react', 'react-dom'],
/*
ShowList: exports.APP_DIR + '/ShowList/index.jsx',
SlideList: exports.APP_DIR + '/SlideList/index.jsx',
SlideEdit: exports.APP_DIR + '/SlideEdit/index.jsx',
*/

shows: exports.APP_DIR + '/Show/index.jsx',
/*SlideEdit: exports.APP_DIR + '/Slide/edit.jsx',
Present: exports.APP_DIR + '/Show/Present.jsx',
ShowView: exports.APP_DIR + 'Show/ShowView.jsx',
ShowCard: exports.APP_DIR + 'Show/ShowCard.jsx'*/

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'
import React from 'react'

export default class present {
export default class Present {
constructor(props) {
this.state = {
show: new Show(),
Expand Down
1 change: 1 addition & 0 deletions javascript/Show/ShowCard.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component} from 'react'

export default class ShowCard extends Component {
constructor() {
this.state = {
Expand Down
3 changes: 2 additions & 1 deletion javascript/Show/ShowList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, {Component} from 'react'

export default class ShowList extends Component{
constructor() {
super()
this.state = {
showsList: getShows()
}
Expand All @@ -18,7 +19,7 @@ export default class ShowList extends Component{
</div></div>)
} else {
cards = this.props.shows.map(function (id) {
return <ShowCard id={id}\>
return <ShowCard id={id}/>
}.bind(this))
}

Expand Down
13 changes: 7 additions & 6 deletions javascript/Show/ShowView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div>
<h2>Shows:</h2>
// TODO: ALl the current shows that are associtaed with the admin user
// will be rendered her somehow...
<ShowList shows={}/>
// will be rendered here somehow... maybe json of slides
<ShowList />
</div>
)
]
}
}
4 changes: 2 additions & 2 deletions javascript/index.jsx → javascript/Show/index.jsx
Original file line number Diff line number Diff line change
@@ -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(
<ShowView/>, document.getElementById('ShowList'))
<ShowView/>, document.getElementById('ShowView'))