Refactor many variable names, adding detailed json dump and schema

This commit is contained in:
Colin McLeod
2015-07-14 21:44:12 -07:00
parent cd48ef6f86
commit 4578dbf906
34 changed files with 560 additions and 190 deletions

View File

@@ -211,6 +211,24 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', '
}
};
/**
* Export the build to detailed JSON
*/
$scope.exportBuild = function(e) {
e.stopPropagation();
if ($scope.buildName) {
$state.go('modal.export', {
data: Serializer.toJsonBuild(
$scope.buildName,
ship,
$state.href($state.current.name, $state.params, { absolute: true }),
$scope.code || Serializer.fromShip(ship)
)
});
}
};
/**
* Permanently delete the current build and redirect/reload this controller
* with the 'factory' build of the current ship.