Skip to content

Commit

Permalink
Working voting system - bug - removes the player from the stats box
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraganya committed Nov 20, 2016
1 parent 23909b1 commit 7033efd
Show file tree
Hide file tree
Showing 20 changed files with 1,166 additions and 167 deletions.
8 changes: 5 additions & 3 deletions Game.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
$Asset->file(APIPATH."Helpers.php");
$Asset->file(APIPATH."Screen.php");


/**
* Extract URI parts
*/
/*-----------------------------------------------------------------------------
| Get Controller and action
-----------------------------------------------------------------------------*/
$controller=(isset($_GET['controller'])) ? ucfirst($_GET['controller']) : 'Setup';
$method=(isset($_GET['method'])) ? $_GET['method'] : 'index';
$controller=(isset($_GET['controller']) && !empty($_GET['controller'])) ? ucfirst($_GET['controller']) : 'Setup';
$method=(isset($_GET['method']) && !empty($_GET['method'])) ? $_GET['method'] : 'index';

/*-----------------------------------------------------------------------------
| Validate the route
Expand Down
3 changes: 3 additions & 0 deletions Game/Assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ ul.contestant-bar li.active {
.validation-error {
border-color: red;
}
.focused {
border-color: orange;
}
.loader {
border: 16px solid #E3F2FD;
border-radius: 50%;
Expand Down
4 changes: 3 additions & 1 deletion Game/Assets/css/custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ ul.contestant-bar li.active
border-color:red;

}

.focused{
border-color:orange;
}
.loader {
border: 16px solid @base-bg;
border-radius: 50%;
Expand Down
171 changes: 138 additions & 33 deletions Game/Assets/js/Components/AdminWidgets.js

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions Game/Assets/js/Components/contributions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var SuggestBox=React.createClass({displayName: "SuggestBox",
getInitialState:function()
{
return {status:'not-suggesting',statusMsg:"Hi! How would you like to contribute ?",
formErr:false,err:"Sorry something went wrong.Try again"};
formErr:false,err:"Sorry something went wrong.Try again",done:false};
},
validateInputs:function(tag){
var qInputs=$(tag);
Expand Down Expand Up @@ -92,7 +92,9 @@ var SuggestBox=React.createClass({displayName: "SuggestBox",

promiseToAddQ.then(function(fromResolve){
if(fromResolve){
this.setState({status:'not-suggesting'});
this.refs.qBox.value="";
this.refs.aBox.value="";
this.setState({done:true});
}
}.bind(this))

Expand Down Expand Up @@ -137,7 +139,7 @@ var SuggestBox=React.createClass({displayName: "SuggestBox",
),

React.createElement("button", {type: "button", className: "btn wk-btn", onClick: this.sendQuestionSuggestion}, "Suggest"),
React.createElement("button", {type: "button", className: "btn wk-btn marg-1", onClick: this.abort}, "Cancel")
React.createElement("button", {type: "button", id: "doneBtn", className: "btn wk-btn marg-1", onClick: this.abort}, (this.state.done)?"done":"cancel")
)
);
},
Expand Down
2 changes: 1 addition & 1 deletion Game/Assets/js/Components/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ var AcknowledgementList=React.createClass({displayName: "AcknowledgementList",
return(
React.createElement("div", null,
this.state.projects.map(function(library,index){
return React.createElement("a", {target: "_blank", href: 'http:://'+library.website, key: index, className: "list-group-item"}, library.project)
return React.createElement("a", {target: "_blank", href: 'http://'+library.website, key: index, className: "list-group-item"}, library.project)
})
)
)
Expand Down
Loading

0 comments on commit 7033efd

Please sign in to comment.