Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

details

  • Loading branch information...
commit ebd02445531ed182f3085b875a73408dc4532a22 1 parent 7ae29b4
@fguillen authored
View
2  client/app/Fleet.js
@@ -5,7 +5,7 @@ $(function(){
initialize: function(){
this.ships = new App.Ships();
- var destination = App.Game.planets.get( this.get( "destination_id" ) )
+ var destination = App.Game.planets.get( this.get( "target_id" ) )
destination.enemyFleets.add( this );
},
});
View
4 client/app/FleetView.js
@@ -7,7 +7,7 @@ $(function(){
},
events: {
- "click": "openPlanetInfo"
+ "click #see-details": "openPlanetInfo"
},
initialize: function(opts){
@@ -24,7 +24,7 @@ $(function(){
},
openPlanetInfo: function(){
- App.Navigator.navigate( "planet/" + this.fleet.get( "destination_id" ), {trigger: true} );
+ App.Navigator.navigate( "planet/" + this.fleet.get( "target_id" ), {trigger: true} );
},
render: function(){
View
24 client/app/Universe.js
@@ -48,29 +48,5 @@ $(function(){
fleetBuilderView.render();
fleetBuilderView.show();
},
-
- sendFleetToPlanet: function( planetDestination ){
- var planetOrigin = this.planets.creating_fleet()[0];
- var planetDestination = planetDestination;
- var ships = planetOrigin.ships.selected();
-
- planetOrigin.ships.remove( ships );
-
- var ship_ids =
- ships.map(function( ship, index ) {
- ship.set( "selected", false );
- return ship.get( "id" )
- });
-
- this.fleets.create({
- base_id: planetOrigin.id,
- destination_id: planetDestination.id,
- ship_ids: ship_ids
- },
- { wait: true }
- );
-
- planetOrigin.set( "creating_fleet", false );
- },
})
});
View
10 client/csss/planets.css
@@ -297,9 +297,8 @@ line-height: 10px;
}
.fleet.card #planets .planet #icon {
- font-size: 60px;
- line-height: 36px;
- text-shadow: 2px 2px 4px #111;
+ font-size: 16px;
+ text-shadow: -2px -2px 10px #AAA;
}
.fleet.card #planets .planet > h1 {
@@ -318,6 +317,7 @@ line-height: 10px;
.fleet.card #status h1 {
font-size: 35px;
+ line-height: 16px;
}
.fleet.card #status #travel {
@@ -464,9 +464,6 @@ border-bottom:1px solid #ccc;
border-right-color: white;
}
-#fleet-builder-wrapper > .folder {
- /*width: 800px;*/
-}
#fleet-builder-wrapper > .folder > .content {
float: left;
@@ -490,7 +487,6 @@ border-bottom:1px solid #ccc;
}
#fleet-builder-wrapper > .folder {
- margin: 0 auto;
}
#fleet-builder-wrapper #admin-folder {
View
4 client/data.js
@@ -76,7 +76,7 @@ var data = {
"id": "1",
"name": "F001",
"origin_id": "1",
- "destination_id": "3",
+ "target_id": "3",
"percent": "23",
"shipsData": [
{
@@ -98,7 +98,7 @@ var data = {
"id": "2",
"name": "F002",
"origin_id": "2",
- "destination_id": "3",
+ "target_id": "3",
"percent": "30",
"shipsData": [
{
View
49 client/index.html
@@ -144,10 +144,11 @@
<ul></ul>
</div> <!-- infox -->
+ <div id="fleet-builder-wrapper"></div>
+
</div> <!-- wrapper -->
- <div id="fleet-builder-wrapper">
- </div>
+
</body>
<!-- TEMPLATES -->
@@ -232,26 +233,38 @@
<script type="text/template" id="fleet">
<div id="<%= id %>" class="fleet card horizontal <%= traveling_class %>">
- <div id="planets">
- <div id="origin" class="planet">
- <div id="icon">planet</div>
- <h1><%= base_id %></h1>
+ <div class="content">
+ <div id="planets">
+ <div id="origin" class="planet">
+ <div id="icon">planet</div>
+ <h1><%= base_id %></h1>
+ </div>
+
+ <div id="destination" class="planet">
+ <div id="icon">planet</div>
+ <h1><%= target_id %></h1>
+ </div>
</div>
- <div id="destination" class="planet">
- <div id="icon">planet</div>
- <h1><%= destination_id %></h1>
+ <div id="status" class="sash right">
+ <h1><%= units_count %></h1>
+ <div id="travel" class="percent-bar">
+ <div class="percent-value" style="width:<%= travel_percent %>%" />
+ </div>
+ <div id="combat">
+ combat
+ </div>
</div>
</div>
- <div id="status" class="sash right">
- <h1><%= units_count %></h1>
- <div id="travel" class="percent-bar">
- <div class="percent-value" style="width:<%= travel_percent %>%" />
- </div>
- <div id="combat">
- combat
- </div>
+ <div class="admin">
+ <div class="admin-option">
+ fleet <strong><%= id %></strong><br />
+ is traveling from planet <strong><%= base_id %></strong><br />
+ to planet <strong><%= target_id %></strong><br />
+ with a navy of <strong><%= units_count %></strong> ships<br />
+ <a href="#" id="see-details" onclick="return false;" class="pay-button">see more details</a>
+ </div>
</div>
</div>
</script>
@@ -460,7 +473,7 @@
<h1>
<%= id %>
<div id="travel">
- fleet is traveling to planet <strong><%= destination_id %></strong>
+ fleet is traveling to planet <strong><%= target_id %></strong>
<div class="percent-bar">
<div class="percent-value" style="width:<%= travel_percent %>%" />
</div>
View
4 client/libs/data.js
@@ -76,7 +76,7 @@ var data = {
"id": "1",
"name": "F001",
"origin_id": "1",
- "destination_id": "3",
+ "target_id": "3",
"percent": "23",
"shipsData": [
{
@@ -98,7 +98,7 @@ var data = {
"id": "2",
"name": "F002",
"origin_id": "2",
- "destination_id": "3",
+ "target_id": "3",
"percent": "30",
"shipsData": [
{
View
4 gem/lib/s2c/jsoner.rb
@@ -103,7 +103,7 @@ def self.fleet_to_hash( fleet )
{
"id" => fleet.id,
"base_id" => fleet.base_id,
- "destination_id" => fleet.target_id,
+ "target_id" => fleet.target_id,
"job" => job_to_hash( fleet.job )
}
end
@@ -123,7 +123,7 @@ def self.job_travel_to_hash( job )
"name" => job.name,
"ticks_total" => job.ticks_total,
"ticks_remain" => job.ticks_remain,
- "destination_id" => job.target_id
+ "target_id" => job.target_id
}
end
View
4 gem/test/fixtures/universe.json
@@ -88,12 +88,12 @@
{
"id": 16,
"base_id": 1,
- "destination_id": 2,
+ "target_id": 2,
"job": {
"name": "travel",
"ticks_total": 1,
"ticks_remain": 1,
- "destination_id": 2
+ "target_id": 2
}
}
],
Please sign in to comment.
Something went wrong with that request. Please try again.