mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Linting fixes
This commit is contained in:
@@ -10,7 +10,6 @@ angular.module('app').directive('areaChart', function () {
|
|||||||
width: '='
|
width: '='
|
||||||
},
|
},
|
||||||
link: function(scope, element) {
|
link: function(scope, element) {
|
||||||
console.log(element[0].parentElement);
|
|
||||||
var width = element[0].parentElement.offsetWidth,
|
var width = element[0].parentElement.offsetWidth,
|
||||||
height = width * 0.6,
|
height = width * 0.6,
|
||||||
series = scope.series,
|
series = scope.series,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ angular.module('app').directive('componentSelect', function () {
|
|||||||
|
|
||||||
// Generting the HTML in this manner is MUCH faster than using an angular template.
|
// Generting the HTML in this manner is MUCH faster than using an angular template.
|
||||||
|
|
||||||
function appendGroup(list, opts, cid, mass, wrap) {
|
function appendGroup(list, opts, cid, mass) {
|
||||||
var prevClass = null, prevRating = null;
|
var prevClass = null, prevRating = null;
|
||||||
for (var i = 0; i < opts.length; i++) {
|
for (var i = 0; i < opts.length; i++) {
|
||||||
var o = opts[i];
|
var o = opts[i];
|
||||||
@@ -47,8 +47,7 @@ angular.module('app').directive('componentSelect', function () {
|
|||||||
opts: '=', // Component Options object
|
opts: '=', // Component Options object
|
||||||
groups: '=', // Groups of Component Options
|
groups: '=', // Groups of Component Options
|
||||||
mass: '=', // Current ship unladen mass
|
mass: '=', // Current ship unladen mass
|
||||||
s: '=', // Current Slot
|
s: '=' // Current Slot
|
||||||
wrap: '@' // Wrap on class
|
|
||||||
},
|
},
|
||||||
link: function(scope, element) {
|
link: function(scope, element) {
|
||||||
var list = [];
|
var list = [];
|
||||||
@@ -57,7 +56,6 @@ angular.module('app').directive('componentSelect', function () {
|
|||||||
var opts = scope.opts;
|
var opts = scope.opts;
|
||||||
var groups = scope.groups;
|
var groups = scope.groups;
|
||||||
var mass = scope.mass || 0;
|
var mass = scope.mass || 0;
|
||||||
var wrap = scope.wrap;
|
|
||||||
|
|
||||||
if(groups) {
|
if(groups) {
|
||||||
// At present time slots with grouped options (Hardpoints and Internal) can be empty
|
// At present time slots with grouped options (Hardpoints and Internal) can be empty
|
||||||
@@ -66,12 +64,12 @@ angular.module('app').directive('componentSelect', function () {
|
|||||||
var grp = groups[g];
|
var grp = groups[g];
|
||||||
var grpCode = grp[Object.keys(grp)[0]].grp; // Nasty operation to get the grp property of the first/any single component
|
var grpCode = grp[Object.keys(grp)[0]].grp; // Nasty operation to get the grp property of the first/any single component
|
||||||
list.push('<div id="', grpCode ,'" class="select-group">', g, '</div><ul>');
|
list.push('<div id="', grpCode ,'" class="select-group">', g, '</div><ul>');
|
||||||
appendGroup(list, grp, cid, mass, wrap);
|
appendGroup(list, grp, cid, mass);
|
||||||
list.push('</ul>');
|
list.push('</ul>');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
list.push('<ul>');
|
list.push('<ul>');
|
||||||
appendGroup(list, opts, cid, mass, wrap);
|
appendGroup(list, opts, cid, mass);
|
||||||
list.push('</ul>');
|
list.push('</ul>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
<div class="l">Opt: {{th.c.optmass}} <u>T</u></div>
|
<div class="l">Opt: {{th.c.optmass}} <u>T</u></div>
|
||||||
<div class="l">Max: {{th.c.maxmass}} <u>T</u></div>
|
<div class="l">Max: {{th.c.maxmass}} <u>T</u></div>
|
||||||
</div>
|
</div>
|
||||||
<div component-select class="select" s="th" mass="ship.unladenMass" wrap="true" opts="availCS.common[1]" ng-if="selectedSlot==th" ng-click="select('c',th,$event)"></div>
|
<div component-select class="select" s="th" mass="ship.unladenMass" opts="availCS.common[1]" ng-if="selectedSlot==th" ng-click="select('c',th,$event)"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="slot" ng-click="selectSlot($event, fsd)" ng-class="{selected: selectedSlot==fsd}">
|
<div class="slot" ng-click="selectSlot($event, fsd)" ng-class="{selected: selectedSlot==fsd}">
|
||||||
<div class="details">
|
<div class="details">
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ gulp.task('build', function (done) { runSequence('clean', ['html2js','jsonToDB']
|
|||||||
|
|
||||||
gulp.task('deploy', function (done) {
|
gulp.task('deploy', function (done) {
|
||||||
cdnHostStr = '//cdn.' + process.env.CORIOLIS_HOST;
|
cdnHostStr = '//cdn.' + process.env.CORIOLIS_HOST;
|
||||||
runSequence('build','cache-bust', 'upload', done);
|
runSequence('lint', 'build','cache-bust', 'upload', done);
|
||||||
});
|
});
|
||||||
gulp.task('dev', function (done) { runSequence('build', 'serve','watch', done); });
|
gulp.task('dev', function (done) { runSequence('build', 'serve','watch', done); });
|
||||||
gulp.task('default', ['dev']);
|
gulp.task('default', ['dev']);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "coriolis_shipyard",
|
"name": "coriolis_shipyard",
|
||||||
"version": "0.7.3",
|
"version": "0.7.4",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/cmmcleod/coriolis"
|
"url": "https://github.com/cmmcleod/coriolis"
|
||||||
|
|||||||
Reference in New Issue
Block a user