mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 15:15:34 +00:00
chmod all files, rsync for deploy, cdn support, build page borked
This commit is contained in:
0
app/js/app.js
Normal file → Executable file
0
app/js/app.js
Normal file → Executable file
0
app/js/config.js
Normal file → Executable file
0
app/js/config.js
Normal file → Executable file
19
app/js/controllers/controller-comparison.js
Normal file → Executable file
19
app/js/controllers/controller-comparison.js
Normal file → Executable file
@@ -18,7 +18,7 @@ angular.module('app').controller('ComparisonController', ['lodash', '$rootScope'
|
||||
*/
|
||||
$scope.addBuild = function (shipId, buildName, code) {
|
||||
var data = Ships[shipId]; // Get ship properties
|
||||
var code = code? code : Persist.builds[shipId][buildName]; // Retrieve build code if not passed
|
||||
code = code? code : Persist.builds[shipId][buildName]; // Retrieve build code if not passed
|
||||
var b = new Ship(shipId, data.properties, data.slots); // Create a new Ship instance
|
||||
Serializer.toShip(b, code); // Populate components from code
|
||||
// Extend ship instance and add properties below
|
||||
@@ -153,7 +153,7 @@ angular.module('app').controller('ComparisonController', ['lodash', '$rootScope'
|
||||
$scope.desc
|
||||
);
|
||||
return $state.href('comparison', {code: code}, {absolute:true});
|
||||
};
|
||||
}
|
||||
|
||||
/* Event listeners */
|
||||
$scope.$on('close', function() {
|
||||
@@ -161,20 +161,21 @@ angular.module('app').controller('ComparisonController', ['lodash', '$rootScope'
|
||||
});
|
||||
|
||||
/* Initialization */
|
||||
var shipId, buildName, comparisonData;
|
||||
if ($scope.compareMode) {
|
||||
if ($scope.name == 'all') {
|
||||
for (var shipId in Persist.builds) {
|
||||
for (var buildName in Persist.builds[shipId]) {
|
||||
for (shipId in Persist.builds) {
|
||||
for (buildName in Persist.builds[shipId]) {
|
||||
$scope.addBuild(shipId, buildName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (var shipId in Persist.builds) {
|
||||
for (var buildName in Persist.builds[shipId]) {
|
||||
for (shipId in Persist.builds) {
|
||||
for (buildName in Persist.builds[shipId]) {
|
||||
$scope.unusedBuilds.push({id: shipId, buildName: buildName, name: Ships[shipId].properties.name});
|
||||
}
|
||||
}
|
||||
var comparisonData = Persist.getComparison($scope.name);
|
||||
comparisonData = Persist.getComparison($scope.name);
|
||||
if (comparisonData) {
|
||||
defaultFacets = comparisonData.facets;
|
||||
comparisonData.builds.forEach(function (b) {
|
||||
@@ -185,9 +186,9 @@ angular.module('app').controller('ComparisonController', ['lodash', '$rootScope'
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
var comparisonData = Serializer.toComparison($stateParams.code);
|
||||
comparisonData = Serializer.toComparison($stateParams.code);
|
||||
defaultFacets = comparisonData.f;
|
||||
$scope.name = comparisonData.n
|
||||
$scope.name = comparisonData.n;
|
||||
$scope.predicate = comparisonData.p;
|
||||
$scope.desc = comparisonData.d;
|
||||
comparisonData.b.forEach(function (build) {
|
||||
|
||||
0
app/js/controllers/controller-delete.js
Normal file → Executable file
0
app/js/controllers/controller-delete.js
Normal file → Executable file
0
app/js/controllers/controller-error.js
Normal file → Executable file
0
app/js/controllers/controller-error.js
Normal file → Executable file
0
app/js/controllers/controller-export.js
Normal file → Executable file
0
app/js/controllers/controller-export.js
Normal file → Executable file
0
app/js/controllers/controller-import.js
Normal file → Executable file
0
app/js/controllers/controller-import.js
Normal file → Executable file
0
app/js/controllers/controller-link.js
Normal file → Executable file
0
app/js/controllers/controller-link.js
Normal file → Executable file
0
app/js/controllers/controller-modal.js
Normal file → Executable file
0
app/js/controllers/controller-modal.js
Normal file → Executable file
0
app/js/controllers/controller-outfit.js
Normal file → Executable file
0
app/js/controllers/controller-outfit.js
Normal file → Executable file
0
app/js/controllers/controller-shipyard.js
Normal file → Executable file
0
app/js/controllers/controller-shipyard.js
Normal file → Executable file
0
app/js/directives/directive-area-chart.js
Normal file → Executable file
0
app/js/directives/directive-area-chart.js
Normal file → Executable file
4
app/js/directives/directive-bar-chart.js
Normal file → Executable file
4
app/js/directives/directive-bar-chart.js
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
angular.module('app').directive('barChart', ['$rootScope', function ($rootScope) {
|
||||
angular.module('app').directive('barChart', function () {
|
||||
|
||||
function bName (build) {
|
||||
return build.buildName + '\n' + build.name;
|
||||
@@ -118,4 +118,4 @@ angular.module('app').directive('barChart', ['$rootScope', function ($rootScope)
|
||||
|
||||
}
|
||||
};
|
||||
}]);
|
||||
});
|
||||
0
app/js/directives/directive-comparison-table.js
Normal file → Executable file
0
app/js/directives/directive-comparison-table.js
Normal file → Executable file
0
app/js/directives/directive-component-select.js
Normal file → Executable file
0
app/js/directives/directive-component-select.js
Normal file → Executable file
0
app/js/directives/directive-header.js
Normal file → Executable file
0
app/js/directives/directive-header.js
Normal file → Executable file
0
app/js/directives/directive-slot-hardpoint.js
Normal file → Executable file
0
app/js/directives/directive-slot-hardpoint.js
Normal file → Executable file
0
app/js/directives/directive-slot-internal.js
Normal file → Executable file
0
app/js/directives/directive-slot-internal.js
Normal file → Executable file
14
app/js/factory-utils.js
Normal file → Executable file
14
app/js/factory-utils.js
Normal file → Executable file
@@ -12,12 +12,12 @@ angular.module('app').factory('Utils', ['$state','$http', function ($state, $htt
|
||||
}
|
||||
|
||||
function comparisonBBCode(facets, builds, link) {
|
||||
var colCount = 2, i,j,k, l = [];
|
||||
var colCount = 2, b, i, j, k, f, fl, p, pl, l = [];
|
||||
|
||||
for (i = 0; i < facets.length; i++) {
|
||||
if (facets[i].active) {
|
||||
var f = facets[i];
|
||||
var p = f.props;
|
||||
f = facets[i];
|
||||
p = f.props;
|
||||
|
||||
if (p.length == 1) {
|
||||
l.push('[th][B][COLOR=#FF8C0D]', f.title, '[/COLOR][/B][/th]');
|
||||
@@ -33,15 +33,15 @@ angular.module('app').factory('Utils', ['$state','$http', function ($state, $htt
|
||||
l.push('[/tr]\n');
|
||||
|
||||
for (i = 0; i < builds.length; i++) {
|
||||
var b = builds[i];
|
||||
b = builds[i];
|
||||
//var href = $state.href('outfit',{shipId: b.id, code: b.code, bn: b.buildName}, {absolute: true});
|
||||
l.push('[tr][td]', b.name,'[/td][td]', b.buildName ,'[/td]');
|
||||
|
||||
for (j = 0, fl = facets.length; j < fl; j++) {
|
||||
if (facets[j].active) {
|
||||
var f = facets[j];
|
||||
var p = f.props;
|
||||
for (var k = 0, pl = p.length; k < pl; k++) {
|
||||
f = facets[j];
|
||||
p = f.props;
|
||||
for (k = 0, pl = p.length; k < pl; k++) {
|
||||
l.push('[td="align: right"]', f.fmt(b[p[k]]), ' [size=-2]', f.unit, '[/size][/td]');
|
||||
}
|
||||
}
|
||||
|
||||
8
app/js/service-persist.js
Normal file → Executable file
8
app/js/service-persist.js
Normal file → Executable file
@@ -90,10 +90,10 @@ angular.module('app').service('Persist', ['$window','lodash', function ($window,
|
||||
this.comparisons[name] = {
|
||||
facets: facets,
|
||||
builds: _.map(builds, function (b) { return {shipId: b.id, buildName: b.buildName }; })
|
||||
}
|
||||
};
|
||||
localStorage.setItem(LS_KEY_COMPARISONS, angular.toJson(this.comparisons));
|
||||
this.state.hasComparisons = true;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* [getComparison description]
|
||||
@@ -105,7 +105,7 @@ angular.module('app').service('Persist', ['$window','lodash', function ($window,
|
||||
return this.comparisons[name];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes the comparison from localstorage.
|
||||
@@ -117,7 +117,7 @@ angular.module('app').service('Persist', ['$window','lodash', function ($window,
|
||||
localStorage.setItem(LS_KEY_COMPARISONS, angular.toJson(this.comparisons));
|
||||
this.state.hasComparisons = Object.keys(this.comparisons).length > 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete all builds and comparisons from localStorage
|
||||
|
||||
4
app/js/service-serializer.js
Normal file → Executable file
4
app/js/service-serializer.js
Normal file → Executable file
@@ -68,11 +68,11 @@ angular.module('app').service('Serializer', ['lodash', function (_) {
|
||||
p: predicate,
|
||||
d: desc? 1 : 0
|
||||
})).replace(/\//g,'-');
|
||||
}
|
||||
};
|
||||
|
||||
this.toComparison = function (code) {
|
||||
return angular.fromJson(LZString.decompressFromBase64(code.replace(/-/g,'/')));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Utility function to retrieve a safe string for selected component for a slot.
|
||||
|
||||
0
app/js/shipyard/factory-component-set.js
Normal file → Executable file
0
app/js/shipyard/factory-component-set.js
Normal file → Executable file
0
app/js/shipyard/factory-ship.js
Normal file → Executable file
0
app/js/shipyard/factory-ship.js
Normal file → Executable file
0
app/js/shipyard/module-shipyard.js
Normal file → Executable file
0
app/js/shipyard/module-shipyard.js
Normal file → Executable file
0
app/js/shipyard/service-components.js
Normal file → Executable file
0
app/js/shipyard/service-components.js
Normal file → Executable file
Reference in New Issue
Block a user