diff --git a/Users/fabienchartrain/Projets/defaultvm/glop/app/web/styles/main.css b/Users/fabienchartrain/Projets/defaultvm/glop/app/web/styles/main.css new file mode 100644 index 0000000..01b7a0e --- /dev/null +++ b/Users/fabienchartrain/Projets/defaultvm/glop/app/web/styles/main.css @@ -0,0 +1,2 @@ + write main.css + write main.css.map diff --git a/app/AppKernel.php b/app/AppKernel.php index 12c64fb..f2987b7 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -29,6 +29,7 @@ public function registerBundles() $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); + $bundles[] = new Bazinga\Bundle\FakerBundle\BazingaFakerBundle(); } return $bundles; diff --git a/app/Resources/images/LOGO_CHALLENGIEGARDEN_RVB.png b/app/Resources/images/LOGO_CHALLENGIEGARDEN_RVB.png new file mode 100644 index 0000000..7651abb Binary files /dev/null and b/app/Resources/images/LOGO_CHALLENGIEGARDEN_RVB.png differ diff --git a/app/Resources/images/engie_garden-1800x1000.jpg b/app/Resources/images/engie_garden-1800x1000.jpg new file mode 100755 index 0000000..103c4ce Binary files /dev/null and b/app/Resources/images/engie_garden-1800x1000.jpg differ diff --git a/app/Resources/images/pictos/pictos-01.svg b/app/Resources/images/pictos/pictos-01.svg new file mode 100755 index 0000000..70ad068 --- /dev/null +++ b/app/Resources/images/pictos/pictos-01.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Resources/images/pictos/pictos-02.svg b/app/Resources/images/pictos/pictos-02.svg new file mode 100755 index 0000000..3055e7f --- /dev/null +++ b/app/Resources/images/pictos/pictos-02.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Resources/images/pictos/pictos-03.svg b/app/Resources/images/pictos/pictos-03.svg new file mode 100755 index 0000000..0742f23 --- /dev/null +++ b/app/Resources/images/pictos/pictos-03.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Resources/images/pictos/pictos-04.svg b/app/Resources/images/pictos/pictos-04.svg new file mode 100755 index 0000000..51bc712 --- /dev/null +++ b/app/Resources/images/pictos/pictos-04.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Resources/images/pictos/pictos-05.svg b/app/Resources/images/pictos/pictos-05.svg new file mode 100755 index 0000000..8037d44 --- /dev/null +++ b/app/Resources/images/pictos/pictos-05.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Resources/images/pictos/pictos-06.svg b/app/Resources/images/pictos/pictos-06.svg new file mode 100755 index 0000000..2793516 --- /dev/null +++ b/app/Resources/images/pictos/pictos-06.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Resources/images/pictos/pictos-07.svg b/app/Resources/images/pictos/pictos-07.svg new file mode 100755 index 0000000..5a22307 --- /dev/null +++ b/app/Resources/images/pictos/pictos-07.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Resources/images/pictos/pictos-08.svg b/app/Resources/images/pictos/pictos-08.svg new file mode 100755 index 0000000..383bd18 --- /dev/null +++ b/app/Resources/images/pictos/pictos-08.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Resources/images/pictos/pictos-09.svg b/app/Resources/images/pictos/pictos-09.svg new file mode 100755 index 0000000..d58be16 --- /dev/null +++ b/app/Resources/images/pictos/pictos-09.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/app/Resources/images/pictos/pictos-10.svg b/app/Resources/images/pictos/pictos-10.svg new file mode 100755 index 0000000..f8834cd --- /dev/null +++ b/app/Resources/images/pictos/pictos-10.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/app/Resources/images/pictos/pictos-11.svg b/app/Resources/images/pictos/pictos-11.svg new file mode 100755 index 0000000..1243f6b --- /dev/null +++ b/app/Resources/images/pictos/pictos-11.svg @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/app/Resources/js/actions/GardenActions.js b/app/Resources/js/actions/GardenActions.js index 5de5de3..5145bba 100644 --- a/app/Resources/js/actions/GardenActions.js +++ b/app/Resources/js/actions/GardenActions.js @@ -38,9 +38,63 @@ class GardenActions { } gardenFailed(errorMessage) { + return errorMessage; + } + + updateGardenItems(gardenItems) { + return gardenItems; + } + + fetchGardenItems() { + return (dispatch) => { + dispatch(); + GardenSource.fetch('api/gardenitems') + .then((response) => { + //response.json(); + return JSON.parse(response) + }) + .then((response) => { + this.updateGardenItems(response); + }) + .catch((error) => { + this.gardenItemsFailed(error); + }); + } + } + + gardenItemsFailed(errorMessage) { console.log(errorMessage); return errorMessage; } + + focusGardenItem(gardenItem){ + return gardenItem; + } + + blurGardenItem(gardenItem){ + return gardenItem; + } + + selectGardenItem(gardenItem){ + return gardenItem; + } + + releaseGardenItem(gardenItem){ + return gardenItem; + } + + enterGardenTile(gardenTile){ + return gardenTile; + } + + leaveGardenTile(gardenTile){ + return gardenTile; + } + + dropGardenTile(gardenTile, gardenItem){ + gardenTile.item = gardenItem; + return gardenTile; + } } module.exports = alt.createActions(GardenActions); \ No newline at end of file diff --git a/app/Resources/js/actions/GardenItemActions.js b/app/Resources/js/actions/GardenItemActions.js deleted file mode 100644 index 44610e4..0000000 --- a/app/Resources/js/actions/GardenItemActions.js +++ /dev/null @@ -1,49 +0,0 @@ -var alt = require('../alt'); -var GardenSource = require('../sources/GardenSource'); - -class GardenItemActions { - - updateGardenItems(gardenItems) { - return gardenItems; - } - - fetchGardenItems() { - return (dispatch) => { - dispatch(); - GardenSource.fetch('api/gardenitems') - .then((response) => { - //response.json(); - return JSON.parse(response) - }) - .then((response) => { - this.updateGardenItems(response); - }) - .catch((error) => { - this.gardenItemsFailed(error); - }); - } - } - - gardenFocusItem(gardenItem){ - return gardenItem; - } - - gardenBlurItem(gardenItem){ - return gardenItem; - } - - gardenSelectItem(gardenItem){ - return gardenItem; - } - - gardenReleaseItem(gardenItem){ - return gardenItem; - } - - gardenItemsFailed(errorMessage) { - console.log(errorMessage); - return errorMessage; - } -} - -module.exports = alt.createActions(GardenItemActions); \ No newline at end of file diff --git a/app/Resources/js/actions/TaskActions.js b/app/Resources/js/actions/TaskActions.js deleted file mode 100644 index ed0d1f1..0000000 --- a/app/Resources/js/actions/TaskActions.js +++ /dev/null @@ -1,49 +0,0 @@ -var alt = require('../alt'); -var TaskSource = require('../sources/TaskSource'); - -class TaskActions { - - updateTasks(tasks) { - return tasks; - } - - removeTask(task) { - return task; - } - - fetchTasks() { - return (dispatch) => { - dispatch(); - fetch('/web/app_dev.php/api/tasks.json') - .then((response) => { - console.log(response); - response.json() - }) - .then((response) => { - this.updateTasks(response); - }) - .catch((error) => { - this.tasksFailed(error); - }); - } - } - - destroyTask(task) { - return (dispatch) => { - dispatch(); - fetch('/web/app_dev.php/api/tasks/' + task.id + '.json', { method: 'delete' }) - .then((response) => { - this.removeTask(task); - }) - .catch((error) => { - this.tasksFailed(error); - }); - } - } - - tasksFailed(errorMessage) { - return errorMessage; - } -} - -module.exports = alt.createActions(TaskActions); \ No newline at end of file diff --git a/app/Resources/js/components/Garden.js b/app/Resources/js/components/Garden.js index 68ecad4..a718f64 100644 --- a/app/Resources/js/components/Garden.js +++ b/app/Resources/js/components/Garden.js @@ -2,16 +2,24 @@ var React = require('react'); var ReactDOM = require('react-dom'); var update = require('react-addons-update'); +var RootPathMixin = require('../mixins/RootPathMixin'); + var GardenActions = require('../actions/GardenActions'); var GardenStore = require('../stores/GardenStore'); var Preloader = require('./utils/Preloader'); var GardenItemSelector = require('./garden/GardenItemSelector'); +var GardenItemDesc = require('./garden/GardenItemDesc'); var GardenIndicatorWrapper = require('./garden/GardenIndicatorWrapper'); var GardenPointCounter = require('./garden/GardenPointCounter'); var GardenField = require('./garden/GardenField'); var Garden = React.createClass({ + + mixins :[ RootPathMixin ], + + current_points : 0, + getInitialState() { return GardenStore.getState(); }, @@ -26,23 +34,10 @@ var Garden = React.createClass({ }, onChange(state) { + this.current_points = (state.garden.points ? state.garden.points : 0) - (state.selectedItem ? state.selectedItem.price : 0); this.setState(state); }, - changeSelectedItem:function(old_item, new_item){ - var points_change = (old_item ? old_item.price : 0) - (new_item ? new_item.price : 0); - var newState = update(this.state, { - garden: { - points: { $set: this.state.garden.points + points_change } - } - }); - this.setState(newState); - }, - - dropSelectedItem:function(){ - console.log(_params); - }, - render() { if (!this.state.garden) { @@ -51,32 +46,39 @@ var Garden = React.createClass({ return (
-
+
+
+
+ +
+
+
+ +
+
-
- -
+
+
-
+
+ selectedItem={this.state.selectedItem} + />
); diff --git a/app/Resources/js/components/garden/GardenField.js b/app/Resources/js/components/garden/GardenField.js index c8573c5..a8a401c 100644 --- a/app/Resources/js/components/garden/GardenField.js +++ b/app/Resources/js/components/garden/GardenField.js @@ -1,14 +1,17 @@ var React = require('react'), ReactDOM = require('react-dom'); -var GardenItemActions = require('../../actions/GardenItemActions'); var GardenItemStore = require('../../stores/GardenItemStore'); +var GardenActions = require('../../actions/GardenActions'); +var RootPathMixin = require('../../mixins/RootPathMixin'); var interact = require('interact'); var _=require('underscore'); var GardenTile = React.createClass({ + mixins :[ RootPathMixin ], + getInitialState: function() { return { tile : this.props.tile, @@ -17,68 +20,89 @@ var GardenTile = React.createClass({ }, shouldComponentUpdate: function (nextProps, nextState) { + return true; return ( - nextProps.isItems !== this.props.isItems + nextProps.isItems !== this.props.isItems || + nextProps.tile.item !== this.props.tile.item ); }, componentDidMount: function(){ var that = this; // enable draggables to be dropped into this - interact(ReactDOM.findDOMNode(this)).dropzone({ + this.interact = interact(ReactDOM.findDOMNode(this)).dropzone({ // only accept elements matching this CSS selector //accept: '.gardenItem', // Require a 75% element overlap for a drop to be possible //overlap: 0.75, - + enabled :true, // listen for drop related events: ondropactivate: function (event) { - event.target.classList.add('drop-active'); + event.target.classList.add('dropActive'); that.handleDropActivate(); }, ondragenter: function (event) { // feedback the possibility of a drop - event.relatedTarget.classList.add('drop-target'); - event.target.classList.add('can-drop'); + event.relatedTarget.classList.add('dropTarget'); + event.target.classList.add('canDrop'); that.handleDragEnter(); }, ondragleave: function (event) { // remove the drop feedback style - event.target.classList.remove('drop-target'); - event.relatedTarget.classList.remove('can-drop'); + event.relatedTarget.classList.remove('dropTarget'); + event.target.classList.remove('canDrop'); that.handleDragLeave(); }, ondrop: function (event) { + event.target.classList.remove('dropActive'); that.handleDrop(); + }, + ondropdeactivate: function (event) { + // remove active dropzone feedback + event.relatedTarget.classList.remove('dropTarget'); + event.target.classList.remove('dropActive'); } }); }, componentDidUpdate: function (prevProps) { if (!prevProps.isItems && this.props.isItems) { - + ReactDOM.findDOMNode(this) + } + if (this.props.tile.item) { + this.interact.dropzone({ enabled : false }); } }, handleDropActivate :function(){ - console.log('handleDropActivate'); + //console.log('handleDropActivate'); }, handleDragEnter:function(){ - console.log('handleDragEnter'); + GardenActions.enterGardenTile(this.props.tile); + //console.log('handleDragEnter'); }, handleDragLeave:function(){ - console.log('handleDragLeave'); + GardenActions.leaveGardenTile(this.props.tile); + //console.log('handleDragLeave'); }, handleDrop:function(){ - console.log('handleDrop'); this.props.onDropItem(this.props.tile); }, render: function() { + if(this.props.tile.item){ + return ( +
+ + + +
+ ); + } return (
); @@ -90,11 +114,13 @@ var GardenField = React.createClass({ getInitialState: function() { return { isItems: this.props.isItems, - tiles : this.props.tiles + tiles : this.props.tiles, + currentItem:this.props.selectedItem }; }, shouldComponentUpdate: function (nextProps, nextState) { + return true; return ( nextProps.tiles !== this.props.tiles || nextState.tiles !== this.state.tiles || @@ -110,7 +136,7 @@ var GardenField = React.createClass({ }, handleDroppedItem:function(tile){ - console.log(tile); + GardenActions.dropGardenTile(tile, this.props.selectedItem); }, render: function() { diff --git a/app/Resources/js/components/garden/GardenIndicatorWrapper.js b/app/Resources/js/components/garden/GardenIndicatorWrapper.js index d60560e..19c6378 100644 --- a/app/Resources/js/components/garden/GardenIndicatorWrapper.js +++ b/app/Resources/js/components/garden/GardenIndicatorWrapper.js @@ -1,11 +1,26 @@ var React = require('react'), ReactDOM = require('react-dom'); +var _ = require('underscore'); + var GardenStore = require('../../stores/GardenStore'); var Preloader = require('../utils/Preloader'); +var AnimationMixin = require('../../mixins/AnimationMixin'); +var RootPathMixin = require('../../mixins/RootPathMixin'); var GardenIndicator = React.createClass({ + mixins :[ AnimationMixin, RootPathMixin ], + + statics: { + getMeterLevel: function(indicator) { + console.log((indicator.max - indicator.min) * (indicator.val - indicator.min) /100); + return (indicator.max - indicator.min) * (indicator.val - indicator.min) / 100; + } + }, + + meterLevel : 0, + getInitialState: function() { return { indicator : this.props.indicator @@ -13,20 +28,12 @@ var GardenIndicator = React.createClass({ }, componentDidMount() { - var node = ReactDOM.findDOMNode(this); - node.classList.add('animated','fadeInUp'); - node.style.animationDelay = this.props.index/10 + 's'; - node.addEventListener("webkitTransitionEnd", this.endAnimation); + this.addAnimationStyle(ReactDOM.findDOMNode(this), ['animated','rubberBand'], 0, 1000); }, - - endAnimation:function(e){ - e.target.classList.remove('pulse','fadeInUp'); - e.target.style.animationDelay = 'initial'; - }, - - componentDidUpdate: function (prevProps) { - if (!prevProps.indicator && this.props.indicator) { + componentDidUpdate: function (prevProps, prevState) { + if (this.state.indicator.val - prevState.indicator.val) { + this.addAnimationStyle(ReactDOM.findDOMNode(this), ['animated','rubberBand'], 0, 1000); } }, @@ -34,10 +41,16 @@ var GardenIndicator = React.createClass({ if (!this.props.indicator) { return ( ); } - + var meterLevel = Math.round(((this.props.indicator.val - this.props.indicator.min) * 100) / (this.props.indicator.max - this.props.indicator.min)); + var text = this.props.indicator.name + '-' + meterLevel +'%'; return ( -
- {this.props.indicator.name} +
+ + + +
+ +
); } @@ -45,6 +58,8 @@ var GardenIndicator = React.createClass({ var GardenIndicatorWrapper = React.createClass({ + mixins :[ RootPathMixin ], + getInitialState: function() { return { gardenIndicators : this.props.gardenIndicators @@ -67,11 +82,26 @@ var GardenIndicatorWrapper = React.createClass({ return (
- {this.props.gardenIndicators.map((gardenIndicator, index) => { + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {_.map(this.props.gardenIndicators, (gardenIndicator, key) => { return ( ); diff --git a/app/Resources/js/components/garden/GardenItem.js b/app/Resources/js/components/garden/GardenItem.js index a221c5e..1680471 100644 --- a/app/Resources/js/components/garden/GardenItem.js +++ b/app/Resources/js/components/garden/GardenItem.js @@ -1,19 +1,23 @@ var React = require('react'), ReactDOM = require('react-dom'); -var GardenItemActions = require('../../actions/GardenItemActions'); +var GardenActions = require('../../actions/GardenActions'); var AnimationMixin = require('../../mixins/AnimationMixin'); +var RootPathMixin = require('../../mixins/RootPathMixin'); + var Classie = require('classie'); var interact = require('interact'); var update = require('react-addons-update'); var GardenItemContent = React.createClass({ + mixins :[ RootPathMixin ], + render: function() { return ( - -

{this.props.item.name}

+ +

{this.props.item.price}
); @@ -43,6 +47,7 @@ var GardenItem = React.createClass({ if (prevState.isActive != this.state.isActive) { if(!this.state.isDragged) { this.addAnimationStyle(ReactDOM.findDOMNode(this), ['animated','flipInX'], 0, 1000); + this.checkDraggable(); } } }, @@ -54,10 +59,15 @@ var GardenItem = React.createClass({ }, componentDidMount :function(){ - var that = this; this.addAnimationStyle(ReactDOM.findDOMNode(this), ['animated','flipInX'], this.props.index * 100, 1000); - interact(ReactDOM.findDOMNode(this)).draggable({ + this.setDraggable(); + }, + + setDraggable : function(){ + + var that = this; + this.interact = interact(ReactDOM.findDOMNode(this)).draggable({ // enable inertial throwing //inertia: true, //restrict: { @@ -67,56 +77,72 @@ var GardenItem = React.createClass({ //}, // enable autoScroll //autoScroll: true, + enabled:false, onstart:function(event){ - GardenItemActions.gardenSelectItem(that.props.item); + that.setState({isDragged:true}); + GardenActions.selectGardenItem(that.props.item); }, // call this function on every dragmove event onmove: function(event) { - var target = event.target, - // keep the dragged position in the data-x/data-y attributes - x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx, - y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy; + var x = (parseFloat(event.target.getAttribute('data-x')) || 0) + event.dx, + y = (parseFloat(event.target.getAttribute('data-y')) || 0) + event.dy; // translate the element - target.style.width = - target.style.transform = + event.target.style.width = + event.target.style.transform = 'translate(' + x + 'px, ' + y + 'px)'; // update the posiion attributes - target.setAttribute('data-x', x); - target.setAttribute('data-y', y); + event.target.setAttribute('data-x', x); + event.target.setAttribute('data-y', y); }, - onend: function (event) { event.target.style.transform =''; event.target.removeAttribute('data-x'); event.target.removeAttribute('data-y'); - GardenItemActions.gardenReleaseItem(that.props.item); + + that.setState({isDragged:false}); + GardenActions.releaseGardenItem(that.props.item); + that.checkDraggable(); } + }).on('tap',function(event){ + that.handleMouseDown(event); + }).on('hold',function(event){ + that.handleMouseDown(event); + GardenActions.selectGardenItem(that.props.item); }); + that.checkDraggable(); + }, + + checkDraggable:function(){ + if(!this.state.isActive) this.interact.draggable({ enabled: false }); + else this.interact.draggable({ enabled: true }); }, handleMouseDown:function(sme){ - GardenItemActions.gardenFocusItem(this.props.item); - this.setState({isDragged:true}); + GardenActions.focusGardenItem(this.props.item); + }, handleMouseUp:function(sme){ - this.setState({isDragged:false}); + //this.setState({isDragged:false}); }, render: function() { return (
- +
); } diff --git a/app/Resources/js/components/garden/GardenItemDesc.js b/app/Resources/js/components/garden/GardenItemDesc.js new file mode 100644 index 0000000..8fc8c47 --- /dev/null +++ b/app/Resources/js/components/garden/GardenItemDesc.js @@ -0,0 +1,64 @@ +var React = require('react'), + ReactDOM = require('react-dom'); +var _ = require('underscore'); +var Preloader = require('../utils/Preloader'); +var AnimationMixin = require('../../mixins/AnimationMixin'); +var RootPathMixin = require('../../mixins/RootPathMixin'); + +var GardenItemDesc = React.createClass({ + + mixins :[ AnimationMixin, RootPathMixin ], + + shouldComponentUpdate: function (nextProps, nextState) { + return this.props.item != nextProps.item; + }, + + componentDidUpdate: function (prevProps, prevState) { + if (prevProps != this.props && this.props.item) { + this.addAnimationStyle(ReactDOM.findDOMNode(this), ['animated','fadeInUp'], 0, 500); + } + }, + + render: function() { + if (!this.props.item) { + return ( +
+ ); + } + return ( +
+
+

{this.props.item.name}

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +

{this.props.item.infos}

+
    + { _.map(this.props.item.percs, (perc, key) => { + return ( +
  • +
    + {perc.val + perc.unit} +
  • + ); + }) } +
+
+
+ ); + } +}); + +module.exports = GardenItemDesc; \ No newline at end of file diff --git a/app/Resources/js/components/garden/GardenItemSelector.js b/app/Resources/js/components/garden/GardenItemSelector.js index 46768f0..1564b65 100644 --- a/app/Resources/js/components/garden/GardenItemSelector.js +++ b/app/Resources/js/components/garden/GardenItemSelector.js @@ -1,51 +1,15 @@ var React = require('react'), ReactDOM = require('react-dom'); - +var _ = require('underscore'); var Preloader = require('../utils/Preloader'); var AnimationMixin = require('../../mixins/AnimationMixin'); var GardenItem = require('./GardenItem'); -var GardenItemActions = require('../../actions/GardenItemActions'); +var GardenActions = require('../../actions/GardenActions'); var GardenStore = require('../../stores/GardenStore'); var GardenItemStore = require('../../stores/GardenItemStore'); -var GardenItemDesc = React.createClass({ - - mixins :[ AnimationMixin ], - - shouldComponentUpdate: function (nextProps, nextState) { - return this.props.item != nextProps.item; - }, - - componentDidUpdate: function (prevProps, prevState) { - if (prevProps != this.props && this.props.item) { - this.addAnimationStyle(ReactDOM.findDOMNode(this), ['animated','fadeInDown'], 0, 1000); - } - }, - - render: function() { - if (!this.props.item) { - return ( -
- ); - } - return ( -
-

- {this.props.item.name}

-

{this.props.item.infos}

-
    - {this.props.item.vals.map((val, index) => { - return ( -
  • {val.desc} {val.val + val.unit}
  • - ); - })} -
-
- ); - } -}); var GardenItemSelector = React.createClass({ @@ -55,7 +19,7 @@ var GardenItemSelector = React.createClass({ componentDidMount() { GardenItemStore.listen(this.onChange); - GardenItemActions.fetchGardenItems(); + GardenActions.fetchGardenItems(); }, componentWillUnmount() { @@ -64,8 +28,6 @@ var GardenItemSelector = React.createClass({ componentWillUpdate(nextProps, nextState) { if(nextState.selectedItem !== this.state.selectedItem){ - this.props.changeSelectedItem(this.state.selectedItem, nextState.selectedItem); - if(nextState.selectedItem !== null){ document.querySelector('.gardenItemSelector').style.marginTop = - document.querySelector('.gardenItemSelector').clientTop; document.querySelector('.gardenItemSelector').style.overflow = 'visible'; @@ -77,8 +39,10 @@ var GardenItemSelector = React.createClass({ }, componentDidUpdate(prevProps, prevState) { + + if(this.state.focusedItem !== null){ - ReactDOM.findDOMNode(this.refs['gardenItem' + this.state.focusedItem.id]).focus(); + ReactDOM.findDOMNode( this.refs[this.state.focusedItem.name_canonical] ).focus(); } }, @@ -87,25 +51,24 @@ var GardenItemSelector = React.createClass({ }, render: function() { - - if (!this.state.gardenItems.length) { + console.log(this.state.gardenItems); + if (_.isNull(this.state.gardenItems)) { return ( ); } - return ( -
- - {this.state.gardenItems.map((gardenItem, index) => { - return ( - - ); - })} +
+
+ { _.map(this.state.gardenItems, (gardenItem, key) => { + return ( + + ); + })} +
); } diff --git a/app/Resources/js/components/garden/GardenPointCounter.js b/app/Resources/js/components/garden/GardenPointCounter.js index 4700c72..03e18f0 100644 --- a/app/Resources/js/components/garden/GardenPointCounter.js +++ b/app/Resources/js/components/garden/GardenPointCounter.js @@ -19,19 +19,19 @@ var GardenPointCounter = React.createClass({ if (!prevProps.points && this.props.points) { //ReactDOM.findDOMNode(this.refs); } - var node = ReactDOM.findDOMNode(this); + var node = ReactDOM.findDOMNode(this.refs.pointCounter); node.classList.add('flash'); node.addEventListener("webkitAnimationEnd", this.endAnimation); }, componentDidMount :function(){ - var node = ReactDOM.findDOMNode(this); + var node = ReactDOM.findDOMNode(this.refs.pointCounter); node.classList.add('animated','fadeInDown'); node.addEventListener("webkitAnimationEnd", this.endAnimation); }, componentWillUnmount :function(){ - var node = ReactDOM.findDOMNode(this); + var node = ReactDOM.findDOMNode(this.refs.pointCounter); node.removeEventListener("webkitAnimationEnd", this.endAnimation); }, @@ -42,8 +42,15 @@ var GardenPointCounter = React.createClass({ render() { return ( -
- {this.props.points} +
+
+ + {this.props.points} + + + + +
); } diff --git a/app/Resources/js/components/utils/Preloader.js b/app/Resources/js/components/utils/Preloader.js index 4473b6e..62e95a9 100644 --- a/app/Resources/js/components/utils/Preloader.js +++ b/app/Resources/js/components/utils/Preloader.js @@ -6,15 +6,15 @@ var Preloader = React.createClass({ render: function() { return (
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
); } diff --git a/app/Resources/js/mixins/RootPathMixin.js b/app/Resources/js/mixins/RootPathMixin.js new file mode 100644 index 0000000..64e82be --- /dev/null +++ b/app/Resources/js/mixins/RootPathMixin.js @@ -0,0 +1,8 @@ +var React = require('react'); +var ReactDOM = require('react-dom'); + +var RootPathMixin = { + rootPath : './' +}; + +module.exports = RootPathMixin; \ No newline at end of file diff --git a/app/Resources/js/sources/GardenSource.js b/app/Resources/js/sources/GardenSource.js index bb9dfc0..4db363d 100644 --- a/app/Resources/js/sources/GardenSource.js +++ b/app/Resources/js/sources/GardenSource.js @@ -1,47 +1,8 @@ var _ = require('underscore'); -var GardenItem = { - id : 0, - name_canonical: 'item-0', - name : 'Item', - type : 0, - type_name : 'type', - picto : 'ion-leaf', - cl : 'picto-cl1', - odr : 0, - price : 100, - infos : 'Texte explicatif de l\'item', - vals:[ - { - desc : 'description valeur 1', - val : '+10', - unit : '%', - criteria: 0 - }, - { - desc : 'description valeur 1', - val : '+10', - unit : '%', - criteria: 1 - } - ] -}; -var pictos=['ion-leaf','ion-lightbulb','ion-bug','ion-film-marker','ion-trophy','ion-waterdrop','ion-bonfire','ion-earth','ion-umbrella']; -var cl = ['engie-blueLight', 'engie-blue', 'engie-green', 'engie-yellow', 'engie-red', 'engie-purple', 'engie-pink']; -var GardenItems = _.map( _.range(1, 10), function(num, key){ - return _.extend(_.clone(GardenItem), { - id : key, - odr : key, - name : 'Item' + key, - price: 100 * key, - picto: pictos[key], - cl : cl[key % cl.length] - }); -}); - var GardenIndicator = { id : 0, - name_canonical: 'indicator', + name_canonical: 'indicator-', name : 'Indicator', picto : 'picto-1', cl : 'picto-cl1', @@ -52,23 +13,76 @@ var GardenIndicator = { unit : '%' }; -var pictos2=['ion-heart','ion-thermometer','ion-flag']; -var cl2 = ['engie-red', 'engie-purple', 'engie-green']; -var GardenIndicators = _.map( _.range(1, 3), function(num, key){ +var pictos2=['pictos-09.svg','pictos-10.svg','pictos-11.svg']; +var cl2 = ['engieYellow', 'engieRed', 'engieBlue','engieGreen']; +var GardenIndicators = _.chain([1,2,3]).map(function(num, key){ var min = Math.floor(Math.random() * (3000 - 0)) + 0; var max = Math.floor(Math.random() * (10000 - min)) + min; - return _.extend(_.clone(GardenIndicator), { + var val = Math.floor(Math.random() * (max - min)) + min; + min = 0; + max = 100; + val = 0; + + return _.chain(GardenIndicator).clone().extend({ id : key, - name_canonical: 'indicator' + key, + name_canonical: 'indicator-' + key, name : 'Indicator ' + key, picto : pictos2[key], - cl : cl2[key % cl.length], + cl : cl2[key % cl2.length], criteria : key, - val : Math.floor(Math.random() * (max - min)) + min, + val : val, min : min, max : max - }); -}); + }).value(); + +}).indexBy('name_canonical').value(); + +var GardenItem = { + id : 0, + name_canonical: 'item-', + name : 'Item', + type : 0, + type_name : 'type', + picto : 'ion-leaf', + cl : 'picto-cl1', + odr : 0, + price : 100, + infos : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in finibus urna.', + percs : null + +}; +var pictos=['pictos-01.svg','pictos-02.svg','pictos-03.svg','pictos-04.svg','pictos-05.svg','pictos-06.svg','pictos-07.svg','pictos-08.svg']; +var cl = ['engieBlueLight', 'engieBlue', 'engieGreen', 'engieYellow', 'engieRed', 'engiePurple', 'engiePink']; +var GardenItems = _.chain(_.range(1, 9)).map(function (num, key) { + var nbPercs = _.random(1, 3); + return _.chain(this).clone().extend({ + id : key, + name_canonical: 'item-' + key, + odr : key, + name : 'Item' + key, + price : 100 * key, + picto : pictos[key], + cl : cl[key % cl.length], + percs : _.chain(GardenIndicators).clone().sample(nbPercs).map(function (cIndicator, key) { + + //var val = _.random(-50, 50); + //val = val > 0 ? '+' + val : '' + val; + var val = _.random(-4, 16); + val = val > 0 ? '+' + val : '' + val; + return { + desc : cIndicator.name, + val : val, + unit : '', + indicator: cIndicator + }; + + }).indexBy(function (perc) { + return perc.indicator.name_canonical; + }).value() + + }).value(); +}, GardenItem).indexBy('name_canonical').value(); + var GardenTile = { id : 0, @@ -90,7 +104,7 @@ var GardenTiles = _.map( _.range(0, 25), function(num, key){ var GardenData = { id: 0, text: 'abudsqdqsd Dhabi', - points: 400, + points: 4000, indicators : GardenIndicators, tiles : GardenTiles }; @@ -98,6 +112,7 @@ var GardenData = { var GardenSource = { fetch: function (url) { switch(url) { + case 'api/garden/1': return new Promise(function(resolve, reject) { @@ -106,6 +121,15 @@ var GardenSource = { }, Math.random() * 1000 + 1000); }); + break; + case 'api/garden/1/tile': + + return new Promise(function(resolve, reject) { + window.setTimeout(function() { + resolve( JSON.stringify(GardenData) ); + }, Math.random() * 1000 + 1000); + }); + break; case 'api/gardenitems': diff --git a/app/Resources/js/stores/GardenItemStore.js b/app/Resources/js/stores/GardenItemStore.js index 63e150c..b0b398f 100644 --- a/app/Resources/js/stores/GardenItemStore.js +++ b/app/Resources/js/stores/GardenItemStore.js @@ -1,51 +1,52 @@ var alt = require('../alt'); -var GardenItemActions = require('../actions/GardenItemActions'); +var _ = require('underscore'); +var GardenActions = require('../actions/GardenActions'); class GardenItemStore { constructor() { - this.gardenItems = []; + this.gardenItems = null; this.selectedItem = null; this.errorMessage = null; this.bindListeners({ - handleUpdateGardenItems: GardenItemActions.UPDATE_GARDEN_ITEMS, - handleFetchGardenItems : GardenItemActions.FETCH_GARDEN_ITEMS, - handleGardenItemsFailed: GardenItemActions.GARDEN_ITEMS_FAILED, - handleSelectItem : GardenItemActions.GARDEN_SELECT_ITEM, - handleReleaseItem : GardenItemActions.GARDEN_RELEASE_ITEM, - handleFocusItem : GardenItemActions.GARDEN_FOCUS_ITEM, - handleBlurItem : GardenItemActions.GARDEN_BLUR_ITEM + handleUpdateGardenItems: GardenActions.UPDATE_GARDEN_ITEMS, + handleFetchGardenItems : GardenActions.FETCH_GARDEN_ITEMS, + handleGardenItemsFailed: GardenActions.GARDEN_ITEMS_FAILED, + handleFocusGardenItem : GardenActions.FOCUS_GARDEN_ITEM, + handleBlurGardenItem : GardenActions.BLUR_GARDEN_ITEM, + handleSelectGardenItem : GardenActions.SELECT_GARDEN_ITEM, + handleReleaseGardenItem: GardenActions.RELEASE_GARDEN_ITEM }); } handleUpdateGardenItems(gardenItems) { this.gardenItems = gardenItems; - this.focusedItem = gardenItems[0]; + this.focusedItem = _.findWhere(gardenItems, {odr: 0}); this.errorMessage = null; } handleFetchGardenItems() { // reset the array while we're fetching new locations so React can // be smart and render a spinner for us since the data is empty. - this.gardenItems = []; + this.gardenItems = null; this.selectedItem = null; this.focusedItem = null; } - handleFocusItem(focusedItem){ - this.focusedItem = focusedItem; + handleSelectGardenItem(selectedItem){ + this.selectedItem = selectedItem; } - handleBlurItem(focusedItem){ - this.focusedItem = null; + handleReleaseGardenItem(selectedItem){ + this.selectedItem = null; } - handleSelectItem(selectedItem){ - this.selectedItem = selectedItem; + handleFocusGardenItem(focusedItem){ + this.focusedItem = focusedItem; } - handleReleaseItem(selectedItem){ - this.selectedItem = null; + handleBlurGardenItem(focusedItem){ + this.focusedItem = null; } handleGardenItemsFailed(errorMessage) { diff --git a/app/Resources/js/stores/GardenStore.js b/app/Resources/js/stores/GardenStore.js index 24e7003..f4c43ab 100644 --- a/app/Resources/js/stores/GardenStore.js +++ b/app/Resources/js/stores/GardenStore.js @@ -1,26 +1,42 @@ var alt = require('../alt'); +var _ = require('underscore'); var GardenActions = require('../actions/GardenActions'); -var GardenItemActions = require('../actions/GardenItemActions'); +var GardenItemStore = require('../stores/GardenItemStore'); class GardenStore { constructor() { this.garden = {}; this.isItems = false; + this.focusedItem = null; this.selectedItem = null; - this.droppedTile = null; + this.selectedTile = null; this.errorMessage = null; this.bindListeners({ - handleUpdateGarden : GardenActions.UPDATE_GARDEN, - handleFetchGarden : GardenActions.FETCH_GARDEN, - handleGardenFailed : GardenActions.GARDEN_FAILED, - handleFetchGardenItems : GardenItemActions.FETCH_GARDEN_ITEMS, - handleUpdateGardenItems: GardenItemActions.UPDATE_GARDEN_ITEMS + handleUpdateGarden : GardenActions.UPDATE_GARDEN, + handleFetchGarden : GardenActions.FETCH_GARDEN, + handleGardenFailed : GardenActions.GARDEN_FAILED, + handleFetchGardenItems : GardenActions.FETCH_GARDEN_ITEMS, + handleUpdateGardenItems : GardenActions.UPDATE_GARDEN_ITEMS, + handleFocusGardenItem : GardenActions.FOCUS_GARDEN_ITEM, + handleBlurGardenItem : GardenActions.BLUR_GARDEN_ITEM, + handleSelectGardenItem : GardenActions.SELECT_GARDEN_ITEM, + handleReleaseGardenItem : GardenActions.RELEASE_GARDEN_ITEM, + handleEnterGardenTile : GardenActions.ENTER_GARDEN_TILE, + handleLeaveGardenTile : GardenActions.LEAVE_GARDEN_TILE, + handleDropGardenTile : GardenActions.DROP_GARDEN_TILE }); + + this.on('beforeEach', (payload, currentState) => { + //console.log(payload, currentState); + }); + } handleUpdateGarden(garden) { + this.waitFor(GardenItemStore); this.garden = garden; + this.focusedItem = GardenItemStore.getState().focusedItem; this.errorMessage = null; } @@ -29,6 +45,9 @@ class GardenStore { // be smart and render a spinner for us since the data is empty. this.garden = {}; this.isItems = false; + this.selectedItem = null; + this.focusedItem = null; + this.selectedTile = null; } handleFetchGardenItems() { @@ -39,6 +58,50 @@ class GardenStore { this.isItems = true; } + handleFocusGardenItem(focusedItem){ + this.waitFor(GardenItemStore); + this.focusedItem = GardenItemStore.getState().focusedItem; + } + + handleBlurGardenItem(focusedItem){ + this.waitFor(GardenItemStore); + this.focusedItem = GardenItemStore.getState().focusedItem; + } + + handleSelectGardenItem(selectedItem){ + this.waitFor(GardenItemStore); + this.selectedItem = GardenItemStore.getState().selectedItem; + } + + handleReleaseGardenItem(releasedItem){ + this.waitFor(GardenItemStore); + this.selectedItem = GardenItemStore.getState().selectedItem; + } + + handleEnterGardenTile(enteredTile){ + this.selectedTile = enteredTile; + } + + handleLeaveGardenTile(leavedTile){ + this.selectedTile = null; + } + + handleDropGardenTile(tile){ + this.garden.tiles[tile.id] = tile; + this.garden.points -= tile.item.price; + _.chain(tile.item.percs) + .map(function(perc, name_canonical){ + if(this.hasOwnProperty(name_canonical)){ + var indicator = this[name_canonical]; + //var addVal = Math.round(((indicator.val - indicator.min) * parseInt(perc.val) / 100)); + //this[name_canonical].val = this[name_canonical].val + addVal <= indicator.max ? this[name_canonical].val + addVal : indicator.max; + var addVal = parseInt(perc.val); + this[name_canonical].val = this[name_canonical].val + addVal <= indicator.max ? this[name_canonical].val + addVal : indicator.max; + } + return this; + }, this.garden.indicators); + } + handleGardenFailed(errorMessage) { this.isItems = false; this.errorMessage = errorMessage; diff --git a/app/Resources/sass/colors.scss b/app/Resources/sass/colors.scss new file mode 100644 index 0000000..6183024 --- /dev/null +++ b/app/Resources/sass/colors.scss @@ -0,0 +1,33 @@ +@import "mixins"; + +$engieWhite: #fff; +$engieGrey: #999; +$engieBlueLight: #44A1DA; +$engieBlue: #065FA9; +$engieGreenLight: #BECD07; +$engieGreen: #68AF2E; +$engieGreenDark: #018737; +$engieYellow: #FCC206; +$engieRed: #E1071A; +$engiePurple: #53257F; +$engiePink: #E62E87; + +$engieColors: ( + engieWhite: $engieWhite, + engieGrey: $engieGrey, + engieBlueLight: $engieBlueLight, + engieBlue: $engieBlue, + engieGreenLight: $engieGreenLight, + engieGreen: $engieGreen, + engieGreenDark: $engieGreenDark, + engieYellow: $engieYellow, + engieRed: $engieRed, + engiePurple: $engiePurple, + engiePink: $engiePink +); + +@include decline-prop('.bg', background-color, $engieColors); +@include decline-prop('.txt', color, $engieColors); + +$bgBloc : rgba(0,0,0,0.3); +$txtBloc : #ffffff; diff --git a/app/Resources/sass/main.css b/app/Resources/sass/main.css new file mode 100644 index 0000000..009417b --- /dev/null +++ b/app/Resources/sass/main.css @@ -0,0 +1,2 @@ + write /Users/fabienchartrain/Projets/defaultvm/glop/web/styles/main.css + write /Users/fabienchartrain/Projets/defaultvm/glop/web/styles/main.css.map diff --git a/app/Resources/sass/main.scss b/app/Resources/sass/main.scss new file mode 100644 index 0000000..467bc7b --- /dev/null +++ b/app/Resources/sass/main.scss @@ -0,0 +1,512 @@ +@import "mixins"; +@import "colors"; + +/****************************************************************************/ +/* +/* PARAMS +/* +/****************************************************************************/ +$miniPadding : 0.5rem; +$smallPadding : 1rem; +$mediumPadding : 2rem; +$largePadding : 4rem; + +$pictiSize : 5rem; +$topBarHeight : 6rem; +$sideBarWidth : 18rem; +$fieldWidth : 26rem; + +$itemsSize : 4rem; + +/****************************************************************************/ +/* +/* INIT +/* +/****************************************************************************/ + +html { + height:100%; +} +body { + height:100%; + font-size:12px; + background: $engieWhite; + background: url('../images/engie_garden-1800x1000.jpg') no-repeat center top; + background-attachment: fixed; + background-size: cover; + padding:0; + margin:0; + color:#333; +} + +#app { + height: 100%; +} + +#AppWrapper { + z-index: 1; + height: 100%; + + #GardenPointCounterWrapper { + z-index: 5; + position: fixed; + box-sizing: border-box; + top:0; + height: $topBarHeight; + width: 100%; + padding: $mediumPadding $mediumPadding $mediumPadding $sideBarWidth + $mediumPadding; + background: url('../images/engie_garden-1800x1000.jpg') no-repeat center top; + background-attachment: fixed; + background-size: cover; + } + + #GardenPictiWrapper{ + position: fixed; + top: $topBarHeight; + width: 100%; + height:$pictiSize; + } + + #GardenIndicatorWrapper { + z-index: 6; + position: fixed; + box-sizing: border-box; + top:0; + width: $sideBarWidth; + padding: $mediumPadding; + } + + #GardenItemSelectorWrapper { + z-index: 4; + position:relative; + box-sizing: border-box; + float: right; + padding: $topBarHeight + $mediumPadding $mediumPadding $mediumPadding; + width: $sideBarWidth; + } + + #GardenItemDescWrapper { + z-index: 4; + position: fixed; + box-sizing: border-box; + bottom: 0; + padding: $mediumPadding; + width: $sideBarWidth; + } + + #GardenFieldWrapper { + z-index: 3; + position: fixed; + box-sizing: border-box; + bottom: $mediumPadding; + width: 100%; + padding: $mediumPadding; + } + +} + + +/****************************************************************************/ +/* +/* POINT COUNTER +/* +/****************************************************************************/ + +.gardenPointCounter{ + font-size:2rem; + text-align:center; + .topRight{ + display: block; + float:right; + width: 16rem; + } + .topCenter{ + display: block; + text-align:center; + } +} + +/****************************************************************************/ +/* +/* Picti +/* +/****************************************************************************/ +.gardenPictiWrapper{ + width: 100%; + text-align:center; + img{ + height:$pictiSize; + } +} + +/****************************************************************************/ +/* +/* ITEMS DESC +/* +/****************************************************************************/ + +.gardenItemDesc{ + z-index:5; + background: $bgBloc; + color:$txtBloc; + padding: $mediumPadding; + .gardenItemDescContent>img{ + max-width:30%; + float:right; + } + h3{ + text-transform:uppercase; + margin-top:0; + } + ul{ + display:block; + padding:0; + text-align: center; + div.imageWrapper{ + float:none; + display: inline-block; + vertical-align: bottom; + background:#fff; + border-radius:50%; + padding:2px; + margin: -1px 2px -2px -6px; + } + img{ + height: 1.2em; + vertical-align: bottom; + } + li{ + display: inline-block; + border-radius: 2rem; + padding: 0.2rem 0.5rem; + margin: 0.2rem; + text-align: center; + font-weight: bold; + @each $name, $color in $engieColors { + &.#{$name} { + color: $engieWhite; + background-color:$color; + } + } + + } + } +} + +/****************************************************************************/ +/* +/* ITEMS SELECTOR +/* +/****************************************************************************/ + +.gardenItemSelector{ + z-index:4; + float:left; + height:100%; +} +.gardenItem{ + display: block; + float: left; + position:relative; + overflow:hidden; + z-index:4; + list-style: none outside none; + width: $itemsSize; + line-height:$itemsSize; + text-align:center; + background:$bgBloc; + color:$txtBloc; + margin:1rem; + cursor:-webkit-grab; + border-radius: $itemsSize; + padding: $miniPadding; + &:focus { + box-shadow: 0px 0px 10px 0px #f8ff00; + outline:0; + } + i{ + display:block; + font-size: $itemsSize; + position: absolute; + opacity:0.4; + color:$engieWhite; + top: 0; + left: 0; + width: 100%; + padding: 1rem 0; + z-index:1; + } + h3{ + z-index:2; + display: block; + margin: 0; + position: relative; + height: $itemsSize; + font-size:3rem; + } + small{ + position:absolute; + z-index:4; + bottom:-1.3rem; + width:2rem; + height:2rem; + border-radius: 2rem; + margin-left:-1.3rem; + background:$bgBloc; + border:$engieWhite 1px solid; + color: $txtBloc; + line-height:normal; + padding:0.3rem; + } + img{ + position:absolute; + left:5%; + top:5%; + width:90%; + height:90%; + + path, ellipse, polyline, polygon, circle, rect, line + { + stroke:#FFFFFF; + fill:#FFFFFF; + } + } + &.disabled{ + background:contrast($bgBloc); + color:contrast($txtBloc); + cursor:pointer; + overflow:hidden; + i{ + cursor:pointer; + overflow:hidden; + } + small{ + color:$engieYellow; + border:#333 1px solid; + } + img{ + opacity:0.3; + } + } +} + +/****************************************************************************/ +/* +/* FIELD +/* +/****************************************************************************/ + +.gardenField{ + width: $fieldWidth; + height:$fieldWidth; + position: relative; + margin:0 auto; +} + +.gardenTable{ + width: 100%; + height:100%; + position: absolute; + border:1px dashed #6B9B2E; +} + +.gardenTile{ + width:20%; + height:20%; + float:left; + box-sizing:border-box; + position: relative; + /*border:1px dashed #6B9B2E;*/ + + .gardenTileItem{ + width: 100%; + height:100%; + text-align:center; + background:rgba(0,0,0,0.1); + border-radius: 100%; + } +} + +/****************************************************************************/ +/* +/* INDICATORS +/* +/****************************************************************************/ + +.gardenIndicatorWrapper{ + font-size:1rem; + text-transform:uppercase; + background: $bgBloc; + color: $txtBloc; + padding:1rem; + + img{ + margin:0 auto; + display: block; + margin-bottom: 2rem; + } + + .gardenColorBar{ + margin-bottom:2rem; + } + +} + +.gardenIndicator{ + margin-bottom:1.5rem; + font-size:12px; + position:relative; + .meter { + position: relative; + background: rgba(255,255,255,0.3); + height: 0.8em; + padding: 0; + margin:1em 0 0 1.9em; + border-radius:0 0.4em 0.4em 0; + } + + .meter > span { + display: block; + height: 100%; + border-radius:0 0.4em 0.4em 0; + box-shadow: inset 0 2px 9px rgba(255,255,255,0.2), inset 0 -2px 6px rgba(0,0,0,0.2); + position: relative; + overflow: hidden; + transition: width 0.5s; + } + + .gardenIndicatorPicto{ + z-index:6; + position: absolute; + left: 0; + top: -0.5em; + font-size: 1.2em; + background-color: $engieWhite; + padding: 0.2em; + line-height: 1.2em; + width: 1.2em; + border-radius: 50%; + text-align:center; + border:1px solid #000; + + img{ + height: 1.2em; + margin:0; + } + + } + + @each $name, $color in $engieColors { + &.#{$name} { + color: $color; + + .gardenIndicatorPicto { + border-color: $color; + } + + .meter > span{ + background-color:$color; + } + } + } + +} + +/****************************************************************************/ +/* +/* PRELOADER +/* +/****************************************************************************/ + +@keyframes spinAround { + from { + transform: rotate(0deg) + } + to { + transform: rotate(360deg); + } +} + +.sk-cube-grid { + width: 40px; + height: 40px; + margin: 100px auto; + + .sk-cube { + width: 33%; + height: 33%; + float: left; + animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out; + border-radius: 50%; + } + + .sk-cube1 { animation-delay: 0.2s; } + .sk-cube2 { animation-delay: 0.3s; } + .sk-cube3 { animation-delay: 0.4s; } + .sk-cube4 { animation-delay: 0.1s; } + .sk-cube5 { animation-delay: 0.2s; } + .sk-cube6 { animation-delay: 0.3s; } + .sk-cube7 { animation-delay: 0s; } + .sk-cube8 { animation-delay: 0.1s; } + .sk-cube9 { animation-delay: 0.2s; } +} + +@keyframes sk-cubeGridScaleDelay { + 0%, 70%, 100% { + transform: scale3D(1, 1, 1); + } 35% { + transform: scale3D(0, 0, 1); + } +} + +/****************************************************************************/ +/* +/* COLOR BAR +/* +/****************************************************************************/ + +.colorBar{ + height:0.2rem; + position:relative; + & > div { + display:block; + position:absolute; + top:0; + height:100%; + border-radius:6px; + &.bgEngiePink{ left:66%; width:34%; } + &.bgEngieYellow{ left:50%; width:16%; } + &.bgEngieBlueLight{ left:32%; width:18%; } + &.bgEngieGreenLight{ left:10%; width:22%; } + &.bgEngieGreen{ left:0; width:10%; } + &.bgEngieGreenDark{ left: 6.5%; width: 6.5%; } + &.bgEngieBlue{ left: 27%; width: 9%; } + &.bgEngieGreenDark2{ left: 46.3%; width: 8.2%; background:$engieGreenDark; } + &.bgEngieRed{ left: 61.5%; width: 9.8%; } + &.bgEngiePurple{ left: 77.5%; width: 8%; } + + } +} + +.gardenColorBar{ width:100%; margin:0.5rem 0;} + +/****************************************************************************/ +/* +/* DRAG & DROP +/* +/****************************************************************************/ + +.dropActive { + background-color: rgba(0,0,0,0.3); + border-left:1px dashed #000; + border-bottom:1px dashed #000; + opacity:0.3; +} + +.dropTarget { + background-color: transparent; +} + +.dropActive.canDrop { + background-color: #ee8a37; +} \ No newline at end of file diff --git a/app/Resources/sass/mixins.scss b/app/Resources/sass/mixins.scss new file mode 100644 index 0000000..e52bffb --- /dev/null +++ b/app/Resources/sass/mixins.scss @@ -0,0 +1,22 @@ +@function suffix-camel-case($string){ + $firstL : str-slice($string, 0, 1); + $restL : str-slice($string, 2, str-length($string)); + $firstL : to-upper-case($firstL); + @return #{$firstL}#{$restL}; +} + +@mixin decline-prop($pre, $prop, $list){ + @each $name, $color in $list { + $name : suffix-camel-case($name); + #{$pre}#{$name} { + #{$prop}: $color; + } + } +} + +@mixin decline-class($list){ + @each $name, $color in $list { + &.#{$name}{ + } + } +} \ No newline at end of file diff --git a/app/Resources/styles/main.css b/app/Resources/styles/main.css deleted file mode 100644 index 5ffbcc0..0000000 --- a/app/Resources/styles/main.css +++ /dev/null @@ -1,4 +0,0 @@ -body{ - background:#333333; - color:#ffffff; -} \ No newline at end of file diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index 461601a..bafd28d 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -3,27 +3,11 @@ {% block title %}Welcome!{% endblock %} - {% block stylesheets %} - - - - - {% endblock %} + {% block stylesheets %}{% endblock %} {% block body %}{% endblock %} - {% block javascripts %} - {% if app.environment == 'dev' %} - - {% else %} - - - - - - - {% endif %} - {% endblock %} + {% block javascripts %}{% endblock %} diff --git a/app/Resources/views/default/app.html.twig b/app/Resources/views/default/app.html.twig new file mode 100644 index 0000000..66e3a43 --- /dev/null +++ b/app/Resources/views/default/app.html.twig @@ -0,0 +1,25 @@ +{% extends 'base.html.twig' %} + +{% block stylesheets %} + + + + +{% endblock %} + +{% block body %} +
+{% endblock %} + +{% block javascripts %} + {% if app.environment == 'dev' %} + + {% else %} + + + + + + + {% endif %} +{% endblock %} diff --git a/app/Resources/views/default/index.html.twig b/app/Resources/views/default/index.html.twig index 219a986..0e8ceab 100644 --- a/app/Resources/views/default/index.html.twig +++ b/app/Resources/views/default/index.html.twig @@ -1,5 +1,7 @@ {% extends 'base.html.twig' %} {% block body %} -
+ test {% endblock %} + + diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index 12497a5..e13ab44 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -1,5 +1,7 @@ imports: - { resource: config.yml } + - { resource: @GardenBundle/Resources/config/config.yml } + - { resource: @GardenBundle/Resources/config/services.yml } framework: router: diff --git a/app/config/routing.yml b/app/config/routing.yml index ae354d6..69bf4fd 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -5,13 +5,16 @@ NelmioApiDocBundle: tasks: resource: "@AppBundle/Controller/TaskController.php" type: rest - prefix: /api + prefix: /api garden: resource: "@GardenBundle/Controller/GardenController.php" type: rest prefix: /api +index: + pattern: /index + defaults: { _controller: AppBundle:Default:index } fallback: - pattern: /{url} - defaults: { _controller: AppBundle:Default:index, url: null } + pattern: /app/{url} + defaults: { _controller: AppBundle:Default:app, url: null } requirements: url: .* diff --git a/composer.json b/composer.json index 5607577..1521b55 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,7 @@ }, "require-dev": { "sensio/generator-bundle": "~3.0", + "willdurand/faker-bundle": "@stable", "symfony/phpunit-bridge": "~2.7" }, "scripts": { diff --git a/composer.lock b/composer.lock index f6463e3..02cf6ff 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "114f6e9f70f46adc4a95025ec26a8461", - "content-hash": "6868e450a9689cee0718faeadef18a8e", + "hash": "ec30c3dd2a9a25a7c7eee50eb8834314", + "content-hash": "28faeb22a518e8f40c3a45b9f5ef81eb", "packages": [ { "name": "doctrine/annotations", @@ -1098,21 +1098,22 @@ }, { "name": "jms/di-extra-bundle", - "version": "1.7.0", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/JMSDiExtraBundle.git", - "reference": "85a989bedcf22495c03bf94339ddc5e856bd9b46" + "reference": "27c3fc7150550ccc0731290b2c1ceb57449f909d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/JMSDiExtraBundle/zipball/85a989bedcf22495c03bf94339ddc5e856bd9b46", - "reference": "85a989bedcf22495c03bf94339ddc5e856bd9b46", + "url": "https://api.github.com/repos/schmittjoh/JMSDiExtraBundle/zipball/27c3fc7150550ccc0731290b2c1ceb57449f909d", + "reference": "27c3fc7150550ccc0731290b2c1ceb57449f909d", "shasum": "" }, "require": { "jms/aop-bundle": "~1.1", "jms/metadata": "~1.0", + "php": "~5.3|~7.0", "symfony/dependency-injection": "~2.3|~3.0", "symfony/finder": "~2.3|~3.0", "symfony/framework-bundle": "~2.3|~3.0", @@ -1123,7 +1124,7 @@ "require-dev": { "doctrine/doctrine-bundle": "~1.5", "doctrine/orm": "~2.3", - "jms/security-extra-bundle": "~1.0@dev", + "jms/security-extra-bundle": "~1.0", "phpcollection/phpcollection": ">=0.2,<0.3-dev", "sensio/framework-extra-bundle": "~2.0|~3.0", "symfony/browser-kit": "~2.3|~3.0", @@ -1162,7 +1163,7 @@ "annotations", "dependency injection" ], - "time": "2016-02-21 22:14:09" + "time": "2016-04-18 22:27:09" }, { "name": "jms/metadata", @@ -1447,16 +1448,16 @@ }, { "name": "monolog/monolog", - "version": "1.18.1", + "version": "1.19.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "a5f2734e8c16f3aa21b3da09715d10e15b4d2d45" + "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a5f2734e8c16f3aa21b3da09715d10e15b4d2d45", - "reference": "a5f2734e8c16f3aa21b3da09715d10e15b4d2d45", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5f56ed5212dc509c8dc8caeba2715732abb32dbf", + "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf", "shasum": "" }, "require": { @@ -1471,13 +1472,13 @@ "doctrine/couchdb": "~1.0@dev", "graylog2/gelf-php": "~1.0", "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", "phpunit/phpunit": "~4.5", "phpunit/phpunit-mock-objects": "2.3.0", "raven/raven": "^0.13", "ruflin/elastica": ">=0.90 <3.0", - "swiftmailer/swiftmailer": "~5.3", - "videlalvaro/php-amqplib": "~2.4" + "swiftmailer/swiftmailer": "~5.3" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -1486,11 +1487,11 @@ "ext-mongo": "Allow sending log messages to a MongoDB server", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-console/php-console": "Allow sending log messages to Google Chrome", "raven/raven": "Allow sending log messages to a Sentry server", "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, "type": "library", "extra": { @@ -1521,7 +1522,7 @@ "logging", "psr-3" ], - "time": "2016-03-13 16:08:35" + "time": "2016-04-12 18:29:35" }, { "name": "nelmio/api-doc-bundle", @@ -2007,20 +2008,20 @@ }, { "name": "symfony/monolog-bundle", - "version": "v2.10.0", + "version": "2.11.1", "source": { "type": "git", "url": "https://github.com/symfony/monolog-bundle.git", - "reference": "82fd8f36e2cccbe94faf237403c48052d4d4b77e" + "reference": "e7caf4936c7be82bc6d68df87f1d23a0d5bf6e00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/82fd8f36e2cccbe94faf237403c48052d4d4b77e", - "reference": "82fd8f36e2cccbe94faf237403c48052d4d4b77e", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/e7caf4936c7be82bc6d68df87f1d23a0d5bf6e00", + "reference": "e7caf4936c7be82bc6d68df87f1d23a0d5bf6e00", "shasum": "" }, "require": { - "monolog/monolog": "~1.12", + "monolog/monolog": "~1.18", "php": ">=5.3.2", "symfony/config": "~2.3|~3.0", "symfony/dependency-injection": "~2.3|~3.0", @@ -2035,7 +2036,7 @@ "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "2.9.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -2063,7 +2064,7 @@ "log", "logging" ], - "time": "2016-03-13 15:55:56" + "time": "2016-04-13 16:21:01" }, { "name": "symfony/polyfill-apcu", @@ -2636,16 +2637,16 @@ }, { "name": "symfony/symfony", - "version": "v2.8.3", + "version": "v2.8.4", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "7a9a5fce7ce6e448e527f635463dda00761e12c2" + "reference": "9e14f9f4869c19188a376eab61d9a1c1f1fee347" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/7a9a5fce7ce6e448e527f635463dda00761e12c2", - "reference": "7a9a5fce7ce6e448e527f635463dda00761e12c2", + "url": "https://api.github.com/repos/symfony/symfony/zipball/9e14f9f4869c19188a376eab61d9a1c1f1fee347", + "reference": "9e14f9f4869c19188a376eab61d9a1c1f1fee347", "shasum": "" }, "require": { @@ -2732,11 +2733,7 @@ }, "autoload": { "psr-4": { - "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", - "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", - "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", - "Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/", - "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", + "Symfony\\Bridge\\": "src/Symfony/Bridge/", "Symfony\\Bundle\\": "src/Symfony/Bundle/", "Symfony\\Component\\": "src/Symfony/Component/" }, @@ -2766,7 +2763,7 @@ "keywords": [ "framework" ], - "time": "2016-02-28 21:06:29" + "time": "2016-03-27 12:57:53" }, { "name": "twig/twig", @@ -2920,6 +2917,58 @@ } ], "packages-dev": [ + { + "name": "fzaninotto/faker", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "d0190b156bcca848d401fb80f31f504f37141c8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d0190b156bcca848d401fb80f31f504f37141c8d", + "reference": "d0190b156bcca848d401fb80f31f504f37141c8d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "suggest": { + "ext-intl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2015-05-29 06:29:14" + }, { "name": "sensio/generator-bundle", "version": "v3.0.6", @@ -2974,16 +3023,16 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v2.8.3", + "version": "v2.8.4", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "ee8ead4f78e21ed6c873d1cc19e141949d9ed493" + "reference": "a967db6a4cd5d276cf849d01b29dba559e149978" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/ee8ead4f78e21ed6c873d1cc19e141949d9ed493", - "reference": "ee8ead4f78e21ed6c873d1cc19e141949d9ed493", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/a967db6a4cd5d276cf849d01b29dba559e149978", + "reference": "a967db6a4cd5d276cf849d01b29dba559e149978", "shasum": "" }, "require": { @@ -3025,12 +3074,66 @@ ], "description": "Symfony PHPUnit Bridge", "homepage": "https://symfony.com", - "time": "2016-01-21 09:24:53" + "time": "2016-03-23 13:45:24" + }, + { + "name": "willdurand/faker-bundle", + "version": "1.3.0", + "target-dir": "Bazinga/Bundle/FakerBundle", + "source": { + "type": "git", + "url": "https://github.com/willdurand/BazingaFakerBundle.git", + "reference": "3bbfbec69da2fbb450b26557b3656609c4a1841d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/willdurand/BazingaFakerBundle/zipball/3bbfbec69da2fbb450b26557b3656609c4a1841d", + "reference": "3bbfbec69da2fbb450b26557b3656609c4a1841d", + "shasum": "" + }, + "require": { + "fzaninotto/faker": "~1.3", + "php": ">=5.3", + "symfony/framework-bundle": "~2.3|~3.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7|~3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-0": { + "Bazinga\\Bundle\\FakerBundle": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "William Durand", + "email": "william.durand1@gmail.com" + } + ], + "description": "Put the awesome Faker lib into the DIC and populate your database with fake data.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2015-12-04 08:42:05" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "willdurand/faker-bundle": 0 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php index 2d84338..5f72376 100644 --- a/src/AppBundle/Controller/DefaultController.php +++ b/src/AppBundle/Controller/DefaultController.php @@ -8,11 +8,21 @@ class DefaultController extends Controller { + /** - * @Route("/", name="app") + * @Route("/index", name="index") */ public function indexAction() { - return $this->render('default/index.html.twig'); + return $this->render(':default:index.html.twig'); } + + /** + * @Route("/", name="app") + */ + public function appAction() + { + return $this->render(':default:app.html.twig'); + } + } diff --git a/src/GardenBundle/Entity/Garden.php b/src/GardenBundle/Entity/Garden.php index 2303da5..1358b09 100644 --- a/src/GardenBundle/Entity/Garden.php +++ b/src/GardenBundle/Entity/Garden.php @@ -2,12 +2,13 @@ namespace GardenBundle\Entity; +use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; /** * Garden * - * @ORM\Table(name="garden") + * @ORM\Table(name="garden", uniqueConstraints={@ORM\UniqueConstraint(name="user_garden_idx", columns={"id", "user"})})) * @ORM\Entity(repositoryClass="GardenBundle\Repository\GardenRepository") */ class Garden @@ -22,19 +23,60 @@ class Garden private $id; /** - * @var string + * @var int * - * @ORM\Column(name="name", type="string", length=255) + * @ORM\Column(name="user", type="integer", nullable=true) */ - private $name; + private $user; /** * @var string * - * @ORM\Column(name="content", type="string", length=255) + * @ORM\Column(name="text", type="text") + */ + private $text; + + /** + * @var int + * + * @ORM\Column(name="points", type="integer") + */ + private $points; + + /** + * @var array + * + * @ORM\OneToMany(targetEntity="GardenIndicator", mappedBy="garden", cascade={"all"}) */ - private $content; + private $indicators; + /** + * @var int + * + * @ORM\OneToMany(targetEntity="GardenTile", mappedBy="garden", cascade={"all"}) + */ + private $tiles; + + /** + * var array + * + * @ORM\ManyToMany(targetEntity="GardenItem") + * @ORM\JoinTable(name="garden_available_items", + * joinColumns={@ORM\JoinColumn(name="garden_id", referencedColumnName="id")}, + * inverseJoinColumns={@ORM\JoinColumn(name="item_id", referencedColumnName="id")} + * ) + */ + private $availableItems; + + /** + * Garden constructor. + */ + public function __construct() + { + $this->indicators = new ArrayCollection(); + $this->tiles = new ArrayCollection(); + $this->availableItems = new ArrayCollection(); + } /** * Get id @@ -47,51 +89,145 @@ public function getId() } /** - * Set name + * Set user * - * @param string $name + * @param integer $user * * @return Garden */ - public function setName($name) + public function setUser($user) { - $this->name = $name; + $this->user = $user; return $this; } /** - * Get name + * Get user * - * @return string + * @return int */ - public function getName() + public function getUser() { - return $this->name; + return $this->user; } /** - * Set content + * Set text * - * @param string $content + * @param string $text * * @return Garden */ - public function setContent($content) + public function setText($text) { - $this->content = $content; + $this->text = $text; return $this; } /** - * Get content + * Get text * * @return string */ - public function getContent() + public function getText() + { + return $this->text; + } + + /** + * Set points + * + * @param integer $points + * + * @return Garden + */ + public function setPoints($points) { - return $this->content; + $this->points = $points; + + return $this; + } + + /** + * Get points + * + * @return int + */ + public function getPoints() + { + return $this->points; + } + + /** + * Set indicators + * + * @param integer $indicators + * + * @return Garden + */ + public function setIndicators($indicators) + { + $this->indicators = $indicators; + + return $this; + } + + /** + * Get indicators + * + * @return int + */ + public function getIndicators() + { + return $this->indicators; + } + + /** + * Set tiles + * + * @param integer $tiles + * + * @return Garden + */ + public function setTiles($tiles) + { + $this->tiles = $tiles; + + return $this; + } + + /** + * Get tiles + * + * @return int + */ + public function getTiles() + { + return $this->tiles; + } + + + /** + * get availableItems + * + * @return array + */ + public function getAvailableItems() + { + return $this->availableItems; + } + + /** + * set availableItems + * + * @param array $availableItems + */ + public function setAvailableItems($availableItems) + { + $this->availableItems = $availableItems; + return $this; } } diff --git a/src/GardenBundle/Entity/GardenData.php b/src/GardenBundle/Entity/GardenData.php new file mode 100644 index 0000000..d487538 --- /dev/null +++ b/src/GardenBundle/Entity/GardenData.php @@ -0,0 +1,97 @@ +id; + } + + /** + * Set name + * + * @param string $name + * + * @return Garden + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get name + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set content + * + * @param string $content + * + * @return Garden + */ + public function setContent($content) + { + $this->content = $content; + + return $this; + } + + /** + * Get content + * + * @return string + */ + public function getContent() + { + return $this->content; + } +} + diff --git a/src/GardenBundle/Entity/GardenIndicator.php b/src/GardenBundle/Entity/GardenIndicator.php new file mode 100644 index 0000000..1a29456 --- /dev/null +++ b/src/GardenBundle/Entity/GardenIndicator.php @@ -0,0 +1,341 @@ +id; + } + + /** + * Set uid + * + * @param string $uid + * + * @return GardenIndicator + */ + public function setUid($uid) + { + $this->uid = $uid; + + return $this; + } + + /** + * Get uid + * + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Set name + * + * @param string $name + * + * @return GardenIndicator + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get name + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set picto + * + * @param string $picto + * + * @return GardenIndicator + */ + public function setPicto($picto) + { + $this->picto = $picto; + + return $this; + } + + /** + * Get picto + * + * @return string + */ + public function getPicto() + { + return $this->picto; + } + + /** + * Set cl + * + * @param string $cl + * + * @return GardenIndicator + */ + public function setCl($cl) + { + $this->cl = $cl; + + return $this; + } + + /** + * Get cl + * + * @return string + */ + public function getCl() + { + return $this->cl; + } + + /** + * Set criteria + * + * @param integer $criteria + * + * @return GardenIndicator + */ + public function setCriteria($criteria) + { + $this->criteria = $criteria; + + return $this; + } + + /** + * Get criteria + * + * @return int + */ + public function getCriteria() + { + return $this->criteria; + } + + /** + * Set value + * + * @param float $value + * + * @return GardenIndicator + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Get value + * + * @return float + */ + public function getValue() + { + return $this->value; + } + + /** + * Set min + * + * @param float $min + * + * @return GardenIndicator + */ + public function setMin($min) + { + $this->min = $min; + + return $this; + } + + /** + * Get min + * + * @return float + */ + public function getMin() + { + return $this->min; + } + + /** + * Set max + * + * @param float $max + * + * @return GardenIndicator + */ + public function setMax($max) + { + $this->max = $max; + + return $this; + } + + /** + * Get max + * + * @return float + */ + public function getMax() + { + return $this->max; + } + + /** + * get garden + * + * @return Garden + */ + public function getGarden() + { + return $this->garden; + } + + /** + * set garden + * + * @param Garden $garden + */ + public function setGarden(Garden $garden) + { + $this->garden = $garden; + return $this; + } + + /** + * get percs + * + * @return ArrayCollection + */ + public function getPercs() + { + return $this->percs; + } + + /** + * set percs + * + * @param ArrayCollection $percs + */ + public function setPercs($percs) + { + $this->percs = $percs; + return $this; + } +} + diff --git a/src/GardenBundle/Entity/GardenItem.php b/src/GardenBundle/Entity/GardenItem.php new file mode 100644 index 0000000..7589d01 --- /dev/null +++ b/src/GardenBundle/Entity/GardenItem.php @@ -0,0 +1,351 @@ +percs = new ArrayCollection(); + } + + + /** + * Get id + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set uid + * + * @param string $uid + * + * @return GardenItem + */ + public function setUid($uid) + { + $this->uid = $uid; + + return $this; + } + + /** + * Get uid + * + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Set name + * + * @param string $name + * + * @return GardenItem + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get name + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set type + * + * @param integer $type + * + * @return GardenItem + */ + public function setType($type) + { + $this->type = $type; + + return $this; + } + + /** + * Get type + * + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Set picto + * + * @param string $picto + * + * @return GardenItem + */ + public function setPicto($picto) + { + $this->picto = $picto; + + return $this; + } + + /** + * Get picto + * + * @return string + */ + public function getPicto() + { + return $this->picto; + } + + /** + * Set cl + * + * @param string $cl + * + * @return GardenItem + */ + public function setCl($cl) + { + $this->cl = $cl; + + return $this; + } + + /** + * Get cl + * + * @return string + */ + public function getCl() + { + return $this->cl; + } + + /** + * Set odr + * + * @param integer $odr + * + * @return GardenItem + */ + public function setOdr($odr) + { + $this->odr = $odr; + + return $this; + } + + /** + * Get odr + * + * @return int + */ + public function getOdr() + { + return $this->odr; + } + + /** + * Set price + * + * @param integer $price + * + * @return GardenItem + */ + public function setPrice($price) + { + $this->price = $price; + + return $this; + } + + /** + * Get price + * + * @return int + */ + public function getPrice() + { + return $this->price; + } + + /** + * Set infos + * + * @param string $infos + * + * @return GardenItem + */ + public function setInfos($infos) + { + $this->infos = $infos; + + return $this; + } + + /** + * Get infos + * + * @return string + */ + public function getInfos() + { + return $this->infos; + } + + /** + * Set percs + * + * @param ArrayCollection $percs + * + * @return GardenItem + */ + public function setPercs($percs) + { + $this->percs = $percs; + + return $this; + } + + /** + * Add perc + * + * @param GardenItemPerc $perc + * + * @return GardenItem + */ + public function addPerc(GardenItemPerc $perc){ + + $this->percs->add($perc); + + return $this; + } + + /** + * Remove perc + * + * @param GardenItemPerc $perc + * + * @return GardenItem + */ + public function removePerc(GardenItemPerc $perc){ + + $this->percs->removeElement($perc); + + return $this; + } + + /** + * Get percs + * + * @return ArrayCollection + */ + public function getPercs() + { + return $this->percs; + } +} + diff --git a/src/GardenBundle/Entity/GardenItemPerc.php b/src/GardenBundle/Entity/GardenItemPerc.php new file mode 100644 index 0000000..78e4634 --- /dev/null +++ b/src/GardenBundle/Entity/GardenItemPerc.php @@ -0,0 +1,173 @@ +item = $item; + $this->indicator = $indicator; + } + + + /** + * Get id + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set item + * + * @param GardenItem $item + * + * @return GardenItemPerc + */ + public function setItem(GardenItem $item) + { + $this->item = $item; + + return $this; + } + + /** + * Get item + * + * @return GardenItem + */ + public function getItem() + { + return $this->item; + } + + /** + * Set indicator + * + * @param GardenIndicator $indicator + * + * @return GardenItemPerc + */ + public function setIndicator(GardenIndicator $indicator) + { + $this->indicator = $indicator; + + return $this; + } + + /** + * Get indicator + * + * @return GardenIndicator + */ + public function getIndicator() + { + return $this->indicator; + } + + /** + * Set text + * + * @param string $text + * + * @return GardenItemPerc + */ + public function setText($text) + { + $this->text = $text; + + return $this; + } + + /** + * Get text + * + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Set value + * + * @param float $value + * + * @return GardenItemPerc + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Get value + * + * @return float + */ + public function getValue() + { + return $this->value; + } +} + diff --git a/src/GardenBundle/Entity/GardenTile.php b/src/GardenBundle/Entity/GardenTile.php new file mode 100644 index 0000000..91bb29b --- /dev/null +++ b/src/GardenBundle/Entity/GardenTile.php @@ -0,0 +1,168 @@ +item = null; + $this->garden = $garden; + } + + /** + * Get id + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set x + * + * @param integer $x + * + * @return GardenTile + */ + public function setX($x) + { + $this->x = $x; + + return $this; + } + + /** + * Get x + * + * @return int + */ + public function getX() + { + return $this->x; + } + + /** + * Set y + * + * @param integer $y + * + * @return GardenTile + */ + public function setY($y) + { + $this->y = $y; + + return $this; + } + + /** + * Get y + * + * @return int + */ + public function getY() + { + return $this->y; + } + + /** + * Set item + * + * @param GardenItem $item + * + * @return GardenTile + */ + public function setItem(GardenItem $item) + { + $this->item = $item; + + return $this; + } + + /** + * Get item + * + * @return GardenItem + */ + public function getItem() + { + return $this->item; + } + + /** + * get garden + * + * @return Garden + */ + public function getGarden() + { + return $this->garden; + } + + /** + * set garden + * + * @param Garden $garden + */ + public function setGarden(Garden $garden) + { + $this->garden = $garden; + return $this; + } +} + diff --git a/src/GardenBundle/Repository/GardenDataRepository.php b/src/GardenBundle/Repository/GardenDataRepository.php new file mode 100644 index 0000000..78747c2 --- /dev/null +++ b/src/GardenBundle/Repository/GardenDataRepository.php @@ -0,0 +1,13 @@ + + * @date: 20/04/16 + * @time: 09:18 + */ + +namespace GardenBundle\Util\Faker; + + +class PictoProvider extends \Faker\Provider\Base +{ + + protected $ionicons = array('.ion-alert', '.ion-alert-circled', '.ion-android-add', '.ion-android-add-circle', '.ion-android-alarm-clock', '.ion-android-alert', '.ion-android-apps', '.ion-android-archive', '.ion-android-arrow-back', '.ion-android-arrow-down', '.ion-android-arrow-dropdown', '.ion-android-arrow-dropdown-circle', '.ion-android-arrow-dropleft', '.ion-android-arrow-dropleft-circle', '.ion-android-arrow-dropright', '.ion-android-arrow-dropright-circle', '.ion-android-arrow-dropup', '.ion-android-arrow-dropup-circle', '.ion-android-arrow-forward', '.ion-android-arrow-up', '.ion-android-attach', '.ion-android-bar', '.ion-android-bicycle', '.ion-android-boat', '.ion-android-bookmark', '.ion-android-bulb', '.ion-android-bus', '.ion-android-calendar', '.ion-android-call', '.ion-android-camera', '.ion-android-cancel', '.ion-android-car', '.ion-android-cart', '.ion-android-chat', '.ion-android-checkbox', '.ion-android-checkbox-blank', '.ion-android-checkbox-outline', '.ion-android-checkbox-outline-blank', '.ion-android-checkmark-circle', '.ion-android-clipboard', '.ion-android-close', '.ion-android-cloud', '.ion-android-cloud-circle', '.ion-android-cloud-done', '.ion-android-cloud-outline', '.ion-android-color-palette', '.ion-android-compass', '.ion-android-contact', '.ion-android-contacts', '.ion-android-contract', '.ion-android-create', '.ion-android-delete', '.ion-android-desktop', '.ion-android-document', '.ion-android-done', '.ion-android-done-all', '.ion-android-download', '.ion-android-drafts', '.ion-android-exit', '.ion-android-expand', '.ion-android-favorite', '.ion-android-favorite-outline', '.ion-android-film', '.ion-android-folder', '.ion-android-folder-open', '.ion-android-funnel', '.ion-android-globe', '.ion-android-hand', '.ion-android-hangout', '.ion-android-happy', '.ion-android-home', '.ion-android-image', '.ion-android-laptop', '.ion-android-list', '.ion-android-locate', '.ion-android-lock', '.ion-android-mail', '.ion-android-map', '.ion-android-menu', '.ion-android-microphone', '.ion-android-microphone-off', '.ion-android-more-horizontal', '.ion-android-more-vertical', '.ion-android-navigate', '.ion-android-notifications', '.ion-android-notifications-none', '.ion-android-notifications-off', '.ion-android-open', '.ion-android-options', '.ion-android-people', '.ion-android-person', '.ion-android-person-add', '.ion-android-phone-landscape', '.ion-android-phone-portrait', '.ion-android-pin', '.ion-android-plane', '.ion-android-playstore', '.ion-android-print', '.ion-android-radio-button-off', '.ion-android-radio-button-on', '.ion-android-refresh', '.ion-android-remove', '.ion-android-remove-circle', '.ion-android-restaurant', '.ion-android-sad', '.ion-android-search', '.ion-android-send', '.ion-android-settings', '.ion-android-share', '.ion-android-share-alt', '.ion-android-star', '.ion-android-star-half', '.ion-android-star-outline', '.ion-android-stopwatch', '.ion-android-subway', '.ion-android-sunny', '.ion-android-sync', '.ion-android-textsms', '.ion-android-time', '.ion-android-train', '.ion-android-unlock', '.ion-android-upload', '.ion-android-volume-down', '.ion-android-volume-mute', '.ion-android-volume-off', '.ion-android-volume-up', '.ion-android-walk', '.ion-android-warning', '.ion-android-watch', '.ion-android-wifi', '.ion-aperture', '.ion-archive', '.ion-arrow-down-a', '.ion-arrow-down-b', '.ion-arrow-down-c', '.ion-arrow-expand', '.ion-arrow-graph-down-left', '.ion-arrow-graph-down-right', '.ion-arrow-graph-up-left', '.ion-arrow-graph-up-right', '.ion-arrow-left-a', '.ion-arrow-left-b', '.ion-arrow-left-c', '.ion-arrow-move', '.ion-arrow-resize', '.ion-arrow-return-left', '.ion-arrow-return-right', '.ion-arrow-right-a', '.ion-arrow-right-b', '.ion-arrow-right-c', '.ion-arrow-shrink', '.ion-arrow-swap', '.ion-arrow-up-a', '.ion-arrow-up-b', '.ion-arrow-up-c', '.ion-asterisk', '.ion-at', '.ion-backspace', '.ion-backspace-outline', '.ion-bag', '.ion-battery-charging', '.ion-battery-empty', '.ion-battery-full', '.ion-battery-half', '.ion-battery-low', '.ion-beaker', '.ion-beer', '.ion-bluetooth', '.ion-bonfire', '.ion-bookmark', '.ion-bowtie', '.ion-briefcase', '.ion-bug', '.ion-calculator', '.ion-calendar', '.ion-camera', '.ion-card', '.ion-cash', '.ion-chatbox', '.ion-chatbox-working', '.ion-chatboxes', '.ion-chatbubble', '.ion-chatbubble-working', '.ion-chatbubbles', '.ion-checkmark', '.ion-checkmark-circled', '.ion-checkmark-round', '.ion-chevron-down', '.ion-chevron-left', '.ion-chevron-right', '.ion-chevron-up', '.ion-clipboard', '.ion-clock', '.ion-close', '.ion-close-circled', '.ion-close-round', '.ion-closed-captioning', '.ion-cloud', '.ion-code', '.ion-code-download', '.ion-code-working', '.ion-coffee', '.ion-compass', '.ion-compose', '.ion-connection-bars', '.ion-contrast', '.ion-crop', '.ion-cube', '.ion-disc', '.ion-document', '.ion-document-text', '.ion-drag', '.ion-earth', '.ion-easel', '.ion-edit', '.ion-egg', '.ion-eject', '.ion-email', '.ion-email-unread', '.ion-erlenmeyer-flask', '.ion-erlenmeyer-flask-bubbles', '.ion-eye', '.ion-eye-disabled', '.ion-female', '.ion-filing', '.ion-film-marker', '.ion-fireball', '.ion-flag', '.ion-flame', '.ion-flash', '.ion-flash-off', '.ion-folder', '.ion-fork', '.ion-fork-repo', '.ion-forward', '.ion-funnel', '.ion-gear-a', '.ion-gear-b', '.ion-grid', '.ion-hammer', '.ion-happy', '.ion-happy-outline', '.ion-headphone', '.ion-heart', '.ion-heart-broken', '.ion-help', '.ion-help-buoy', '.ion-help-circled', '.ion-home', '.ion-icecream', '.ion-image', '.ion-images', '.ion-information', '.ion-information-circled', '.ion-ionic', '.ion-ios-alarm', '.ion-ios-alarm-outline', '.ion-ios-albums', '.ion-ios-albums-outline', '.ion-ios-americanfootball', '.ion-ios-americanfootball-outline', '.ion-ios-analytics', '.ion-ios-analytics-outline', '.ion-ios-arrow-back', '.ion-ios-arrow-down', '.ion-ios-arrow-forward', '.ion-ios-arrow-left', '.ion-ios-arrow-right', '.ion-ios-arrow-thin-down', '.ion-ios-arrow-thin-left', '.ion-ios-arrow-thin-right', '.ion-ios-arrow-thin-up', '.ion-ios-arrow-up', '.ion-ios-at', '.ion-ios-at-outline', '.ion-ios-barcode', '.ion-ios-barcode-outline', '.ion-ios-baseball', '.ion-ios-baseball-outline', '.ion-ios-basketball', '.ion-ios-basketball-outline', '.ion-ios-bell', '.ion-ios-bell-outline', '.ion-ios-body', '.ion-ios-body-outline', '.ion-ios-bolt', '.ion-ios-bolt-outline', '.ion-ios-book', '.ion-ios-book-outline', '.ion-ios-bookmarks', '.ion-ios-bookmarks-outline', '.ion-ios-box', '.ion-ios-box-outline', '.ion-ios-briefcase', '.ion-ios-briefcase-outline', '.ion-ios-browsers', '.ion-ios-browsers-outline', '.ion-ios-calculator', '.ion-ios-calculator-outline', '.ion-ios-calendar', '.ion-ios-calendar-outline', '.ion-ios-camera', '.ion-ios-camera-outline', '.ion-ios-cart', '.ion-ios-cart-outline', '.ion-ios-chatboxes', '.ion-ios-chatboxes-outline', '.ion-ios-chatbubble', '.ion-ios-chatbubble-outline', '.ion-ios-checkmark', '.ion-ios-checkmark-empty', '.ion-ios-checkmark-outline', '.ion-ios-circle-filled', '.ion-ios-circle-outline', '.ion-ios-clock', '.ion-ios-clock-outline', '.ion-ios-close', '.ion-ios-close-empty', '.ion-ios-close-outline', '.ion-ios-cloud', '.ion-ios-cloud-download', '.ion-ios-cloud-download-outline', '.ion-ios-cloud-outline', '.ion-ios-cloud-upload', '.ion-ios-cloud-upload-outline', '.ion-ios-cloudy', '.ion-ios-cloudy-night', '.ion-ios-cloudy-night-outline', '.ion-ios-cloudy-outline', '.ion-ios-cog', '.ion-ios-cog-outline', '.ion-ios-color-filter', '.ion-ios-color-filter-outline', '.ion-ios-color-wand', '.ion-ios-color-wand-outline', '.ion-ios-compose', '.ion-ios-compose-outline', '.ion-ios-contact', '.ion-ios-contact-outline', '.ion-ios-copy', '.ion-ios-copy-outline', '.ion-ios-crop', '.ion-ios-crop-strong', '.ion-ios-download', '.ion-ios-download-outline', '.ion-ios-drag', '.ion-ios-email', '.ion-ios-email-outline', '.ion-ios-eye', '.ion-ios-eye-outline', '.ion-ios-fastforward', '.ion-ios-fastforward-outline', '.ion-ios-filing', '.ion-ios-filing-outline', '.ion-ios-film', '.ion-ios-film-outline', '.ion-ios-flag', '.ion-ios-flag-outline', '.ion-ios-flame', '.ion-ios-flame-outline', '.ion-ios-flask', '.ion-ios-flask-outline', '.ion-ios-flower', '.ion-ios-flower-outline', '.ion-ios-folder', '.ion-ios-folder-outline', '.ion-ios-football', '.ion-ios-football-outline', '.ion-ios-game-controller-a', '.ion-ios-game-controller-a-outline', '.ion-ios-game-controller-b', '.ion-ios-game-controller-b-outline', '.ion-ios-gear', '.ion-ios-gear-outline', '.ion-ios-glasses', '.ion-ios-glasses-outline', '.ion-ios-grid-view', '.ion-ios-grid-view-outline', '.ion-ios-heart', '.ion-ios-heart-outline', '.ion-ios-help', '.ion-ios-help-empty', '.ion-ios-help-outline', '.ion-ios-home', '.ion-ios-home-outline', '.ion-ios-infinite', '.ion-ios-infinite-outline', '.ion-ios-information', '.ion-ios-information-empty', '.ion-ios-information-outline', '.ion-ios-ionic-outline', '.ion-ios-keypad', '.ion-ios-keypad-outline', '.ion-ios-lightbulb', '.ion-ios-lightbulb-outline', '.ion-ios-list', '.ion-ios-list-outline', '.ion-ios-location', '.ion-ios-location-outline', '.ion-ios-locked', '.ion-ios-locked-outline', '.ion-ios-loop', '.ion-ios-loop-strong', '.ion-ios-medical', '.ion-ios-medical-outline', '.ion-ios-medkit', '.ion-ios-medkit-outline', '.ion-ios-mic', '.ion-ios-mic-off', '.ion-ios-mic-outline', '.ion-ios-minus', '.ion-ios-minus-empty', '.ion-ios-minus-outline', '.ion-ios-monitor', '.ion-ios-monitor-outline', '.ion-ios-moon', '.ion-ios-moon-outline', '.ion-ios-more', '.ion-ios-more-outline', '.ion-ios-musical-note', '.ion-ios-musical-notes', '.ion-ios-navigate', '.ion-ios-navigate-outline', '.ion-ios-nutrition', '.ion-ios-nutrition-outline', '.ion-ios-paper', '.ion-ios-paper-outline', '.ion-ios-paperplane', '.ion-ios-paperplane-outline', '.ion-ios-partlysunny', '.ion-ios-partlysunny-outline', '.ion-ios-pause', '.ion-ios-pause-outline', '.ion-ios-paw', '.ion-ios-paw-outline', '.ion-ios-people', '.ion-ios-people-outline', '.ion-ios-person', '.ion-ios-person-outline', '.ion-ios-personadd', '.ion-ios-personadd-outline', '.ion-ios-photos', '.ion-ios-photos-outline', '.ion-ios-pie', '.ion-ios-pie-outline', '.ion-ios-pint', '.ion-ios-pint-outline', '.ion-ios-play', '.ion-ios-play-outline', '.ion-ios-plus', '.ion-ios-plus-empty', '.ion-ios-plus-outline', '.ion-ios-pricetag', '.ion-ios-pricetag-outline', '.ion-ios-pricetags', '.ion-ios-pricetags-outline', '.ion-ios-printer', '.ion-ios-printer-outline', '.ion-ios-pulse', '.ion-ios-pulse-strong', '.ion-ios-rainy', '.ion-ios-rainy-outline', '.ion-ios-recording', '.ion-ios-recording-outline', '.ion-ios-redo', '.ion-ios-redo-outline', '.ion-ios-refresh', '.ion-ios-refresh-empty', '.ion-ios-refresh-outline', '.ion-ios-reload', '.ion-ios-reverse-camera', '.ion-ios-reverse-camera-outline', '.ion-ios-rewind', '.ion-ios-rewind-outline', '.ion-ios-rose', '.ion-ios-rose-outline', '.ion-ios-search', '.ion-ios-search-strong', '.ion-ios-settings', '.ion-ios-settings-strong', '.ion-ios-shuffle', '.ion-ios-shuffle-strong', '.ion-ios-skipbackward', '.ion-ios-skipbackward-outline', '.ion-ios-skipforward', '.ion-ios-skipforward-outline', '.ion-ios-snowy', '.ion-ios-speedometer', '.ion-ios-speedometer-outline', '.ion-ios-star', '.ion-ios-star-half', '.ion-ios-star-outline', '.ion-ios-stopwatch', '.ion-ios-stopwatch-outline', '.ion-ios-sunny', '.ion-ios-sunny-outline', '.ion-ios-telephone', '.ion-ios-telephone-outline', '.ion-ios-tennisball', '.ion-ios-tennisball-outline', '.ion-ios-thunderstorm', '.ion-ios-thunderstorm-outline', '.ion-ios-time', '.ion-ios-time-outline', '.ion-ios-timer', '.ion-ios-timer-outline', '.ion-ios-toggle', '.ion-ios-toggle-outline', '.ion-ios-trash', '.ion-ios-trash-outline', '.ion-ios-undo', '.ion-ios-undo-outline', '.ion-ios-unlocked', '.ion-ios-unlocked-outline', '.ion-ios-upload', '.ion-ios-upload-outline', '.ion-ios-videocam', '.ion-ios-videocam-outline', '.ion-ios-volume-high', '.ion-ios-volume-low', '.ion-ios-wineglass', '.ion-ios-wineglass-outline', '.ion-ios-world', '.ion-ios-world-outline', '.ion-ipad', '.ion-iphone', '.ion-ipod', '.ion-jet', '.ion-key', '.ion-knife', '.ion-laptop', '.ion-leaf', '.ion-levels', '.ion-lightbulb', '.ion-link', '.ion-load-a', '.ion-load-b', '.ion-load-c', '.ion-load-d', '.ion-location', '.ion-lock-combination', '.ion-locked', '.ion-log-in', '.ion-log-out', '.ion-loop', '.ion-magnet', '.ion-male', '.ion-man', '.ion-map', '.ion-medkit', '.ion-merge', '.ion-mic-a', '.ion-mic-b', '.ion-mic-c', '.ion-minus', '.ion-minus-circled', '.ion-minus-round', '.ion-model-s', '.ion-monitor', '.ion-more', '.ion-mouse', '.ion-music-note', '.ion-navicon', '.ion-navicon-round', '.ion-navigate', '.ion-network', '.ion-no-smoking', '.ion-nuclear', '.ion-outlet', '.ion-paintbrush', '.ion-paintbucket', '.ion-paper-airplane', '.ion-paperclip', '.ion-pause', '.ion-person', '.ion-person-add', '.ion-person-stalker', '.ion-pie-graph', '.ion-pin', '.ion-pinpoint', '.ion-pizza', '.ion-plane', '.ion-planet', '.ion-play', '.ion-playstation', '.ion-plus', '.ion-plus-circled', '.ion-plus-round', '.ion-podium', '.ion-pound', '.ion-power', '.ion-pricetag', '.ion-pricetags', '.ion-printer', '.ion-pull-request', '.ion-qr-scanner', '.ion-quote', '.ion-radio-waves', '.ion-record', '.ion-refresh', '.ion-reply', '.ion-reply-all', '.ion-ribbon-a', '.ion-ribbon-b', '.ion-sad', '.ion-sad-outline', '.ion-scissors', '.ion-search', '.ion-settings', '.ion-share', '.ion-shuffle', '.ion-skip-backward', '.ion-skip-forward', '.ion-social-android', '.ion-social-android-outline', '.ion-social-angular', '.ion-social-angular-outline', '.ion-social-apple', '.ion-social-apple-outline', '.ion-social-bitcoin', '.ion-social-bitcoin-outline', '.ion-social-buffer', '.ion-social-buffer-outline', '.ion-social-chrome', '.ion-social-chrome-outline', '.ion-social-codepen', '.ion-social-codepen-outline', '.ion-social-css3', '.ion-social-css3-outline', '.ion-social-designernews', '.ion-social-designernews-outline', '.ion-social-dribbble', '.ion-social-dribbble-outline', '.ion-social-dropbox', '.ion-social-dropbox-outline', '.ion-social-euro', '.ion-social-euro-outline', '.ion-social-facebook', '.ion-social-facebook-outline', '.ion-social-foursquare', '.ion-social-foursquare-outline', '.ion-social-freebsd-devil', '.ion-social-github', '.ion-social-github-outline', '.ion-social-google', '.ion-social-google-outline', '.ion-social-googleplus', '.ion-social-googleplus-outline', '.ion-social-hackernews', '.ion-social-hackernews-outline', '.ion-social-html5', '.ion-social-html5-outline', '.ion-social-instagram', '.ion-social-instagram-outline', '.ion-social-javascript', '.ion-social-javascript-outline', '.ion-social-linkedin', '.ion-social-linkedin-outline', '.ion-social-markdown', '.ion-social-nodejs', '.ion-social-octocat', '.ion-social-pinterest', '.ion-social-pinterest-outline', '.ion-social-python', '.ion-social-reddit', '.ion-social-reddit-outline', '.ion-social-rss', '.ion-social-rss-outline', '.ion-social-sass', '.ion-social-skype', '.ion-social-skype-outline', '.ion-social-snapchat', '.ion-social-snapchat-outline', '.ion-social-tumblr', '.ion-social-tumblr-outline', '.ion-social-tux', '.ion-social-twitch', '.ion-social-twitch-outline', '.ion-social-twitter', '.ion-social-twitter-outline', '.ion-social-usd', '.ion-social-usd-outline', '.ion-social-vimeo', '.ion-social-vimeo-outline', '.ion-social-whatsapp', '.ion-social-whatsapp-outline', '.ion-social-windows', '.ion-social-windows-outline', '.ion-social-wordpress', '.ion-social-wordpress-outline', '.ion-social-yahoo', '.ion-social-yahoo-outline', '.ion-social-yen', '.ion-social-yen-outline', '.ion-social-youtube', '.ion-social-youtube-outline', '.ion-soup-can', '.ion-soup-can-outline', '.ion-speakerphone', '.ion-speedometer', '.ion-spoon', '.ion-star', '.ion-stats-bars', '.ion-steam', '.ion-stop', '.ion-thermometer', '.ion-thumbsdown', '.ion-thumbsup', '.ion-toggle', '.ion-toggle-filled', '.ion-transgender', '.ion-trash-a', '.ion-trash-b', '.ion-trophy', '.ion-tshirt', '.ion-tshirt-outline', '.ion-umbrella', '.ion-university', '.ion-unlocked', '.ion-upload', '.ion-usb', '.ion-videocamera', '.ion-volume-high', '.ion-volume-low', '.ion-volume-medium', '.ion-volume-mute', '.ion-wand', '.ion-waterdrop', '.ion-wifi', '.ion-wineglass', '.ion-woman', '.ion-wrench', '.ion-xbox'); + + /** + * Retourne une class css d'icons http://ionicons.com/ + * + * @return string + */ + public function ionicon(){ + $l = count($this->ionicons); + + return $this->ionicons[ $this->generator->numberBetween(0, $l)]; + } +} \ No newline at end of file diff --git a/web/bundle.js b/web/bundle.js new file mode 100644 index 0000000..96167be --- /dev/null +++ b/web/bundle.js @@ -0,0 +1,39030 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ var parentHotUpdateCallback = this["webpackHotUpdate"]; +/******/ this["webpackHotUpdate"] = +/******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars +/******/ hotAddUpdateChunk(chunkId, moreModules); +/******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules); +/******/ } +/******/ +/******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars +/******/ var head = document.getElementsByTagName("head")[0]; +/******/ var script = document.createElement("script"); +/******/ script.type = "text/javascript"; +/******/ script.charset = "utf-8"; +/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js"; +/******/ head.appendChild(script); +/******/ } +/******/ +/******/ function hotDownloadManifest(callback) { // eslint-disable-line no-unused-vars +/******/ if(typeof XMLHttpRequest === "undefined") +/******/ return callback(new Error("No browser support")); +/******/ try { +/******/ var request = new XMLHttpRequest(); +/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json"; +/******/ request.open("GET", requestPath, true); +/******/ request.timeout = 10000; +/******/ request.send(null); +/******/ } catch(err) { +/******/ return callback(err); +/******/ } +/******/ request.onreadystatechange = function() { +/******/ if(request.readyState !== 4) return; +/******/ if(request.status === 0) { +/******/ // timeout +/******/ callback(new Error("Manifest request to " + requestPath + " timed out.")); +/******/ } else if(request.status === 404) { +/******/ // no update available +/******/ callback(); +/******/ } else if(request.status !== 200 && request.status !== 304) { +/******/ // other failure +/******/ callback(new Error("Manifest request to " + requestPath + " failed.")); +/******/ } else { +/******/ // success +/******/ try { +/******/ var update = JSON.parse(request.responseText); +/******/ } catch(e) { +/******/ callback(e); +/******/ return; +/******/ } +/******/ callback(null, update); +/******/ } +/******/ }; +/******/ } + +/******/ +/******/ +/******/ var hotApplyOnUpdate = true; +/******/ var hotCurrentHash = "202877b3b7bbd898816e"; // eslint-disable-line no-unused-vars +/******/ var hotCurrentModuleData = {}; +/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars +/******/ +/******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars +/******/ var me = installedModules[moduleId]; +/******/ if(!me) return __webpack_require__; +/******/ var fn = function(request) { +/******/ if(me.hot.active) { +/******/ if(installedModules[request]) { +/******/ if(installedModules[request].parents.indexOf(moduleId) < 0) +/******/ installedModules[request].parents.push(moduleId); +/******/ if(me.children.indexOf(request) < 0) +/******/ me.children.push(request); +/******/ } else hotCurrentParents = [moduleId]; +/******/ } else { +/******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId); +/******/ hotCurrentParents = []; +/******/ } +/******/ return __webpack_require__(request); +/******/ }; +/******/ for(var name in __webpack_require__) { +/******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name)) { +/******/ if(Object.defineProperty) { +/******/ Object.defineProperty(fn, name, (function(name) { +/******/ return { +/******/ configurable: true, +/******/ enumerable: true, +/******/ get: function() { +/******/ return __webpack_require__[name]; +/******/ }, +/******/ set: function(value) { +/******/ __webpack_require__[name] = value; +/******/ } +/******/ }; +/******/ }(name))); +/******/ } else { +/******/ fn[name] = __webpack_require__[name]; +/******/ } +/******/ } +/******/ } +/******/ +/******/ function ensure(chunkId, callback) { +/******/ if(hotStatus === "ready") +/******/ hotSetStatus("prepare"); +/******/ hotChunksLoading++; +/******/ __webpack_require__.e(chunkId, function() { +/******/ try { +/******/ callback.call(null, fn); +/******/ } finally { +/******/ finishChunkLoading(); +/******/ } +/******/ +/******/ function finishChunkLoading() { +/******/ hotChunksLoading--; +/******/ if(hotStatus === "prepare") { +/******/ if(!hotWaitingFilesMap[chunkId]) { +/******/ hotEnsureUpdateChunk(chunkId); +/******/ } +/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) { +/******/ hotUpdateDownloaded(); +/******/ } +/******/ } +/******/ } +/******/ }); +/******/ } +/******/ if(Object.defineProperty) { +/******/ Object.defineProperty(fn, "e", { +/******/ enumerable: true, +/******/ value: ensure +/******/ }); +/******/ } else { +/******/ fn.e = ensure; +/******/ } +/******/ return fn; +/******/ } +/******/ +/******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars +/******/ var hot = { +/******/ // private stuff +/******/ _acceptedDependencies: {}, +/******/ _declinedDependencies: {}, +/******/ _selfAccepted: false, +/******/ _selfDeclined: false, +/******/ _disposeHandlers: [], +/******/ +/******/ // Module API +/******/ active: true, +/******/ accept: function(dep, callback) { +/******/ if(typeof dep === "undefined") +/******/ hot._selfAccepted = true; +/******/ else if(typeof dep === "function") +/******/ hot._selfAccepted = dep; +/******/ else if(typeof dep === "object") +/******/ for(var i = 0; i < dep.length; i++) +/******/ hot._acceptedDependencies[dep[i]] = callback; +/******/ else +/******/ hot._acceptedDependencies[dep] = callback; +/******/ }, +/******/ decline: function(dep) { +/******/ if(typeof dep === "undefined") +/******/ hot._selfDeclined = true; +/******/ else if(typeof dep === "number") +/******/ hot._declinedDependencies[dep] = true; +/******/ else +/******/ for(var i = 0; i < dep.length; i++) +/******/ hot._declinedDependencies[dep[i]] = true; +/******/ }, +/******/ dispose: function(callback) { +/******/ hot._disposeHandlers.push(callback); +/******/ }, +/******/ addDisposeHandler: function(callback) { +/******/ hot._disposeHandlers.push(callback); +/******/ }, +/******/ removeDisposeHandler: function(callback) { +/******/ var idx = hot._disposeHandlers.indexOf(callback); +/******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1); +/******/ }, +/******/ +/******/ // Management API +/******/ check: hotCheck, +/******/ apply: hotApply, +/******/ status: function(l) { +/******/ if(!l) return hotStatus; +/******/ hotStatusHandlers.push(l); +/******/ }, +/******/ addStatusHandler: function(l) { +/******/ hotStatusHandlers.push(l); +/******/ }, +/******/ removeStatusHandler: function(l) { +/******/ var idx = hotStatusHandlers.indexOf(l); +/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1); +/******/ }, +/******/ +/******/ //inherit from previous dispose call +/******/ data: hotCurrentModuleData[moduleId] +/******/ }; +/******/ return hot; +/******/ } +/******/ +/******/ var hotStatusHandlers = []; +/******/ var hotStatus = "idle"; +/******/ +/******/ function hotSetStatus(newStatus) { +/******/ hotStatus = newStatus; +/******/ for(var i = 0; i < hotStatusHandlers.length; i++) +/******/ hotStatusHandlers[i].call(null, newStatus); +/******/ } +/******/ +/******/ // while downloading +/******/ var hotWaitingFiles = 0; +/******/ var hotChunksLoading = 0; +/******/ var hotWaitingFilesMap = {}; +/******/ var hotRequestedFilesMap = {}; +/******/ var hotAvailibleFilesMap = {}; +/******/ var hotCallback; +/******/ +/******/ // The update info +/******/ var hotUpdate, hotUpdateNewHash; +/******/ +/******/ function toModuleId(id) { +/******/ var isNumber = (+id) + "" === id; +/******/ return isNumber ? +id : id; +/******/ } +/******/ +/******/ function hotCheck(apply, callback) { +/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status"); +/******/ if(typeof apply === "function") { +/******/ hotApplyOnUpdate = false; +/******/ callback = apply; +/******/ } else { +/******/ hotApplyOnUpdate = apply; +/******/ callback = callback || function(err) { +/******/ if(err) throw err; +/******/ }; +/******/ } +/******/ hotSetStatus("check"); +/******/ hotDownloadManifest(function(err, update) { +/******/ if(err) return callback(err); +/******/ if(!update) { +/******/ hotSetStatus("idle"); +/******/ callback(null, null); +/******/ return; +/******/ } +/******/ +/******/ hotRequestedFilesMap = {}; +/******/ hotAvailibleFilesMap = {}; +/******/ hotWaitingFilesMap = {}; +/******/ for(var i = 0; i < update.c.length; i++) +/******/ hotAvailibleFilesMap[update.c[i]] = true; +/******/ hotUpdateNewHash = update.h; +/******/ +/******/ hotSetStatus("prepare"); +/******/ hotCallback = callback; +/******/ hotUpdate = {}; +/******/ var chunkId = 0; +/******/ { // eslint-disable-line no-lone-blocks +/******/ /*globals chunkId */ +/******/ hotEnsureUpdateChunk(chunkId); +/******/ } +/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) { +/******/ hotUpdateDownloaded(); +/******/ } +/******/ }); +/******/ } +/******/ +/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars +/******/ if(!hotAvailibleFilesMap[chunkId] || !hotRequestedFilesMap[chunkId]) +/******/ return; +/******/ hotRequestedFilesMap[chunkId] = false; +/******/ for(var moduleId in moreModules) { +/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { +/******/ hotUpdate[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) { +/******/ hotUpdateDownloaded(); +/******/ } +/******/ } +/******/ +/******/ function hotEnsureUpdateChunk(chunkId) { +/******/ if(!hotAvailibleFilesMap[chunkId]) { +/******/ hotWaitingFilesMap[chunkId] = true; +/******/ } else { +/******/ hotRequestedFilesMap[chunkId] = true; +/******/ hotWaitingFiles++; +/******/ hotDownloadUpdateChunk(chunkId); +/******/ } +/******/ } +/******/ +/******/ function hotUpdateDownloaded() { +/******/ hotSetStatus("ready"); +/******/ var callback = hotCallback; +/******/ hotCallback = null; +/******/ if(!callback) return; +/******/ if(hotApplyOnUpdate) { +/******/ hotApply(hotApplyOnUpdate, callback); +/******/ } else { +/******/ var outdatedModules = []; +/******/ for(var id in hotUpdate) { +/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) { +/******/ outdatedModules.push(toModuleId(id)); +/******/ } +/******/ } +/******/ callback(null, outdatedModules); +/******/ } +/******/ } +/******/ +/******/ function hotApply(options, callback) { +/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status"); +/******/ if(typeof options === "function") { +/******/ callback = options; +/******/ options = {}; +/******/ } else if(options && typeof options === "object") { +/******/ callback = callback || function(err) { +/******/ if(err) throw err; +/******/ }; +/******/ } else { +/******/ options = {}; +/******/ callback = callback || function(err) { +/******/ if(err) throw err; +/******/ }; +/******/ } +/******/ +/******/ function getAffectedStuff(module) { +/******/ var outdatedModules = [module]; +/******/ var outdatedDependencies = {}; +/******/ +/******/ var queue = outdatedModules.slice(); +/******/ while(queue.length > 0) { +/******/ var moduleId = queue.pop(); +/******/ var module = installedModules[moduleId]; +/******/ if(!module || module.hot._selfAccepted) +/******/ continue; +/******/ if(module.hot._selfDeclined) { +/******/ return new Error("Aborted because of self decline: " + moduleId); +/******/ } +/******/ if(moduleId === 0) { +/******/ return; +/******/ } +/******/ for(var i = 0; i < module.parents.length; i++) { +/******/ var parentId = module.parents[i]; +/******/ var parent = installedModules[parentId]; +/******/ if(parent.hot._declinedDependencies[moduleId]) { +/******/ return new Error("Aborted because of declined dependency: " + moduleId + " in " + parentId); +/******/ } +/******/ if(outdatedModules.indexOf(parentId) >= 0) continue; +/******/ if(parent.hot._acceptedDependencies[moduleId]) { +/******/ if(!outdatedDependencies[parentId]) +/******/ outdatedDependencies[parentId] = []; +/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]); +/******/ continue; +/******/ } +/******/ delete outdatedDependencies[parentId]; +/******/ outdatedModules.push(parentId); +/******/ queue.push(parentId); +/******/ } +/******/ } +/******/ +/******/ return [outdatedModules, outdatedDependencies]; +/******/ } +/******/ +/******/ function addAllToSet(a, b) { +/******/ for(var i = 0; i < b.length; i++) { +/******/ var item = b[i]; +/******/ if(a.indexOf(item) < 0) +/******/ a.push(item); +/******/ } +/******/ } +/******/ +/******/ // at begin all updates modules are outdated +/******/ // the "outdated" status can propagate to parents if they don't accept the children +/******/ var outdatedDependencies = {}; +/******/ var outdatedModules = []; +/******/ var appliedUpdate = {}; +/******/ for(var id in hotUpdate) { +/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) { +/******/ var moduleId = toModuleId(id); +/******/ var result = getAffectedStuff(moduleId); +/******/ if(!result) { +/******/ if(options.ignoreUnaccepted) +/******/ continue; +/******/ hotSetStatus("abort"); +/******/ return callback(new Error("Aborted because " + moduleId + " is not accepted")); +/******/ } +/******/ if(result instanceof Error) { +/******/ hotSetStatus("abort"); +/******/ return callback(result); +/******/ } +/******/ appliedUpdate[moduleId] = hotUpdate[moduleId]; +/******/ addAllToSet(outdatedModules, result[0]); +/******/ for(var moduleId in result[1]) { +/******/ if(Object.prototype.hasOwnProperty.call(result[1], moduleId)) { +/******/ if(!outdatedDependencies[moduleId]) +/******/ outdatedDependencies[moduleId] = []; +/******/ addAllToSet(outdatedDependencies[moduleId], result[1][moduleId]); +/******/ } +/******/ } +/******/ } +/******/ } +/******/ +/******/ // Store self accepted outdated modules to require them later by the module system +/******/ var outdatedSelfAcceptedModules = []; +/******/ for(var i = 0; i < outdatedModules.length; i++) { +/******/ var moduleId = outdatedModules[i]; +/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted) +/******/ outdatedSelfAcceptedModules.push({ +/******/ module: moduleId, +/******/ errorHandler: installedModules[moduleId].hot._selfAccepted +/******/ }); +/******/ } +/******/ +/******/ // Now in "dispose" phase +/******/ hotSetStatus("dispose"); +/******/ var queue = outdatedModules.slice(); +/******/ while(queue.length > 0) { +/******/ var moduleId = queue.pop(); +/******/ var module = installedModules[moduleId]; +/******/ if(!module) continue; +/******/ +/******/ var data = {}; +/******/ +/******/ // Call dispose handlers +/******/ var disposeHandlers = module.hot._disposeHandlers; +/******/ for(var j = 0; j < disposeHandlers.length; j++) { +/******/ var cb = disposeHandlers[j]; +/******/ cb(data); +/******/ } +/******/ hotCurrentModuleData[moduleId] = data; +/******/ +/******/ // disable module (this disables requires from this module) +/******/ module.hot.active = false; +/******/ +/******/ // remove module from cache +/******/ delete installedModules[moduleId]; +/******/ +/******/ // remove "parents" references from all children +/******/ for(var j = 0; j < module.children.length; j++) { +/******/ var child = installedModules[module.children[j]]; +/******/ if(!child) continue; +/******/ var idx = child.parents.indexOf(moduleId); +/******/ if(idx >= 0) { +/******/ child.parents.splice(idx, 1); +/******/ } +/******/ } +/******/ } +/******/ +/******/ // remove outdated dependency from module children +/******/ for(var moduleId in outdatedDependencies) { +/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) { +/******/ var module = installedModules[moduleId]; +/******/ var moduleOutdatedDependencies = outdatedDependencies[moduleId]; +/******/ for(var j = 0; j < moduleOutdatedDependencies.length; j++) { +/******/ var dependency = moduleOutdatedDependencies[j]; +/******/ var idx = module.children.indexOf(dependency); +/******/ if(idx >= 0) module.children.splice(idx, 1); +/******/ } +/******/ } +/******/ } +/******/ +/******/ // Not in "apply" phase +/******/ hotSetStatus("apply"); +/******/ +/******/ hotCurrentHash = hotUpdateNewHash; +/******/ +/******/ // insert new code +/******/ for(var moduleId in appliedUpdate) { +/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) { +/******/ modules[moduleId] = appliedUpdate[moduleId]; +/******/ } +/******/ } +/******/ +/******/ // call accept handlers +/******/ var error = null; +/******/ for(var moduleId in outdatedDependencies) { +/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) { +/******/ var module = installedModules[moduleId]; +/******/ var moduleOutdatedDependencies = outdatedDependencies[moduleId]; +/******/ var callbacks = []; +/******/ for(var i = 0; i < moduleOutdatedDependencies.length; i++) { +/******/ var dependency = moduleOutdatedDependencies[i]; +/******/ var cb = module.hot._acceptedDependencies[dependency]; +/******/ if(callbacks.indexOf(cb) >= 0) continue; +/******/ callbacks.push(cb); +/******/ } +/******/ for(var i = 0; i < callbacks.length; i++) { +/******/ var cb = callbacks[i]; +/******/ try { +/******/ cb(outdatedDependencies); +/******/ } catch(err) { +/******/ if(!error) +/******/ error = err; +/******/ } +/******/ } +/******/ } +/******/ } +/******/ +/******/ // Load self accepted modules +/******/ for(var i = 0; i < outdatedSelfAcceptedModules.length; i++) { +/******/ var item = outdatedSelfAcceptedModules[i]; +/******/ var moduleId = item.module; +/******/ hotCurrentParents = [moduleId]; +/******/ try { +/******/ __webpack_require__(moduleId); +/******/ } catch(err) { +/******/ if(typeof item.errorHandler === "function") { +/******/ try { +/******/ item.errorHandler(err); +/******/ } catch(err) { +/******/ if(!error) +/******/ error = err; +/******/ } +/******/ } else if(!error) +/******/ error = err; +/******/ } +/******/ } +/******/ +/******/ // handle errors in accept handlers and self accepted module load +/******/ if(error) { +/******/ hotSetStatus("fail"); +/******/ return callback(error); +/******/ } +/******/ +/******/ hotSetStatus("idle"); +/******/ callback(null, outdatedModules); +/******/ } + +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false, +/******/ hot: hotCreateModule(moduleId), +/******/ parents: hotCurrentParents, +/******/ children: [] +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "http://192.168.56.102:3000/static/"; + +/******/ // __webpack_hash__ +/******/ __webpack_require__.h = function() { return hotCurrentHash; }; + +/******/ // Load entry module and return exports +/******/ return hotCreateRequire(0)(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(1); + __webpack_require__(74); + module.exports = __webpack_require__(76); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(__resourceQuery) {var url = __webpack_require__(2); + var SockJS = __webpack_require__(8); + var stripAnsi = __webpack_require__(72); + var scriptElements = document.getElementsByTagName("script"); + var scriptHost = scriptElements[scriptElements.length-1].getAttribute("src").replace(/\/[^\/]+$/, ""); + + // If this bundle is inlined, use the resource query to get the correct url. + // Else, get the url from the