Total range, priority management, other tweaks

This commit is contained in:
Colin McLeod
2015-06-10 00:17:55 -07:00
parent 4fb1ad11ca
commit 1367418fb2
7 changed files with 543 additions and 219 deletions

View File

@@ -1,5 +1,5 @@
angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'ui.sortable', 'shipyard', 'ngLodash', 'app.templates'])
.run(['$rootScope', '$location', '$window', '$document','$state','commonArray','shipPurpose','shipSize','hardPointClass','internalGroupMap','hardpointsGroupMap', 'Persist', function ($rootScope, $location, $window, $doc, $state, CArr, shipPurpose, sz, hpc, igMap, hgMap, Persist) {
.run(['$rootScope', '$location', '$window', '$document','$state','commonArray','shipPurpose','shipSize','hardPointClass','GroupMap', 'Persist', function ($rootScope, $location, $window, $doc, $state, CArr, shipPurpose, sz, hpc, GroupMap, Persist) {
// App is running as a standalone web app on tablet/mobile
var isStandAlone = $window.navigator.standalone || ($window.external && $window.external.msIsSiteMode && $window.external.msIsSiteMode());
@@ -31,10 +31,15 @@ angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'ui.sortable',
$rootScope.SP = shipPurpose;
$rootScope.SZ = sz;
$rootScope.HPC = hpc;
$rootScope.igMap = igMap;
$rootScope.hgMap = hgMap;
$rootScope.GMAP = GroupMap;
$rootScope.STATUS = ['','DISABLED', 'OFF', 'ON'];
$rootScope.STATUS_CLASS = ['','disabled', 'warning', 'secondary-disabled'];
$rootScope.title = 'Coriolis';
$rootScope.cName = function (c) {
return c.c? c.c.name? c.c.name : GroupMap[c.c.grp] : null;
}
// Formatters
$rootScope.fCrd = d3.format(',.0f');
$rootScope.fPwr = d3.format(',.2f');