Compare commits

...

8 Commits
1.0.1 ... 1.0.3

Author SHA1 Message Date
Colin McLeod
3b44f5fe27 Bumping version 1.0.3 2015-07-03 15:33:47 -07:00
Colin McLeod
7332dc69ed Linting issues 2015-07-03 15:31:52 -07:00
Colin McLeod
381387c04f UI Tweaks, persist cost tab open, revert outfitting order to original 2015-07-03 15:30:49 -07:00
Colin McLeod
e0db9fdfb0 Fix scrolling on iOS 2015-07-03 12:15:35 -07:00
Colin McLeod
a8d66b22af Bumping version to 1.0.2 2015-07-02 20:43:13 -07:00
Colin McLeod
bdc1e622f9 UI Tweaks, scrolling fixes and improvements 2015-07-02 20:42:46 -07:00
Colin McLeod
ad8130ae9b Add missing class 7 & 8 internal fuel tanks 2015-07-02 19:24:52 -07:00
Colin McLeod
394a3bb9f1 Revert to ui-router-extras 0.0.13 due to bug introduced in 0.0.14 2015-07-02 10:41:24 -07:00
11 changed files with 92 additions and 75 deletions

View File

@@ -7,7 +7,7 @@
<!-- Standard headers -->
<meta name="description" content="A ship outfitting and comparison tool for Elite Dangerous">
<meta name="mobile-web-app-capable" content="yes">
<meta name="viewport" content="width = device-width, initial-scale = 1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="manifest" href="/images/logo/manifest.json">
<link rel="icon" sizes="152x152 192x192" type="image/png" href="/images/logo/192x192.png">
<link rel="shortcut icon" href="/images/logo/favicon.ico">

View File

@@ -39,7 +39,7 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', '
$scope.retroPredicate = 'netCost';
$scope.costDesc = true;
$scope.costPredicate = 'c.cost';
$scope.costTab = 'retrofit';
$scope.costTab = Persist.getCostTab() || 'costs';
if ($scope.savedCode) {
Serializer.toShip(retrofitShip, $scope.savedCode); // Populate components from last save
@@ -351,6 +351,11 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', '
$scope.retrofitTotal = total;
}
$scope.updateCostTab = function(tab) {
Persist.setCostTab(tab);
$scope.costTab = tab;
};
// Hide any open menu/slot/etc if the background is clicked
$scope.$on('close', function() {
$scope.selectedSlot = null;

View File

@@ -204,6 +204,27 @@ angular.module('app').service('Persist', ['$window', 'lodash', function($window,
return null;
};
/**
* Persist selected cost tab
* @param {number} val Discount value/amount
*/
this.setCostTab = function(tabName) {
if (this.lsEnabled) {
return localStorage.setItem('costTab', tabName);
}
};
/**
* Get the saved discount
* @return {number} val Discount value/amount
*/
this.getCostTab = function() {
if (this.lsEnabled) {
return localStorage.getItem('costTab');
}
return null;
};
/**
* Retrieve the last router state from local storage
* @param {object} state State object containing state name and params

View File

@@ -22,7 +22,10 @@
html, body {
height: 100%;
width: 100%;
text-rendering: optimizeLegibility;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
body {
@@ -40,7 +43,9 @@ div, a, li {
#main {
margin: 0;
padding: 0.5em 0;
padding: 0.5em 0.5em;
width: 100%;
box-sizing: border-box;
min-height: 90%;
clear: both;
text-align: center;

View File

@@ -84,6 +84,19 @@ header {
-webkit-overflow-scrolling: touch;
max-height: 500px;
&::-webkit-scrollbar {
width: 0.5em;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: @warning-disabled;
}
.smallTablet({
max-height: 400px;
left: 0;

View File

@@ -59,7 +59,7 @@
input {
background: none;
line-height: 1.3em;
width: 20em;
width: 15em;
font-size: 0.9em;
box-sizing: border-box;
display: inline-block;
@@ -99,6 +99,12 @@
text-overflow: ellipsis;
}
.optional-hide {
.largePhone({
display: none;
});
}
table.total {
width: 100%;
@@ -115,6 +121,7 @@ table.total {
.tabs {
width: 100%;
box-sizing: border-box;
margin-bottom: 1px;
&, th {
@@ -160,6 +167,12 @@ table.total {
.smallTablet({
width: 50%;
.axis.x {
g.tick:nth-child(2n + 1) text {
display: none;
}
}
});
.largePhone({
@@ -183,14 +196,6 @@ table.total {
&.third {
width: 33%;
.smallTablet({
.axis.x {
g.tick:nth-child(2n + 1) text {
display: none;
}
}
});
.largePhone({
width: 100% !important;
});

View File

@@ -39,6 +39,19 @@ select {
white-space: nowrap;
text-align: center;
&::-webkit-scrollbar {
width: 0.5em;
}
&::-webkit-scrollbar-track {
background-color: transparent;
border-left: 1px solid @primary;
}
&::-webkit-scrollbar-thumb {
background-color: @primary-disabled;
}
.select-group {
line-height: 1.5em;
text-align: left;

View File

@@ -244,8 +244,8 @@
<table class="tabs">
<thead>
<tr>
<th style="width:50%" ng-class="{active: costTab == 'retrofit'}" ng-click="costTab = 'retrofit'">Retrofit Costs</th>
<th style="width:50%" ng-class="{active: costTab == 'costs'}" ng-click="costTab = 'costs'">Costs</th>
<th style="width:50%" ng-class="{active: costTab == 'retrofit'}" ng-click="updateCostTab('retrofit')">Retrofit Costs</th>
<th style="width:50%" ng-class="{active: costTab == 'costs'}" ng-click="updateCostTab('costs')">Costs</th>
</tr>
</thead>
</table>
@@ -256,10 +256,8 @@
<tr class="main">
<th colspan="2" class="sortable le" ng-click="sortCost(cName)">
Component
<div class="r">
<u ng-if="discounts.ship < 1">[Ship {{fRPct(1 - discounts.ship)}} off]</u>
<u ng-if="discounts.components < 1">[Components {{fRPct(1 - discounts.components)}} off]</u>
</div>
<u class="optional-hide" ng-if="discounts.ship < 1">[Ship {{fRPct(1 - discounts.ship)}} off]</u>
<u class="optional-hide" ng-if="discounts.components < 1">[Components {{fRPct(1 - discounts.components)}} off]</u>
</th>
<th class="sortable le" ng-click="sortCost('discountedCost')">Credits</th>
</tr>
@@ -285,23 +283,20 @@
</div>
<div ng-if="costTab == 'retrofit'">
<div style="overflow-x: auto;-webkit-overflow-scrolling: touch;">
<div class="scroll-x">
<table style="width:100%">
<thead>
<tr class="main">
<th colspan="2" class="sortable le" ng-click="sortRetrofit('sellName')">Sell</th>
<th colspan="2" class="sortable le" ng-click="sortRetrofit('buyName')">Buy</th>
<th class="sortable le" ng-click="sortRetrofit('netCost')">
Net Cost
<div class="r">
<u ng-if="discounts.components < 1">[{{fRPct(1 - discounts.components)}} off]</u>
</div>
Net Cost <u class="optional-hide" ng-if="discounts.components < 1">[{{fRPct(1 - discounts.components)}} off]</u>
</th>
</tr>
</thead>
<tbody>
<tr ng-if="!retrofitList || retrofitList.length == 0">
<td colspan="5">No Retrofitting changes</td>
<td colspan="5" style="padding: 3em 0;">No Retrofitting changes</td>
</tr>
<tr class="highlight" ng-repeat="item in retrofitList | orderBy:retroPredicate:retroDesc">
<td style="width:1em;">{{item.sellClassRating}}</td>
@@ -319,7 +314,7 @@
<td colspan="2" ng-class="retrofitTotal > 0 ? 'warning' : 'secondary-disabled'">{{fCrd(retrofitTotal)}} <u>CR</u></td>
</tr>
<tr class="ri">
<td class="lbl">Retrofitting from</td>
<td class="lbl">Retrofit from</td>
<td class="cen" style="border-right:none;width: 1em;"><u class="primary-disabled">&#9662;</u></td>
<td style="border-left:none;padding:0;">
<select style="width: 100%;padding: 0" ng-model="$parent.retrofitBuild" ng-change="setRetrofitBase()" ng-options="name as name for (name, build) in allBuilds[ship.id]">

View File

@@ -21,7 +21,7 @@
"dependencies": {
"d3": "~3.5.5",
"ng-lodash": "~0.2.0",
"ui-router-extras": "~0.0.13",
"ui-router-extras": "0.0.13",
"angular-ui-router": "^0.2.15",
"d3-tip": "~0.6.7",
"ng-sortable": "~1.2.1",

View File

@@ -1,52 +1,12 @@
{
"Fuel Tank": [
{
"id": "f1",
"grp": "ft",
"class": 1,
"rating": "C",
"cost": 1000,
"capacity": 2
},
{
"id": "f2",
"grp": "ft",
"class": 2,
"rating": "C",
"cost": 3750,
"capacity": 4
},
{
"id": "f3",
"grp": "ft",
"class": 3,
"rating": "C",
"cost": 7063,
"capacity": 8
},
{
"id": "f4",
"grp": "ft",
"class": 4,
"rating": "C",
"cost": 24734,
"capacity": 16
},
{
"id": "f5",
"grp": "ft",
"class": 5,
"rating": "C",
"cost": 97754,
"capacity": 32
},
{
"id": "f6",
"grp": "ft",
"class": 6,
"rating": "C",
"cost": 341577,
"capacity": 64
}
{ "id": "f1", "grp": "ft", "class": 1, "rating": "C", "cost": 1000, "capacity": 2 },
{ "id": "f2", "grp": "ft", "class": 2, "rating": "C", "cost": 3750, "capacity": 4 },
{ "id": "f3", "grp": "ft", "class": 3, "rating": "C", "cost": 7063, "capacity": 8 },
{ "id": "f4", "grp": "ft", "class": 4, "rating": "C", "cost": 24734, "capacity": 16 },
{ "id": "f5", "grp": "ft", "class": 5, "rating": "C", "cost": 97754, "capacity": 32 },
{ "id": "f6", "grp": "ft", "class": 6, "rating": "C", "cost": 341577, "capacity": 64 },
{ "id": "f7", "grp": "ft", "class": 7, "rating": "C", "cost": 1780900, "capacity": 128 },
{ "id": "f8", "grp": "ft", "class": 8, "rating": "C", "cost": 5428400, "capacity": 256 }
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "coriolis_shipyard",
"version": "1.0.1",
"version": "1.0.3",
"repository": {
"type": "git",
"url": "https://github.com/cmmcleod/coriolis"