UI Tweaks, persist cost tab open, revert outfitting order to original

This commit is contained in:
Colin McLeod
2015-07-03 15:30:49 -07:00
parent e0db9fdfb0
commit 381387c04f
3 changed files with 50 additions and 24 deletions

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;