close #20 fixed system alias update, gulp copy task fixed, jshint fixes, updated package.json
This commit is contained in:
@@ -17,9 +17,8 @@ var stylish = require('jshint-stylish');
|
||||
var _src = {
|
||||
GULP: './gulpfile.js',
|
||||
ICON: './public/img/notifications/logo.png',
|
||||
// JS_CONFIG: './src/main/conf/build.js', // path to requirejs config file
|
||||
JS_SRC: './js/**/*.js',
|
||||
JS_LIBS: './js/lib/**/*.js',
|
||||
JS_SRC: './js/**/*',
|
||||
JS_LIBS: './js/lib/**/*',
|
||||
JS_BUILD: './build_js',
|
||||
JS_DIST: './public/js',
|
||||
PACKAGE: './package.json'
|
||||
|
||||
@@ -465,6 +465,16 @@ define([
|
||||
|
||||
if(!system){
|
||||
|
||||
// set system name or alias
|
||||
var systemName = data.name;
|
||||
|
||||
if(
|
||||
data.alias &&
|
||||
data.alias !== ''
|
||||
){
|
||||
systemName = data.alias;
|
||||
}
|
||||
|
||||
// get system info classes
|
||||
var effectBasicClass = Util.getEffectInfoForSystem('effect', 'class');
|
||||
var effectName = Util.getEffectInfoForSystem(data.effect, 'name');
|
||||
@@ -476,42 +486,42 @@ define([
|
||||
id: systemId,
|
||||
class: config.systemClass
|
||||
}).append(
|
||||
// system head
|
||||
$('<div>', {
|
||||
class: config.systemHeadClass
|
||||
}).append(
|
||||
// System name is editable
|
||||
$('<a>', {
|
||||
href: '#',
|
||||
class: config.systemHeadNameClass
|
||||
})
|
||||
).append(
|
||||
// System locked status
|
||||
$('<i>', {
|
||||
class: ['fa', 'fa-lock', 'fa-fw'].join(' ')
|
||||
}).attr('title', 'locked')
|
||||
).append(
|
||||
// System effect color
|
||||
$('<i>', {
|
||||
class: ['fa', 'fa-square ', 'fa-fw', effectBasicClass, effectClass].join(' ')
|
||||
}).attr('title', effectName)
|
||||
).append(
|
||||
// expand option
|
||||
$('<i>', {
|
||||
class: ['fa', 'fa-angle-down ', config.systemHeadExpandClass].join(' ')
|
||||
})
|
||||
).prepend(
|
||||
$('<span>', {
|
||||
class: [config.systemSec, secClass].join(' '),
|
||||
text: data.security
|
||||
})
|
||||
)
|
||||
).append(
|
||||
// system body
|
||||
$('<div>', {
|
||||
class: config.systemBodyClass
|
||||
})
|
||||
).data('name', data.name);
|
||||
// system head
|
||||
$('<div>', {
|
||||
class: config.systemHeadClass
|
||||
}).append(
|
||||
// System name is editable
|
||||
$('<a>', {
|
||||
href: '#',
|
||||
class: config.systemHeadNameClass
|
||||
}).attr('data-value', systemName)
|
||||
).append(
|
||||
// System locked status
|
||||
$('<i>', {
|
||||
class: ['fa', 'fa-lock', 'fa-fw'].join(' ')
|
||||
}).attr('title', 'locked')
|
||||
).append(
|
||||
// System effect color
|
||||
$('<i>', {
|
||||
class: ['fa', 'fa-square ', 'fa-fw', effectBasicClass, effectClass].join(' ')
|
||||
}).attr('title', effectName)
|
||||
).append(
|
||||
// expand option
|
||||
$('<i>', {
|
||||
class: ['fa', 'fa-angle-down ', config.systemHeadExpandClass].join(' ')
|
||||
})
|
||||
).prepend(
|
||||
$('<span>', {
|
||||
class: [config.systemSec, secClass].join(' '),
|
||||
text: data.security
|
||||
})
|
||||
)
|
||||
).append(
|
||||
// system body
|
||||
$('<div>', {
|
||||
class: config.systemBodyClass
|
||||
})
|
||||
);
|
||||
|
||||
// set initial system position
|
||||
system.css({
|
||||
@@ -530,7 +540,6 @@ define([
|
||||
newPosX !== currentPosX ||
|
||||
newPosY !== currentPosY
|
||||
){
|
||||
|
||||
// change position with animation
|
||||
system.velocity(
|
||||
{
|
||||
@@ -558,23 +567,18 @@ define([
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// set system alias
|
||||
var alias = system.getSystemInfo(['alias']);
|
||||
|
||||
if(alias !== data.alias){
|
||||
// alias changed
|
||||
system.find('.' + config.systemHeadNameClass).editable('setValue', data.alias);
|
||||
}
|
||||
}
|
||||
|
||||
// set system name or alias
|
||||
var systemName = data.name;
|
||||
|
||||
if(
|
||||
data.alias &&
|
||||
data.alias !== ''
|
||||
){
|
||||
systemName = data.alias;
|
||||
}
|
||||
|
||||
system.find('.' + config.systemHeadNameClass).attr('data-value', systemName);
|
||||
|
||||
// set system status
|
||||
system.setSystemStatus(data.status.name);
|
||||
|
||||
system.data('id', parseInt(data.id));
|
||||
system.data('systemId', parseInt(data.systemId));
|
||||
system.data('name', data.name);
|
||||
@@ -1103,6 +1107,7 @@ define([
|
||||
headElement.editable({
|
||||
mode: 'popup',
|
||||
type: 'text',
|
||||
name: 'alias',
|
||||
title: 'System alias',
|
||||
placement: 'top',
|
||||
onblur: 'submit',
|
||||
@@ -2658,7 +2663,14 @@ define([
|
||||
switch(info[i]){
|
||||
case 'alias':
|
||||
// get current system alias
|
||||
systemInfo.push( $(this).find('.' + config.systemHeadNameClass).text() );
|
||||
var systemHeadNameElement = $(this).find('.' + config.systemHeadNameClass);
|
||||
var alias = '';
|
||||
if( systemHeadNameElement.hasClass('editable') ){
|
||||
// xEditable is initiated
|
||||
alias = systemHeadNameElement.editable('getValue', true);
|
||||
}
|
||||
|
||||
systemInfo.push(alias );
|
||||
break;
|
||||
default:
|
||||
systemInfo.push('bad system query');
|
||||
|
||||
@@ -966,7 +966,7 @@ define([
|
||||
var timer = function(){
|
||||
|
||||
// change status on first timer iteration
|
||||
if(programStatusCounter === Init.timer['PROGRAM_STATUS_VISIBLE']){
|
||||
if(programStatusCounter === Init.timer.PROGRAM_STATUS_VISIBLE){
|
||||
|
||||
statusElement.velocity('stop').velocity('fadeOut', {
|
||||
duration: Init.animationSpeed.headerLink,
|
||||
@@ -992,7 +992,7 @@ define([
|
||||
};
|
||||
|
||||
if(! programStatusInterval){
|
||||
programStatusCounter = Init.timer['PROGRAM_STATUS_VISIBLE'];
|
||||
programStatusCounter = Init.timer.PROGRAM_STATUS_VISIBLE;
|
||||
programStatusInterval = setInterval(timer, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ define([
|
||||
}
|
||||
}
|
||||
|
||||
for(var m = 0; k < connectionCount; m++) {
|
||||
for(var m = 0; m < connectionCount; m++) {
|
||||
if(!placed) {
|
||||
if(getDistance(p1, p2) < getDistance(p1, closest[m])) {
|
||||
closest[m] = p2;
|
||||
|
||||
@@ -631,21 +631,21 @@ define([
|
||||
// make sure the delay timer is valid!
|
||||
// if this is called for the first time -> set CURRENT_DELAY
|
||||
if(
|
||||
Init.timer[updateKey]['CURRENT_DELAY'] === undefined ||
|
||||
Init.timer[updateKey]['CURRENT_DELAY'] <= 0
|
||||
Init.timer[updateKey].CURRENT_DELAY === undefined ||
|
||||
Init.timer[updateKey].CURRENT_DELAY <= 0
|
||||
){
|
||||
Init.timer[updateKey]['CURRENT_DELAY'] = Init.timer[updateKey]['DELAY'];
|
||||
Init.timer[updateKey].CURRENT_DELAY = Init.timer[updateKey].DELAY;
|
||||
}
|
||||
|
||||
// in/decrease the trigger delay
|
||||
if(
|
||||
value === parseInt(value, 10) &&
|
||||
( Init.timer[updateKey]['CURRENT_DELAY'] ) + value > 0
|
||||
( Init.timer[updateKey].CURRENT_DELAY ) + value > 0
|
||||
){
|
||||
Init.timer[updateKey]['CURRENT_DELAY'] += value;
|
||||
Init.timer[updateKey].CURRENT_DELAY += value;
|
||||
}
|
||||
|
||||
return Init.timer[updateKey]['CURRENT_DELAY'];
|
||||
return Init.timer[updateKey].CURRENT_DELAY;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
29
package.json
29
package.json
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"name": "pathfinder",
|
||||
"version": "1.0.0",
|
||||
"description": "System mapping tool for EVE ONLINE",
|
||||
"name": "pathfinder-eve",
|
||||
"version": "0.0.10",
|
||||
"engines" : {
|
||||
"node" : "4.0.x"
|
||||
},
|
||||
"description": "Pathfinder is a system mapping tool for EVE ONLINE",
|
||||
"main": "index.php",
|
||||
"dependencies": {
|
||||
"requirejs": "^2.1.20"
|
||||
@@ -16,7 +19,6 @@
|
||||
"gulp-plumber": "^1.0.1",
|
||||
"jshint": "^2.8.0",
|
||||
"jshint-stylish": "^2.0.1",
|
||||
"requirejs": "^2.1.20",
|
||||
"run-sequence": "^1.1.2"
|
||||
},
|
||||
"scripts": {
|
||||
@@ -27,15 +29,18 @@
|
||||
"url": "git+https://github.com/exodus4d/pathfinder.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Pathfinder",
|
||||
"Exodus 4D",
|
||||
"EVE ONLINE",
|
||||
"Wormhole"
|
||||
"pathfinder",
|
||||
"exodus 4d",
|
||||
"eve online",
|
||||
"wormhole",
|
||||
"mapping"
|
||||
],
|
||||
"author": "Exodus 4D",
|
||||
"license": "ISC",
|
||||
"author": "Exodus 4D <pathfinder@exodus4d.de> (https://github.com/exodus4d)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/exodus4d/pathfinder/issues"
|
||||
"url": "https://github.com/exodus4d/pathfinder/issues",
|
||||
"email" : "pathfinder@exodus4d.de"
|
||||
},
|
||||
"homepage": "https://github.com/exodus4d/pathfinder#readme"
|
||||
"homepage": "https://github.com/exodus4d/pathfinder#readme",
|
||||
"private": true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user