diff --git a/front-ui/app/components/browsing/bySection.js b/front-ui/app/components/browsing/bySection.js index 7da196e..7dbcd24 100644 --- a/front-ui/app/components/browsing/bySection.js +++ b/front-ui/app/components/browsing/bySection.js @@ -2,17 +2,17 @@ var React = require('react'), Router = require('react-router'); var BySection = React.createClass({ - mixins: [Router.State], + mixins: [Router.State], render : function() { - return (
+ return (
-
- Here goes section for refining search, by section -
-
-

Welcome to section {this.getParams().id}

-
-
) +
+ Here goes section for refining search, by section +
+
+

Welcome to section {this.getParams().id}

+
+
) } }); diff --git a/front-ui/app/components/items/allItems.js b/front-ui/app/components/items/allItems.js index 282b3b8..6f7c583 100644 --- a/front-ui/app/components/items/allItems.js +++ b/front-ui/app/components/items/allItems.js @@ -6,30 +6,30 @@ var ItemCollection = require('../../models/itemCollection'); var AllItems = React.createClass({ - render: function() { - if(this.state) { - return ( - + render: function() { + if(this.state) { + return ( + ); } else { - return ( -
Not Loaded !
+ return ( +
Not Loaded !
); } - }, - - // Add change listeners to stores + }, + + // Add change listeners to stores componentDidMount: function() { - ItemActions.loadFrontPageItems(); - ItemStore.addChangeListener(this._onChange); + ItemActions.loadFrontPageItems(); + ItemStore.addChangeListener(this._onChange); }, _onChange: function () { if (this.isMounted()) { this.setState({ - items: ItemStore.getItems() + items: ItemStore.getItems() }); } }, diff --git a/front-ui/app/components/items/itemWithDetailsPage.js b/front-ui/app/components/items/itemWithDetailsPage.js index 8f13493..bdad16d 100644 --- a/front-ui/app/components/items/itemWithDetailsPage.js +++ b/front-ui/app/components/items/itemWithDetailsPage.js @@ -11,61 +11,61 @@ var Navigation = Router.Navigation; var ItemWithDetailsPage = React.createClass({ - mixins : [Router.State], + mixins : [Router.State], render: function() { - return ( + return ( -
-
- -

{this.state.item.get('name')}

-
+
+
-
{this.state.item.get('list_price')} KM
-
{this.state.item.get('description')}
-
- +

{this.state.item.get('name')}

+
+ +
{this.state.item.get('list_price')} KM
+
{this.state.item.get('description')}
+
+ -
-
- quantitative descriptions -
-
+
+
+ quantitative descriptions +
+
) ; }, - // Add change listeners to stores + // Add change listeners to stores componentDidMount: function() { - //ItemStore.addChangeListener(this._onChange); - //ItemActions.loadFrontPageItems(); - - var self = this; - var item = new Item({ id: self.getParams().id }); - item.fetch({success: function() { - if (self.isMounted()) { - console.log('article loaded', item); - self.setState({ - item : item - }); - } - }}); + //ItemStore.addChangeListener(this._onChange); + //ItemActions.loadFrontPageItems(); + + var self = this; + var item = new Item({ id: self.getParams().id }); + item.fetch({success: function() { + if (self.isMounted()) { + console.log('article loaded', item); + self.setState({ + item : item + }); + } + }}); }, _onChange: function () { - this.setState({ - item: ItemStore.getSelectedItem() - }); + this.setState({ + item: ItemStore.getSelectedItem() + }); }, getInitialState: function () { return { - //item: ItemStore.getSelectedItem() - item : (new Item()) + //item: ItemStore.getSelectedItem() + item : (new Item()) }; } diff --git a/front-ui/app/components/shared/sectionsListComponent.js b/front-ui/app/components/shared/sectionsListComponent.js index fac18ff..6dfafb3 100644 --- a/front-ui/app/components/shared/sectionsListComponent.js +++ b/front-ui/app/components/shared/sectionsListComponent.js @@ -74,6 +74,7 @@ var SectionsListComponent = React.createClass({