mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b44f5fe27 | ||
|
|
7332dc69ed | ||
|
|
381387c04f | ||
|
|
e0db9fdfb0 |
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -25,6 +25,7 @@ html, body {
|
||||
width: 100%;
|
||||
text-rendering: optimizeLegibility;
|
||||
overflow-x: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
@@ -76,26 +76,6 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="hardpoints" class="group">
|
||||
<h1>HardPoints</h1>
|
||||
<div class="slot" ng-repeat="h in ship.hardpoints | filter:{maxClass: '!0'}" ng-click="selectSlot($event, h)" context-menu="select('h', h, $event, 'empty')" ng-class="{selected: selectedSlot==h}">
|
||||
<div slot-hardpoint class="details" hp="h" size="HPC[h.maxClass]" lbl="GMAP[h.c.grp]"></div>
|
||||
<div class="select" ng-class="{hardpoint: h.maxClass > 0}" ng-if="selectedSlot==h" ng-click="select('h',h,$event)">
|
||||
<div component-select s="h" groups="availCS.getHps(h.maxClass)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="utility" class="group">
|
||||
<h1>Utility Mounts</h1>
|
||||
<div class="slot" ng-repeat="h in ship.hardpoints | filter:{maxClass: '0'}" ng-click="selectSlot($event, h)" context-menu="select('h', h, $event, 'empty')" ng-class="{selected: selectedSlot==h}">
|
||||
<div slot-hardpoint class="details" hp="h" size="HPC[h.maxClass]" lbl="GMAP[h.c.grp]"></div>
|
||||
<div class="select" ng-class="{hardpoint: h.maxClass > 0}" ng-if="selectedSlot==h" ng-click="select('h',h,$event)">
|
||||
<div component-select s="h" groups="availCS.getHps(h.maxClass)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="standard" class="group">
|
||||
<h1>Standard</h1>
|
||||
<div class="slot" ng-click="selectSlot($event, ship.bulkheads)" ng-class="{selected: selectedSlot==ship.bulkheads}">
|
||||
@@ -200,6 +180,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="hardpoints" class="group">
|
||||
<h1>HardPoints</h1>
|
||||
<div class="slot" ng-repeat="h in ship.hardpoints | filter:{maxClass: '!0'}" ng-click="selectSlot($event, h)" context-menu="select('h', h, $event, 'empty')" ng-class="{selected: selectedSlot==h}">
|
||||
<div slot-hardpoint class="details" hp="h" size="HPC[h.maxClass]" lbl="GMAP[h.c.grp]"></div>
|
||||
<div class="select" ng-class="{hardpoint: h.maxClass > 0}" ng-if="selectedSlot==h" ng-click="select('h',h,$event)">
|
||||
<div component-select s="h" groups="availCS.getHps(h.maxClass)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="utility" class="group">
|
||||
<h1>Utility Mounts</h1>
|
||||
<div class="slot" ng-repeat="h in ship.hardpoints | filter:{maxClass: '0'}" ng-click="selectSlot($event, h)" context-menu="select('h', h, $event, 'empty')" ng-class="{selected: selectedSlot==h}">
|
||||
<div slot-hardpoint class="details" hp="h" size="HPC[h.maxClass]" lbl="GMAP[h.c.grp]"></div>
|
||||
<div class="select" ng-class="{hardpoint: h.maxClass > 0}" ng-if="selectedSlot==h" ng-click="select('h',h,$event)">
|
||||
<div component-select s="h" groups="availCS.getHps(h.maxClass)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group half" id="componentPriority">
|
||||
<table style="width:100%">
|
||||
<thead>
|
||||
@@ -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>
|
||||
@@ -296,7 +296,7 @@
|
||||
</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>
|
||||
@@ -314,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">▾</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]">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "coriolis_shipyard",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/cmmcleod/coriolis"
|
||||
|
||||
Reference in New Issue
Block a user