Linting fixes

This commit is contained in:
Colin McLeod
2015-05-25 22:59:46 -07:00
parent 9483294598
commit c8df9eb711
5 changed files with 7 additions and 10 deletions

View File

@@ -10,7 +10,6 @@ angular.module('app').directive('areaChart', function () {
width: '='
},
link: function(scope, element) {
console.log(element[0].parentElement);
var width = element[0].parentElement.offsetWidth,
height = width * 0.6,
series = scope.series,

View File

@@ -2,7 +2,7 @@ angular.module('app').directive('componentSelect', function () {
// 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;
for (var i = 0; i < opts.length; i++) {
var o = opts[i];
@@ -47,8 +47,7 @@ angular.module('app').directive('componentSelect', function () {
opts: '=', // Component Options object
groups: '=', // Groups of Component Options
mass: '=', // Current ship unladen mass
s: '=', // Current Slot
wrap: '@' // Wrap on class
s: '=' // Current Slot
},
link: function(scope, element) {
var list = [];
@@ -57,7 +56,6 @@ angular.module('app').directive('componentSelect', function () {
var opts = scope.opts;
var groups = scope.groups;
var mass = scope.mass || 0;
var wrap = scope.wrap;
if(groups) {
// 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 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>');
appendGroup(list, grp, cid, mass, wrap);
appendGroup(list, grp, cid, mass);
list.push('</ul>');
}
} else {
list.push('<ul>');
appendGroup(list, opts, cid, mass, wrap);
appendGroup(list, opts, cid, mass);
list.push('</ul>');
}

View File

@@ -92,7 +92,7 @@
<div class="l">Opt: {{th.c.optmass}} <u>T</u></div>
<div class="l">Max: {{th.c.maxmass}} <u>T</u></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 class="slot" ng-click="selectSlot($event, fsd)" ng-class="{selected: selectedSlot==fsd}">
<div class="details">

View File

@@ -209,7 +209,7 @@ gulp.task('build', function (done) { runSequence('clean', ['html2js','jsonToDB']
gulp.task('deploy', function (done) {
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('default', ['dev']);

View File

@@ -1,6 +1,6 @@
{
"name": "coriolis_shipyard",
"version": "0.7.3",
"version": "0.7.4",
"repository": {
"type": "git",
"url": "https://github.com/cmmcleod/coriolis"