', {
+ 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');
diff --git a/js/app/page.js b/js/app/page.js
index 19027e52..9d7368e0 100644
--- a/js/app/page.js
+++ b/js/app/page.js
@@ -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);
}
}
diff --git a/js/app/ui/header.js b/js/app/ui/header.js
index b1aeb211..1dd7bfb0 100644
--- a/js/app/ui/header.js
+++ b/js/app/ui/header.js
@@ -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;
diff --git a/js/app/util.js b/js/app/util.js
index 5e63115c..3aabafb2 100644
--- a/js/app/util.js
+++ b/js/app/util.js
@@ -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;
};
/**
diff --git a/package.json b/package.json
index 59a08584..b03b07fe 100644
--- a/package.json
+++ b/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
(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
}