Skip to content

Commit

Permalink
Updated buttons in all forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Regan committed Dec 14, 2014
1 parent f9421b1 commit 778bf1d
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 52 deletions.
2 changes: 1 addition & 1 deletion app/views/game_create.blade.php
Expand Up @@ -56,7 +56,7 @@
</tr>
<tr>
<td></td>
<td>{{ Form::button('Reset', array('id'=>'resetSettingsButton', 'onClick' => '$(reset);')) }} {{ Form::submit('Create') }}</td>
<td>{{ Form::button('Reset', array('class' => 'btn btn-default', 'id'=>'resetSettingsButton', 'onClick' => '$(reset);')) }} {{ Form::submit('Create', array('class' => 'btn btn-default')) }}</td>
</tr>
</table>
{{ Form::close() }}
Expand Down
4 changes: 2 additions & 2 deletions app/views/game_edit.blade.php
Expand Up @@ -202,10 +202,10 @@ function prepFen ( aFen ) {
</tr>
<tr>
<td>
{{ Form::button('Reset Position', array('id'=>'startPositionBtn', 'onClick' => '$(init);')) }}
{{ Form::button('Reset Position', array('class' => 'btn btn-default', 'id'=>'startPositionBtn', 'onClick' => '$(init);')) }}
</td>
<td>
{{ Form::submit('Submit Move', array('id'=>'submitBtn')) }}
{{ Form::submit('Submit Move', array('class' => 'btn btn-default', 'id'=>'submitBtn')) }}
</td>
<td></td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions app/views/game_index.blade.php
Expand Up @@ -13,7 +13,7 @@
<h2>Your Games</h2>

{{ Form::open(array('url'=>'/game/create', 'method'=>'GET')) }}
{{ Form::submit('New Game') }}
{{ Form::submit('New Game', array('class' => 'btn btn-default')) }}
{{ Form::close() }}

<table class="table">
Expand All @@ -32,12 +32,12 @@
</td>
<td>
{{ Form::open(array('url'=>'/game/'.$game->id.'/edit', 'method' => 'GET')) }}
{{ Form::submit('Play') }}
{{ Form::submit('Play', array('class' => 'btn btn-default')) }}
{{ Form::close() }}
</td>
<td>
{{ Form::open(array('url'=>'/game/'.$game->id, 'method' => 'DELETE')) }}
{{ Form::submit('Delete') }}
{{ Form::submit('Delete', array('class' => 'btn btn-default')) }}
{{ Form::close() }}
</td>
</tr>
Expand Down
34 changes: 1 addition & 33 deletions app/views/game_show.blade.php
Expand Up @@ -9,39 +9,7 @@
@stop

@section('body')
<script>
var init = function() {

//--- start example JS ---
// establish a board
var board;
// establish an engine
var game = new Chess();
// instantiate the new board
board = new ChessBoard('board', '{{$game->fen}}');
}; // end init()
// kick off the game
$(document).ready(init);
</script>

<!-- container for the board; id is arbitrary -->

<h2>Game Show</h2>
<table class="table">
<tr>
<td>
<div id="board" style="width: 200px"></div>
</td>
<td>
Insert button for reset
</td>
<td>
Insert button for submit
</td>
</tr>
</table>
<p>If you are seeing this, then something went wrong elsewhere.</p>

@stop
2 changes: 1 addition & 1 deletion app/views/position_create.blade.php
Expand Up @@ -77,7 +77,7 @@

</td>
<td>
{{ Form::button('Reset Position', array('id'=>'startPositionBtn', 'onClick' => '$(init);')) }} {{ Form::submit('Create') }}
{{ Form::button('Reset Position', array('class' => 'btn btn-default', 'id'=>'startPositionBtn', 'onClick' => '$(init);')) }} {{ Form::submit('Create', array('class' => 'btn btn-default')) }}
</td>
</tr>
</table>
Expand Down
4 changes: 2 additions & 2 deletions app/views/position_edit.blade.php
Expand Up @@ -37,6 +37,7 @@
</script>

{{ Form::open(array('url'=>'/position/'.$position->id, 'method'=>'PUT')) }}
{{ Form::hidden('fen', $position->fen, array('id' => 'fen')) }}
<table class="table">
<tr>
<td>
Expand All @@ -60,7 +61,6 @@
<tr>
<td>
{{ Form::label('name', 'Name of position') }}
{{ Form::hidden('fen', $position->fen, array('id' => 'fen')) }}
</td>
<td>
{{ Form::text('name', $position->name) }}
Expand All @@ -80,7 +80,7 @@

</td>
<td>
{{ Form::button('Reset Position', array('id'=>'startPositionBtn', 'onClick' => '$(init);')) }} {{ Form::submit('Update') }}
{{ Form::button('Reset Position', array('class' => 'btn btn-default', 'id'=>'startPositionBtn', 'onClick' => '$(init);')) }} {{ Form::submit('Update', array('class' => 'btn btn-default')) }}
</td>
</tr>
</table>
Expand Down
6 changes: 3 additions & 3 deletions app/views/position_show.blade.php
Expand Up @@ -51,17 +51,17 @@
<tr>
<td>
{{ Form::open(array('url'=>'/position', 'method' => 'GET')) }}
{{ Form::submit('Play') }}
{{ Form::submit('Play', array('class' => 'btn btn-default')) }}
{{ Form::close() }}
</td>
<td>
{{ Form::open(array('url'=>'/position/'.$position->id.'/edit', 'method' => 'GET')) }}
{{ Form::submit('Edit') }}
{{ Form::submit('Edit', array('class' => 'btn btn-default')) }}
{{ Form::close() }}
</td>
<td>
{{ Form::open(array('url'=>'/position/'.$position->id, 'method' => 'DELETE')) }}
{{ Form::submit('Delete') }}
{{ Form::submit('Delete', array('class' => 'btn btn-default')) }}
{{ Form::close() }}
</td>
<td></td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/user_create.blade.php
Expand Up @@ -40,7 +40,7 @@
<td>
</td>
<td>
{{ Form::submit('Create') }}
{{ Form::submit('Create', array('class' => 'btn btn-default')) }}
</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion app/views/user_edit.blade.php
Expand Up @@ -47,7 +47,7 @@
<td>
</td>
<td>
{{ Form::submit('Update') }}
{{ Form::submit('Update', array('class' => 'btn btn-default')) }}
</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion app/views/user_login.blade.php
Expand Up @@ -16,7 +16,7 @@
{{ Form::label('password') }}
{{ Form::password('password') }}

{{ Form::submit('Submit') }}
{{ Form::submit('Submit', array('class' => 'btn btn-default')) }}

{{ Form::close() }}

Expand Down
4 changes: 2 additions & 2 deletions app/views/user_show.blade.php
Expand Up @@ -33,10 +33,10 @@
<td>
<p>
{{ Form::open(array('url'=>'/user/'.$user->id.'/edit/', 'method'=>'GET')) }}
{{ Form::submit('Edit') }}
{{ Form::submit('Edit', array('class' => 'btn btn-default')) }}
{{ Form::close() }}
{{ Form::open(array('url'=>'/user/'.$user->id, 'method'=>'DELETE')) }}
{{ Form::submit('Delete') }}
{{ Form::submit('Delete', array('class' => 'btn btn-default')) }}
{{ Form::close() }}
</p>
</td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/user_signup.blade.php
Expand Up @@ -28,7 +28,7 @@
{{ Form::password('password') }}
<small>Min 6 characters</small>

{{ Form::submit('Submit') }}
{{ Form::submit('Submit', array('class' => 'btn btn-default')) }}

{{ Form::close() }}
</p>
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Expand Up @@ -297,6 +297,7 @@
* 14\_12\_14\_05\_02\_000: Fixed bug preventing board from being found in DOM which prevented game state lifecycle to complete
* 14\_12\_14\_05\_02\_000: Added game delete
* 14\_12\_14\_05\_03\_000: Updated buttons in position index
* 14\_12\_14\_05\_04\_000: Updated buttons in all forms


cd /Applications/MAMP/htdocs/CSCI15P4; git add --all; git commit -m "Updated buttons in position index"; git push origin master
cd /Applications/MAMP/htdocs/CSCI15P4; git add --all; git commit -m "Updated buttons in all forms"; git push origin master

0 comments on commit 778bf1d

Please sign in to comment.