Bug fixing, new map info dialog

This commit is contained in:
Exodus4D
2015-08-25 23:04:47 +02:00
parent e3591e5d05
commit 52957d1ac8
70 changed files with 3320 additions and 1452 deletions

1
.gitignore vendored
View File

@@ -46,6 +46,7 @@ Temporary Items
# ========================
# project files
# ========================
.idea
.sass-cache
.build_js
.css

View File

@@ -1,6 +1,21 @@
# Enable rewrite engine and route requests to framework
RewriteEngine On
# HTTP to HTTPS ----------------------------------------------------------------
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !=localhost
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} !=localhost
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Some servers require you to specify the `RewriteBase` directive
# In such cases, it should be the path (relative to the document root)
# containing this .htaccess file
@@ -16,15 +31,17 @@ RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
# PHP global Vars
php_value max_input_vars 5000
php_value suhosin.get.max_vars 5000
php_value suhosin.post.max_vars 5000
php_value suhosin.request.max_vars 5000
# PHP error logs
php_flag log_errors on
# php_value error_log "/www/htdocs/w0128162/pathfinder.exodus4d.de/php_errors.html"
# php_value error_log "/www/htdocs/w0128162/www.pathfinder.exodus4d.de/logs/php_errors.log"
# cache images/pdf docs
<ifmodule mod_expires.c>
@@ -56,3 +73,5 @@ php_flag log_errors on
ExpiresDefault "access plus 1 week"
</Filesmatch>
</ifmodule>

905
.idea/dataSources.ids generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,8 +3,14 @@
<component name="dataSourceStorageLocal">
<data-source name="Pathfinder" uuid="da3cf616-be39-4091-94bd-76d70f41765d">
<user-name>root</user-name>
<schema-pattern>eve_phoebe.* pathfinder.*</schema-pattern>
<default-schemas>eve_phoebe.* pathfinder.*</default-schemas>
<schema-pattern>eve_aegis.* eve_test.* pathfinder.*</schema-pattern>
<default-schemas>pathfinder.*</default-schemas>
</data-source>
<data-source name="Pathfinder production" uuid="5ad9de1d-d2a1-4aed-832f-ec919fcd1338">
<secret-storage>master_key</secret-storage>
<user-name>d01d8636</user-name>
<schema-pattern>d01d8636.*</schema-pattern>
<default-schemas>d01d8636.*</default-schemas>
</data-source>
</component>
</project>

16
.idea/dataSources.xml generated
View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" hash="2102226246">
<component name="DataSourceManagerImpl" format="xml" hash="2390098921">
<data-source source="LOCAL" name="Pathfinder" uuid="da3cf616-be39-4091-94bd-76d70f41765d">
<driver-ref>mysql</driver-ref>
<synchronize>true</synchronize>
@@ -12,5 +12,19 @@
</driver-properties>
<libraries />
</data-source>
<data-source source="LOCAL" name="Pathfinder production" uuid="5ad9de1d-d2a1-4aed-832f-ec919fcd1338">
<driver-ref>mysql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://exodus4d.de:3306</jdbc-url>
<driver-properties>
<property name="zeroDateTimeBehavior" value="convertToNull" />
<property name="tinyInt1isBit" value="false" />
<property name="characterEncoding" value="utf8" />
<property name="characterSetResults" value="utf8" />
<property name="yearIsDateType" value="false" />
</driver-properties>
<libraries />
</data-source>
</component>
</project>

22
.idea/deployment.xml generated
View File

@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" serverName="pathfinder.exodus4d.de" />
<component name="PublishConfigData" serverName="Pathfinder" createEmptyFolders="true" compareModeInSync="TIMESTAMP" showNewOnTargetInSync="false">
<serverData>
<paths name="Pathfinder">
<serverdata>
<mappings>
<mapping deploy="/www.pathfinder.exodus4d.de" local="$PROJECT_DIR$" web="/" />
</mappings>
<excludedPaths>
<excludedPath local="true" path="$PROJECT_DIR$/sass" />
<excludedPath local="true" path="$PROJECT_DIR$/.gitignore" />
<excludedPath local="true" path="$PROJECT_DIR$/config.rb" />
<excludedPath local="true" path="$PROJECT_DIR$/logs" />
<excludedPath local="true" path="$PROJECT_DIR$/tmp" />
<excludedPath local="true" path="$PROJECT_DIR$/logs" />
<excludedPath path="/www.pathfinder.exodus4d.de/tmp" />
<excludedPath path="/www.pathfinder.exodus4d.de/logs" />
</excludedPaths>
</serverdata>
</paths>
</serverData>
</component>
</project>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="PROJECT" libraries="{jQuery-2.0.0, jsPlumb}" />
<includedPredefinedLibrary name="ECMAScript 6" />
</component>
</project>

8
.idea/pathfinder.iml generated
View File

@@ -11,18 +11,14 @@
<sourceFolder url="file://$MODULE_DIR$/js/app" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.sass-cache" />
<excludeFolder url="file://$MODULE_DIR$/build_js" />
<excludeFolder url="file://$MODULE_DIR$/logs" />
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
<excludeFolder url="file://$MODULE_DIR$/public/css" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/usage" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="jQuery-2.0.0" level="application" />
<orderEntry type="library" name="Node.js v0.10.32 Core Modules" level="application" />
<orderEntry type="library" name="sass-stdlib" level="application" />
<orderEntry type="library" name="jquery-DefinitelyTyped" level="application" />
<orderEntry type="library" name="jQuery-2.0.0" level="application" />
<orderEntry type="library" name="jsPlumb" level="application" />
</component>
</module>

View File

@@ -5,7 +5,7 @@
<option name="arguments" value="compile $ProjectFileDir$ " />
<option name="checkSyntaxErrors" value="true" />
<option name="description" value="Compiles .scss files to .css " />
<option name="exitCodeBehavior" value="ERROR" />
<option name="exitCodeBehavior" value="ALWAYS" />
<option name="fileExtension" value="scss" />
<option name="immediateSync" value="true" />
<option name="name" value="Compass" />
@@ -15,10 +15,10 @@
</option>
<option name="outputFromStdout" value="false" />
<option name="passParentEnvs" value="true" />
<option name="program" value="C:/Ruby21-x64/bin/compass.bat" />
<option name="program" value="C:/Ruby22-x64/bin/compass.bat" />
<option name="scopeName" value="Project Files" />
<option name="trackOnlyRoot" value="true" />
<option name="workingDir" value="F:\webpages\exodus4d\pathfinder" />
<option name="workingDir" value="G:\webpages\exodus4d\pathfinder" />
<envs />
</TaskOptions>
</component>

1821
.idea/workspace.xml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
[globals]
; Verbosity level of the stack trace. Assign values between 0 to 3 for increasing verbosity levels
DEBUG = 3
; Default Verbosity level of the stack trace.
; Assign values between 0 to 3 for increasing verbosity levels. Check "PATHFINDER" config for overwriting
DEBUG = 0
; If TRUE, the framework, after having logged stack trace and errors, stops execution (die without any status) when a non-fatal error is detected.
HALT = FALSE
@@ -14,10 +14,8 @@ TZ = "UTC"
; Cache backend. Can handle Memcache module, APC, WinCache, XCache and a filesystem-based cache.
CACHE = TRUE
; Path configurations =====================================================================================
; Path to the index.php main/front controller.
BASE = /exodus4d/pathfinder
; BASE = /www/htdocs/w0128162/pathfinder.exodus4d.de
; Path configurations ==================================================================================
; relative to "BASE" dir
; Temporary folder for cache, filesystem locks, compiled F3 templates, etc.
TEMP = tmp/
@@ -31,107 +29,5 @@ UI = public/
; Search path(s) for user-defined PHP classes that the framework will attempt to autoload at runtime
AUTOLOAD = app/main/
; Pathfinder Databases ====================================================================================
; Develop
DB_DNS = mysql:host=localhost;port=3306;dbname=
DB_NAME = pathfinder
DB_USER = root
DB_PASS =
; Live
; DB_DNS = mysql:host=localhost;port=3306;dbname=
; DB_NAME = d01d8636
; DB_USER = d01d8636
; DB_PASS = bQ9VAd6fE86sVs4s
; EVE-Online CCP Database export
DB_CCP_DNS = mysql:host=localhost;port=3306;dbname=
DB_CCP_NAME = eve_phoebe
DB_CCP_USER = root
DB_CCP_PASS =
; ======================================================================================================
[PATHFINDER]
NAME = "PATHFINDER"
VERSION = "v0.10"
CONTACT = "https://github.com/exodus4d"
; Max number of maps an entity can create
MAX_MAPS_PRIVATE = 3
MAX_MAPS_CORPORATION = 3
MAX_MAPS_ALLIANCE = 3
; Max number of shared entities per map
MAX_SHARED_USER = 10
MAX_SHARED_CORPORATION = 3
MAX_SHARED_ALLIANCE = 2
; Lifetime for map types
[PATHFINDER.MAP.PRIVATE]
LIFETIME = 2
[PATHFINDER.MAP.CORPORATION]
LIFETIME = 99999
[PATHFINDER.MAP.ALLIANCE]
LIFETIME = 99999
; ======================================================================================================
[PATHFINDER.CACHE]
; cache character log informations in seconds. This is ignored if ship/system switch was detected
CHARACTER_LOG = 600
; cache time for all system data within a constellation (this will never change) 30d
CONSTELLATION_SYSTEMS = 2592000
; ======================================================================================================
[PATHFINDER.TIMER]
; login time (minutes)
LOGGED = 120
; double click timer (ms)
DBL_CLICK = 250
; time for status change visibility in header (ms)
PROGRAM_STATUS_VISIBLE = 5000
; get all client map data (ms)
[PATHFINDER.TIMER.GET_CLIENT_MAP_DATA]
EXECUTION_LIMIT = 50
; main map update ping (ajax) (ms)
[PATHFINDER.TIMER.UPDATE_SERVER_MAP]
DELAY = 5000
EXECUTION_LIMIT = 200
; update client map data (ms)
[PATHFINDER.TIMER.UPDATE_CLIENT_MAP]
EXECUTION_LIMIT = 50
; map user update ping (ajax) (ms)
[PATHFINDER.TIMER.UPDATE_SERVER_USER_DATA]
DELAY = 5000
EXECUTION_LIMIT = 200
; update client user data (ms)
[PATHFINDER.TIMER.UPDATE_CLIENT_USER_DATA]
EXECUTION_LIMIT = 50
; ======================================================================================================
[PATHFINDER.LOGFILES]
; just for manuel debug during development
DEBUG = "debug"
; user login information
LOGIN = "login"
; ======================================================================================================
[api_path]
; Path for CCPs XML APIv2
CCP_XML = "https://api.eveonline.com"

View File

@@ -1,7 +1,7 @@
[CRON]
log = TRUE
cli = TRUE
web = FALSE
web = TRUE
[CRON.presets]
; run every minute

View File

@@ -53,7 +53,8 @@ class CcpApiController extends Controller{
* @return bool|\SimpleXMLElement
*/
public function requestCharacters($keyID, $vCode){
$apiPath = $this->f3->get('api_path.CCP_XML') . '/account/APIKeyInfo.xml.aspx';
$apiPath = $this->f3->get('PATHFINDER.API.CCP_XML') . '/account/APIKeyInfo.xml.aspx';
$xml = false;

View File

@@ -37,12 +37,19 @@ class Controller {
return $this->template;
}
/**
* event handler
* event handler for all "views"
* some global template variables are set in here
* @param $f3
*/
function beforeroute($f3) {
// check if user is in game
$f3->set('isIngame', self::isIGB() );
// js path (build/minified or raw uncompressed files)
$f3->set('pathJs', self::getEnvironmentData('PATH_JS') );
}
/**
@@ -169,7 +176,6 @@ class Controller {
return $validUser;
}
/**
* log the current user out
* @param $f3
@@ -184,7 +190,7 @@ class Controller {
$f3->reroute('@landing');
}else{
$return = (object) [];
$return->reroute = $f3->get('BASE') . $f3->alias('landing');
$return->reroute = self::getEnvironmentData('URL') . $f3->alias('landing');
$return->error[] = $this->getUserLoggedOffError();
echo json_encode($return);
@@ -204,6 +210,15 @@ class Controller {
return $userError;
}
/**
* get the current registration status
* 0=registration stop |1=new registration allowed
* @return int
*/
static function getRegistrationStatus(){
return (int)\Base::instance()->get('PATHFINDER.REGISTRATION.STATUS');
}
/**
* get a log controller e.g. "debug"
* @param $loggerType
@@ -223,5 +238,22 @@ class Controller {
return str_replace($illegalCharacters, '', $key);
}
/**
* get environment specific configuration data
* @param $key
* @return mixed|null
*/
static function getEnvironmentData($key){
$f3 = \Base::instance();
$environment = $f3->get('PATHFINDER.ENVIRONMENT.SERVER');
$environmentKey = 'PATHFINDER.ENVIRONMENT[' . $environment . '][' . $key . ']';
$data = null;
if( $f3->exists($environmentKey) ){
$data = $f3->get($environmentKey);
}
return $data;
}
}

View File

@@ -26,7 +26,7 @@ class MapController extends \Controller\AccessController {
$this->f3->set('trusted', (int)self::isIGBTrusted());
// JS main file
$this->f3->set('jsView', 'main');
$this->f3->set('jsView', 'mappage');
$this->setTemplate('templates/view/index.html');
}

View File

@@ -517,9 +517,9 @@ class Map extends \Controller\AccessController {
// IMPORTANT for now -> just update a single map (save performance)
$mapIds = array_slice($mapIds, 0, 1);
// the maps are cached per map (this must be changed if multiple maps
// the userMasData is cached per map (this must be changed if multiple maps
// will be allowed in future...
$tempId = $mapIds[0];
$tempId = (int)$mapIds[0];
$cacheKey = 'user_data_' . $tempId . '_' . $requestSystemData->systemId;
if( $f3->exists($cacheKey) === false ){

View File

@@ -40,7 +40,7 @@ class User extends Controller\Controller{
$user->updateApiData();
// route user to map app
$return->reroute = $f3->get('BASE') . $f3->alias('map');
$return->reroute = self::getEnvironmentData('URL') . $f3->alias('map');
}
echo json_encode($return);
@@ -57,7 +57,7 @@ class User extends Controller\Controller{
// try to verify user
$user = $this->_verifyUser($userName, $password);
if($user !== false){
if( !is_null($user)){
// user is verified -> ready for login
// set Session login
@@ -244,7 +244,6 @@ class User extends Controller\Controller{
if($user === false){
// new user registration
$user = $mapType = Model\BasicModel::getNew('UserModel');
$loginAfterSave = true;
// set username
@@ -320,12 +319,8 @@ class User extends Controller\Controller{
$api->userId = $user;
}
$api->keyId = $keyId;
$api->vCode = $settingsData['vCode'][$i];
// -----
$api->save();
$characterCount = $api->updateCharacters();
@@ -369,7 +364,7 @@ class User extends Controller\Controller{
$this->logUserIn( $user->name, $settingsData['password'] );
// return reroute path
$return->reroute = $this->f3->get('BASE') . $this->f3->alias('map');
$return->reroute = self::getEnvironmentData('URL') . $this->f3->alias('map');
}
// get fresh updated user object
@@ -382,9 +377,13 @@ class User extends Controller\Controller{
$validationError->field = $e->getField();
$validationError->message = $e->getMessage();
$return->error[] = $validationError;
}catch(Exception\RegistrationException $e){
$registrationError = (object) [];
$registrationError->type = 'error';
$registrationError->message = $e->getMessage();
$return->error[] = $registrationError;
}
// return new/updated user data
$return->userData = $newUserData;

View File

@@ -29,10 +29,6 @@ class AppController extends Controller {
// JS main file
$f3->set('jsView', 'landingpage');
// check if user is in game
$f3->set('isIngame', self::isIGB() );
$this->f3->set('igbTest', 123 );
$this->setTemplate('templates/view/index.html');
}

View File

@@ -15,7 +15,8 @@ class CcpSystemsUpdate {
const LOG_TEXT = '%s prepare table (%.3F s), jump (%.3F s), kill (%.3F s), update all (%.3F s)';
protected $apiRequestOptions = [
'timeout' => 5
'timeout' => 5,
'follow_location' => false // otherwise CURLOPT_FOLLOWLOCATION will fail
];
/**
@@ -57,7 +58,7 @@ class CcpSystemsUpdate {
if($systemData['type']['name'] == 'k-space'){
$f3->get('DB')->exec($sqlInsertSystem, array(
':systemId' => $systemData['systemId']
));
), 0, false);
}
}
@@ -84,7 +85,7 @@ class CcpSystemsUpdate {
// get current jump Data -------------------------------------------------------
$time_start = microtime(true);
$apiPath = $f3->get('api_path.CCP_XML') . '/map/Jumps.xml.aspx';
$apiPath = $f3->get('PATHFINDER.API.CCP_XML') . '/map/Jumps.xml.aspx';
$apiResponse = \Web::instance()->request($apiPath, $this->apiRequestOptions );
@@ -109,7 +110,7 @@ class CcpSystemsUpdate {
// get current kill Data -------------------------------------------------------
$time_start = microtime(true);
$apiPath = $f3->get('api_path.CCP_XML') . '/map/Kills.xml.aspx';
$apiPath = $f3->get('PATHFINDER.API.CCP_XML') . '/map/Kills.xml.aspx';
$apiResponse = \Web::instance()->request($apiPath, $this->apiRequestOptions );
$killData = [];
@@ -171,8 +172,7 @@ class CcpSystemsUpdate {
value2 = value1,
value1 = :value
WHERE
systemId = :systemId AND
HOUR(TIMEDIFF(NOW(), updated)) > 0
systemId = :systemId
";
foreach($systemsData as $systemData){
@@ -190,7 +190,7 @@ class CcpSystemsUpdate {
$f3->get('DB')->exec($sql, array(
':systemId' => $systemData['systemId'],
':value' => $currentJumps
));
), 0, false);
}else if($updateKills){
// update kill data (if available)
@@ -204,7 +204,7 @@ class CcpSystemsUpdate {
$f3->get('DB')->exec($sql, array(
':systemId' => $systemData['systemId'],
':value' => $currentKills
));
), 0, false);
}
}
}

View File

@@ -85,8 +85,8 @@ class CcpSystemsMapper extends \RecursiveArrayIterator {
// format functions
self::$map['type'] = function($iterator){
// TODO refactore
$type = 'wh';
// TODO refactor
$type = 'w-space';
$typeId = 1;
if(
$iterator['security'] == 7 ||

View File

@@ -7,6 +7,8 @@
*/
namespace DB;
use Controller;
use controller\LogController;
class Database extends \Prefab {
@@ -14,6 +16,7 @@ class Database extends \Prefab {
function __construct($database = 'PF'){
// set database
$this->setDB($database);
$this->setDB($database);
}
/**
@@ -26,20 +29,36 @@ class Database extends \Prefab {
if($database === 'CCP'){
// CCP DB
$db = $this->connect($f3->get('DB_CCP_DNS'), $f3->get('DB_CCP_NAME'), $f3->get('DB_CCP_USER'), $f3->get('DB_CCP_PASS'));
$dns = Controller\Controller::getEnvironmentData('DB_CCP_DNS');
$name = Controller\Controller::getEnvironmentData('DB_CCP_NAME');
$user = Controller\Controller::getEnvironmentData('DB_CCP_USER');
$password = Controller\Controller::getEnvironmentData('DB_CCP_PASS');
}else{
// Pathfinder DB
$db = $this->connect($f3->get('DB_DNS'), $f3->get('DB_NAME'), $f3->get('DB_USER'), $f3->get('DB_PASS'));
$dns = Controller\Controller::getEnvironmentData('DB_DNS');
$name = Controller\Controller::getEnvironmentData('DB_NAME');
$user = Controller\Controller::getEnvironmentData('DB_USER');
$password = Controller\Controller::getEnvironmentData('DB_PASS');
}
$f3->set('DB', $db);
// check for DB switch. If current DB equal new DB -> no switch needed
if(
!$f3->exists('DB') ||
$name !== $f3->get('DB')->name()
){
// set DB timezone to UTC +00:00 (eve server time)
$f3->get('DB')->exec('SET @@session.time_zone = "+00:00";');
$db = $this->connect($dns, $name, $user, $password);
$f3->set('DB', $db);
// set DB timezone to UTC +00:00 (eve server time)
$f3->get('DB')->exec('SET @@session.time_zone = "+00:00";');
// disable innoDB schema (relevant vor MySql 5.5)
// not necessary for MySql > v.5.6
//$f3->get('DB')->exec('SET GLOBAL innodb_stats_on_metadata = OFF;');
}
// disable innoDB schema (relevant vor MySql 5.5)
// not necessary for MySql 5.6
//$f3->get('DB')->exec('SET GLOBAL innodb_stats_on_metadata = OFF;');
}
/**
@@ -52,11 +71,19 @@ class Database extends \Prefab {
*/
protected function connect($dns, $name, $user, $password){
$db = new SQL(
$dns . $name,
$user,
$password
);
try {
$db = new SQL(
$dns . $name,
$user,
$password,
[
\PDO::MYSQL_ATTR_COMPRESS => TRUE
]
);
}catch(\PDOException $e){
// DB connection error
LogController::getLogger('error')->write($e->getMessage());
}
return $db;
}

View File

@@ -12,6 +12,7 @@ namespace Exception;
class BaseException extends \Exception {
const VALIDATION_FAILED = 403;
const REGISTRATION_FAILED = 403;
public function __construct($message, $code = 0){
parent::__construct($message, $code);

View File

@@ -0,0 +1,18 @@
<?php
/**
* Created by PhpStorm.
* User: Exodus
* Date: 15.08.2015
* Time: 21:21
*/
namespace Exception;
class RegistrationException extends BaseException{
public function __construct($message){
parent::__construct($message, self::REGISTRATION_FAILED);
}
}

View File

@@ -14,14 +14,14 @@ class AllianceMapModel extends BasicModel {
protected $table = 'alliance_map';
protected $fieldConf = array(
'allianceId' => array(
protected $fieldConf = [
'allianceId' => [
'belongs-to-one' => 'Model\AllianceModel'
),
'mapId' => array(
],
'mapId' => [
'belongs-to-one' => 'Model\MapModel'
)
);
]
];
/**
* see parent

View File

@@ -60,8 +60,14 @@ class BasicModel extends \DB\Cortex {
$this->afterupdate( function($self){
$self->clearCacheData();
});
// model updated
$this->beforeinsert( function($self){
$self->beforeInsertEvent($self);
});
}
/**
* @param string $key
* @param mixed $val
@@ -243,7 +249,7 @@ class BasicModel extends \DB\Cortex {
*/
public function getById($id, $ttl = 3) {
return $this->getByForeignKey('id', (int)$id, array('limit' => 1), $ttl);
return $this->getByForeignKey('id', (int)$id, ['limit' => 1], $ttl);
}
/**
@@ -277,7 +283,7 @@ class BasicModel extends \DB\Cortex {
* @param int $ttl
* @return \DB\Cortex
*/
public function getByForeignKey($key, $id, $options = array(), $ttl = 60){
public function getByForeignKey($key, $id, $options = [], $ttl = 60){
$querySet = [];
$query = [];
@@ -297,6 +303,15 @@ class BasicModel extends \DB\Cortex {
return $this->load( $querySet, $options, $ttl );
}
/**
* Event "Hook" function
* can be overwritten
* return false will stop any further action
*/
public function beforeInsertEvent(){
return true;
}
/**
* function should be overwritten in child classes with access restriction
* @param $accessObject

View File

@@ -13,11 +13,11 @@ class CharacterLogModel extends BasicModel {
protected $table = 'character_log';
protected $fieldConf = array(
'characterId' => array(
protected $fieldConf = [
'characterId' => [
'belongs-to-one' => 'Model\CharacterModel'
)
);
]
];
/**
* get all character log data

View File

@@ -13,17 +13,17 @@ class CharacterModel extends BasicModel {
protected $table = 'character';
protected $fieldConf = array(
'corporationId' => array(
protected $fieldConf = [
'corporationId' => [
'belongs-to-one' => 'Model\CorporationModel'
),
'allianceId' => array(
],
'allianceId' => [
'belongs-to-one' => 'Model\AllianceModel'
),
'characterLog' => array(
'has-one' => array('Model\CharacterLogModel', 'characterId')
)
);
],
'characterLog' => [
'has-one' => ['Model\CharacterLogModel', 'characterId']
]
];
/**
* get character data
@@ -33,6 +33,7 @@ class CharacterModel extends BasicModel {
public function getData($addCharacterLogData = false){
// check if there is cached data
// temporary disabled (performance test)
$characterData = null; //$this->getCacheData();
if(is_null($characterData)){

View File

@@ -14,20 +14,20 @@ class ConnectionModel extends BasicModel{
protected $table = 'connection';
protected $fieldConf = array(
'mapId' => array(
protected $fieldConf = [
'mapId' => [
'belongs-to-one' => 'Model\MapModel'
),
'source' => array(
],
'source' => [
'belongs-to-one' => 'Model\SystemModel'
),
'target' => array(
],
'target' => [
'belongs-to-one' => 'Model\SystemModel'
),
'type' => array(
],
'type' => [
'type' => self::DT_JSON
)
);
]
];
/**
* set an array with all data for a system

View File

@@ -13,14 +13,14 @@ class CorporationMapModel extends BasicModel {
protected $table = 'corporation_map';
protected $fieldConf = array(
'corporationId' => array(
protected $fieldConf = [
'corporationId' => [
'belongs-to-one' => 'Model\CorporationModel'
),
'mapId' => array(
],
'mapId' => [
'belongs-to-one' => 'Model\MapModel'
)
);
]
];
/**
* see parent

View File

@@ -12,30 +12,30 @@ namespace Model;
class SystemModel extends BasicModel {
const MAX_POS_X = 2300;
const MAX_POS_Y = 500;
const MAX_POS_Y = 498;
protected $table = 'system';
protected $fieldConf = array(
'mapId' => array(
protected $fieldConf = [
'mapId' => [
'belongs-to-one' => 'Model\MapModel'
),
'typeId' => array(
],
'typeId' => [
'belongs-to-one' => 'Model\SystemTypeModel'
),
'statusId' => array(
],
'statusId' => [
'belongs-to-one' => 'Model\SystemStatusModel'
),
'createdCharacterId' => array(
],
'createdCharacterId' => [
'belongs-to-one' => 'Model\CharacterModel'
),
'updatedCharacterId' => array(
],
'updatedCharacterId' => [
'belongs-to-one' => 'Model\CharacterModel'
),
'signatures' => array(
'has-many' => array('Model\SystemSignatureModel', 'systemId')
),
);
],
'signatures' => [
'has-many' => ['Model\SystemSignatureModel', 'systemId']
],
];
/**
* set an array with all data for a system
@@ -230,7 +230,7 @@ class SystemModel extends BasicModel {
$signature = null;
if($this->hasAccess($accessObject)){
$this->filter('signatures', array('active = ? AND id = ?', 1, $id));
$this->filter('signatures', ['active = ? AND id = ?', 1, $id]);
if($this->signatures){
$signature = reset( $this->signatures );
}
@@ -249,7 +249,7 @@ class SystemModel extends BasicModel {
$signature = null;
if($this->hasAccess($accessObject)){
$this->filter('signatures', array('active = ? AND name = ?', 1, $name));
$this->filter('signatures', ['active = ? AND name = ?', 1, $name]);
if($this->signatures){
$signature = reset( $this->signatures );
}

View File

@@ -13,17 +13,17 @@ class SystemSignatureModel extends BasicModel {
protected $table = 'system_signature';
protected $fieldConf = array(
'systemId' => array(
protected $fieldConf = [
'systemId' => [
'belongs-to-one' => 'Model\SystemModel'
),
'createdCharacterId' => array(
],
'createdCharacterId' => [
'belongs-to-one' => 'Model\CharacterModel'
),
'updatedCharacterId' => array(
],
'updatedCharacterId' => [
'belongs-to-one' => 'Model\CharacterModel'
)
);
]
];
protected $validate = [
'name' => [

View File

@@ -13,14 +13,14 @@ class UserApiModel extends BasicModel {
protected $table = 'user_api';
protected $fieldConf = array(
'userId' => array(
protected $fieldConf = [
'userId' => [
'belongs-to-one' => 'Model\UserModel'
),
'userCharacters' => array(
'has-many' => array('Model\UserCharacterModel', 'apiId')
)
);
],
'userCharacters' => [
'has-many' => ['Model\UserCharacterModel', 'apiId']
]
];
/**
* get all data for this api

View File

@@ -13,17 +13,17 @@ class UserCharacterModel extends BasicModel {
protected $table = 'user_character';
protected $fieldConf = array(
'userId' => array(
protected $fieldConf = [
'userId' => [
'belongs-to-one' => 'Model\UserModel'
),
'apiId' => array(
],
'apiId' => [
'belongs-to-one' => 'Model\UserApiModel'
),
'characterId' => array(
],
'characterId' => [
'belongs-to-one' => 'Model\CharacterModel'
)
);
]
];
/**
* set an array with all data for a character

View File

@@ -13,14 +13,14 @@ class UserMapModel extends BasicModel {
protected $table = 'user_map';
protected $fieldConf = array(
'userId' => array(
protected $fieldConf = [
'userId' => [
'belongs-to-one' => 'Model\UserModel'
),
'mapId' => array(
],
'mapId' => [
'belongs-to-one' => 'Model\MapModel'
)
);
]
];
/**
* see parent

View File

@@ -10,6 +10,7 @@ namespace Model;
use DB\SQL\Schema;
use Controller;
use Exception;
class UserModel extends BasicModel {
@@ -82,7 +83,7 @@ class UserModel extends BasicModel {
// set active character with log data
$activeUserCharacter = $this->getActiveUserCharacter();
if($activeUserCharacter){
$userData->character = $activeUserCharacter->getData(true);
$userData->character = $activeUserCharacter->getData();
}
return $userData;
@@ -128,6 +129,28 @@ class UserModel extends BasicModel {
return \Bcrypt::instance()->hash($password, $salt);
}
/**
* check if new user registration is allowed
* @return bool
* @throws Exception\RegistrationException
*/
public function beforeInsertEvent(){
$registrationStatus = Controller\Controller::getRegistrationStatus();
switch($registrationStatus){
case 0:
$f3 = self::getF3();
throw new Exception\RegistrationException($f3->get('PATHFINDER.REGISTRATION.MSG_DISABLED'));
return false;
break;
case 1:
return true;
break;
default:
return false;
}
}
/**
* search for user by unique username
* @param $name
@@ -200,6 +223,12 @@ class UserModel extends BasicModel {
return $maps;
}
/**
* get mapModel by id and check if user has access
* @param $mapId
* @return null
* @throws \Exception
*/
public function getMap($mapId){
$map = self::getNew('MapModel');
$map->getById( (int)$mapId );
@@ -287,8 +316,6 @@ class UserModel extends BasicModel {
}
}
return $userCharacters;
}
@@ -386,7 +413,6 @@ class UserModel extends BasicModel {
$this->apis->current()->updateCharacters();
$this->apis->next();
}
}
}

136
app/pathfinder.ini Normal file
View File

@@ -0,0 +1,136 @@
[PATHFINDER]
NAME = "PATHFINDER"
; installed version (used for CSS/JS cache busting)
VERSION = "v0.0.3"
; contact information (DO NOT CHANGE)
CONTACT = "https://github.com/exodus4d"
; source code (DO NOT CHANGE)
REPO = "https://github.com/exodus4d/pathfinder"
; Max number of maps an entity can create
MAX_MAPS_PRIVATE = 3
MAX_MAPS_CORPORATION = 3
MAX_MAPS_ALLIANCE = 3
; Max number of shared entities per map
MAX_SHARED_USER = 10
MAX_SHARED_CORPORATION = 3
MAX_SHARED_ALLIANCE = 2
[PATHFINDER.ENVIRONMENT]
; project environment ("DEVELOP", "PRODUCTION").
; This affects: DB connection, JS build path
SERVER = "DEVELOP"
[PATHFINDER.ENVIRONMENT.DEVELOP]
BASE = /exodus4d/pathfinder
; deployment URL (what you type in the browser
URL = http://localhost/exodus4d/pathfinder
; Verbosity level of the stack trace
DEBUG = 3
; main db
PATH_JS = "js"
DB_DNS = mysql:host=localhost;port=3306;dbname=
DB_NAME = pathfinder
DB_USER = root
DB_PASS =
; EVE-Online CCP Database export
DB_CCP_DNS = mysql:host=localhost;port=3306;dbname=
DB_CCP_NAME = eve_test
DB_CCP_USER = root
DB_CCP_PASS =
[PATHFINDER.ENVIRONMENT.PRODUCTION]
BASE = /www/htdocs/w0128162/www.pathfinder.exodus4d.de
; deployment URL (what you type in the browser
URL = https://www.pathfinder.exodus4d.de
; Verbosity level of the stack trace
DEBUG = 0
; main db
PATH_JS = "build_js"
DB_DNS = mysql:host=localhost;port=3306;dbname=
DB_NAME = d01d8636
DB_USER = d01d8636
DB_PASS = bQ9VAd6fE86sVs4s
; EVE-Online CCP Database export
DB_CCP_DNS = mysql:host=localhost;port=3306;dbname=
DB_CCP_NAME = d01f20be
DB_CCP_USER = d01f20be
DB_CCP_PASS = 2gkBWs87zDcApH4A
; ======================================================================================================
[PATHFINDER.REGISTRATION]
; registration status (0=disabled, 1=enabled)
STATUS = 1
; disabled message
MSG_DISABLED = "User registration is currently not allowed"
; ======================================================================================================
; Lifetime for map types
[PATHFINDER.MAP.PRIVATE]
LIFETIME = 2
[PATHFINDER.MAP.CORPORATION]
LIFETIME = 99999
[PATHFINDER.MAP.ALLIANCE]
LIFETIME = 99999
; ======================================================================================================
[PATHFINDER.CACHE]
; cache character log informations in seconds. This is ignored if ship/system switch was detected
CHARACTER_LOG = 600
; cache time for all system data within a constellation (this will never change) 30d
CONSTELLATION_SYSTEMS = 2592000
; ======================================================================================================
[PATHFINDER.TIMER]
; login time (minutes)
LOGGED = 120
; double click timer (ms)
DBL_CLICK = 250
; time for status change visibility in header (ms)
PROGRAM_STATUS_VISIBLE = 5000
; get all client map data (ms)
[PATHFINDER.TIMER.GET_CLIENT_MAP_DATA]
EXECUTION_LIMIT = 50
; main map update ping (ajax) (ms)
[PATHFINDER.TIMER.UPDATE_SERVER_MAP]
DELAY = 5000
EXECUTION_LIMIT = 200
; update client map data (ms)
[PATHFINDER.TIMER.UPDATE_CLIENT_MAP]
EXECUTION_LIMIT = 50
; map user update ping (ajax) (ms)
[PATHFINDER.TIMER.UPDATE_SERVER_USER_DATA]
DELAY = 5000
EXECUTION_LIMIT = 200
; update client user data (ms)
[PATHFINDER.TIMER.UPDATE_CLIENT_USER_DATA]
EXECUTION_LIMIT = 50
; ======================================================================================================
[PATHFINDER.LOGFILES]
; just for manuel debug during development
DEBUG = "debug"
; user login information
LOGIN = "login"
[PATHFINDER.API]
; Path for CCPs XML APIv2
CCP_XML = "https://api.eveonline.com"

View File

@@ -4,7 +4,7 @@
GET|POST @landing: /= Controller\AppController->showLandingpage, 0
GET|POST @map: /map= Controller\MapController->showMap, 0
; ajax wildcard APIs
; ajax wildcard APIs (throttled)
GET|POST /api/@controller/@action [ajax] = Controller\Api\@controller->@action, 0, 512
GET|POST /api/@controller/@action/@arg1 [ajax] = Controller\Api\@controller->@action, 0, 512
GET|POST /api/@controller/@action/@arg1/@arg2 [ajax] = Controller\Api\@controller->@action, 0, 512

View File

@@ -1,7 +1,6 @@
# Compass 1.0.1 (Polaris)
require 'compass/import-once/activate'
require 'bootstrap-sass'
require 'compass/import-once/activate'
# Require any additional compass plugins here.

View File

@@ -8,10 +8,19 @@ $f3->config('app/config.ini');
// load route config
$f3->config('app/routes.ini');
// load pathfinder config
$f3->config('app/pathfinder.ini');
// load cron config
$f3->config('app/cron.ini');
// set base dir
$f3->set('BASE', \Controller\Controller::getEnvironmentData('BASE'));
// set debug level (stacktrace)
$f3->set('DEBUG', \Controller\Controller::getEnvironmentData('DEBUG'));
// initiate cron-jobs
Cron::instance();
$f3->run();
$f3->run();

View File

@@ -1,12 +1,24 @@
// main script path
var mainScriptPath = document.body.getAttribute('data-script');
// js baseURL. Depends on the environment.
// e.g. use raw files (develop) or build files (production)
var jsBaseUrl = document.body.getAttribute('data-js-path');
// requireJs configuration
requirejs.config({
baseUrl: 'js', // user build_js files, change to "js" for un-compressed source
baseUrl: 'js', // path for baseUrl - dynamically set !below! ("build_js" | "js")
paths: {
layout: 'layout',
config: 'app/config', // path for "configuration" files dir
dialog: 'app/ui/dialog', // path for "dialog" files dir
// main views
landingpage: './app/landingpage', // initial start "landing page" view
mappage: './app/mappage', // initial start "map page" view
jquery: 'lib/jquery-1.11.3.min', // v1.11.3 jQuery
//jquery: "lib/jquery-2.1.1.min", // v2.1.1 jQuery
bootstrap: 'lib/bootstrap.min', // v3.3.0 Bootstrap js code - http://getbootstrap.com/javascript/
text: 'lib/requirejs/text', // v2.0.12 A RequireJS/AMD loader plugin for loading text resources.
mustache: 'lib/mustache.min', // v1.0.0 Javascript template engine - http://mustache.github.io/
@@ -18,7 +30,7 @@ requirejs.config({
jsPlumb: 'lib/dom.jsPlumb-1.7.6-min', // v1.7.6 jsPlumb (Vanilla)- main map draw plugin https://jsplumbtoolkit.com/
customScrollbar: 'lib/jquery.mCustomScrollbar.concat.min', // v3.0.9 Custom scroll bars - http://manos.malihu.gr/
datatables: 'lib/datatables/jquery.dataTables.min', // v1.10.7 DataTables - https://datatables.net/
datatablesBootstrap: 'lib/datatables/dataTables.bootstrap', // DataTables - not used (bootstrap style)
//datatablesBootstrap: 'lib/datatables/dataTables.bootstrap', // DataTables - not used (bootstrap style)
datatablesResponsive: 'lib/datatables/extensions/responsive/dataTables.responsive', // v1.0.6 TableTools (PlugIn) - https://datatables.net/extensions/responsive/
datatablesTableTools: 'lib/datatables/extensions/tabletools/js/dataTables.tableTools', // v2.2.3 TableTools (PlugIn) - https://datatables.net/extensions/tabletools/
@@ -39,7 +51,6 @@ requirejs.config({
bootstrapConfirmation: 'lib/bootstrap-confirmation', // v1.0.1 Bootstrap extension for inline confirm dialog - https://github.com/tavicu/bs-confirmation
bootstrapToggle: 'lib/bootstrap2-toggle.min', // v2.2.0 Bootstrap Toggle (Checkbox) - http://www.bootstraptoggle.com/
// header animation
easePack: 'lib/EasePack.min',
tweenLite: 'lib/TweenLite.min',
@@ -131,7 +142,12 @@ requirejs.config({
}
});
var mainScriptPath = document.body.getAttribute('data-script');
// switch baseUrl to js "build_js" in production environment
// this has no effect for js build process!
// check build.js for build configuration
require.config({
baseUrl: jsBaseUrl
});
// load the main app module in order to start the app
// load the main app module -> initial app start
requirejs( [mainScriptPath] );

View File

@@ -15,7 +15,8 @@ define([
'app/ui/demo_map',
'dialog/account_settings',
'dialog/notification',
'dialog/manual'
'dialog/manual',
'dialog/credit'
], function($, Init, Util, Render, CCP, Gallery, bootbox) {
'use strict';
@@ -35,7 +36,8 @@ define([
// navigation
navigationElementId: 'pf-navbar', // id for navbar element
navigationLinkManualClass: 'pf-navbar-manual', // class for the "manual" trigger link
navigationLinkManualClass: 'pf-navbar-manual', // class for "manual" trigger link
navigationLinkLicenseClass : 'pf-navbar-license', // class for "license" trigger link
// login form
loginFormId: 'pf-login-form', // id for login form
@@ -102,7 +104,7 @@ define([
loginFormMessageContainer.showMessage({title: 'Login failed', text: ' Invalid username and password', type: 'error'});
}else if(data.reroute !== undefined){
window.location = Util.buildUrl(data.reroute);
window.location = data.reroute;
}
}).fail(function( jqXHR, status, error) {
$('.' + config.splashOverlayClass).hideSplashOverlay();
@@ -118,22 +120,26 @@ define([
});
// manual -------------------------------------------------------
$('.' + config.navigationLinkManualClass).on('click', function(){
$('.' + config.navigationLinkManualClass).on('click', function(e){
e.preventDefault();
$.fn.showMapManual();
});
// license ------------------------------------------------------
$('.' + config.navigationLinkLicenseClass).on('click', function(e){
e.preventDefault();
$.fn.showCreditsDialog(false, true);
});
// tooltips -----------------------------------------------------
/*
var mapTooltipOptions = {
toggle: 'tooltip',
placement: 'top',
container: 'body',
delay: 150
};
$('[title]').tooltip(mapTooltipOptions);
*/
$('[title]').not('.slide img').tooltip(mapTooltipOptions);
};
@@ -184,7 +190,7 @@ define([
// initialize carousel ------------------------------------------
var carousel = Gallery([
{
title: '',
title: 'IGB',
href: 'ui/map',
type: 'text/html'
},
@@ -347,9 +353,11 @@ define([
*/
$(function(){
// show app information in browser console
Util.showVersionInfo();
// show log off message
var isLogOut = location.search.split('logout')[1];
if(isLogOut !== undefined){
// show logout dialog
var options = {

View File

@@ -2,7 +2,10 @@
* context menu
*/
define(['jquery'], function($) {
define([
'jquery',
'app/ccp'
], function($, CCP) {
'use strict';
@@ -42,10 +45,10 @@ define(['jquery'], function($) {
left: getLeftLocation(originalEvent),
top: getTopLocation(originalEvent)
}).velocity('transition.flipXIn', {
duration: 150,
duration: CCP.isInGameBrowser() ? 0 : 150,
complete: function(){
// set context menu "click" observer
$(this).one('click', {component: component, position:{x: getLeftLocation(originalEvent), y: getTopLocation(originalEvent)}}, function (e) {
$(this).off('click').one('click', {component: component, position:{x: getLeftLocation(originalEvent), y: getTopLocation(originalEvent)}}, function (e) {
// hide contextmenu
$(this).hide();
@@ -64,7 +67,7 @@ define(['jquery'], function($) {
//make sure menu closes on any click
$(document).one('click.closeContextmenu', function () {
$('.dropdown-menu[role="menu"]').velocity('transition.flipXOut', {
duration: 150
duration: CCP.isInGameBrowser() ? 0 : 150
});
});

View File

@@ -838,7 +838,7 @@ define([
overlayElements.css('opacity', 0);
systemElements.velocity('transition.whirlIn', {
stagger: 50,
stagger: 30,
drag: true,
duration: 100,
//display: 'auto',
@@ -849,8 +849,8 @@ define([
});
connectorElements.velocity('transition.fadeIn', {
stagger: 50,
duration: 180
stagger: 30,
duration: 120
});
// show overlay elements (if some exist)
@@ -895,7 +895,7 @@ define([
});
systemElements.delay(100).velocity('transition.slideUpOut', {
stagger: 50,
stagger: 30,
drag: true,
duration: 180,
display: 'block',
@@ -1032,18 +1032,22 @@ define([
type: 'POST',
url: Init.path.deleteSystem,
data: requestData,
dataType: 'json'
}).done(function(data){
dataType: 'json',
context: {
map: map,
systems: systems
}
}).done(function(){
// deleted SystemIds
var triggerData = {
systemIds: []
};
// remove systems from map
for(var i = 0; i < systems.length; i++){
var system = $(systems[i]);
for(var i = 0; i < this.systems.length; i++){
var system = $(this.systems[i]);
triggerData.systemIds.push( system.data('id') );
removeSystem(map, system );
removeSystem(this.map, system );
}
callback();
@@ -1246,11 +1250,12 @@ define([
type: 'POST',
url: Init.path.saveConnection,
data: requestData,
dataType: 'json'
dataType: 'json',
context: connection
}).done(function(newConnectionData){
// update connection data e.g. "scope" has auto detected
updateConnection(connection, connectionData, newConnectionData);
updateConnection(this, connectionData, newConnectionData);
// connection scope
var scope = Util.getScopeInfoForConnection(newConnectionData.scope, 'label');
@@ -1264,7 +1269,7 @@ define([
}).fail(function( jqXHR, status, error) {
// remove this connection from map
connection._jsPlumb.instance.detach(connection);
this._jsPlumb.instance.detach(this);
var reason = status + ' ' + error;
Util.showNotify({title: jqXHR.status + ': saveConnection', text: reason, type: 'warning'});
@@ -1316,11 +1321,12 @@ define([
type: 'POST',
url: Init.path.deleteConnection,
data: requestData,
dataType: 'json'
dataType: 'json',
context: connections
}).done(function(data){
// remove connections from map
removeConnections(connections);
removeConnections(this);
// optional callback
if(callback){
@@ -1798,7 +1804,7 @@ define([
// context menu =====================================================================================
// trigger context menu
system.on('contextmenu', function(e){
system.off('contextmenu').on('contextmenu', function(e){
e.preventDefault();
e.stopPropagation();
@@ -1904,8 +1910,7 @@ define([
var systemName = currentSystem.getSystemInfo(['alias']);
deleteSystems(map, [currentSystem], function(){
// callback function after delete -> close dialog
$(systemDeleteDialog).modal('hide');
bootbox.hideAll();
Util.showNotify({title: 'System deleted', text: systemName, type: 'success'});
});
@@ -2375,7 +2380,7 @@ define([
});
// catch menu events ====================================================
// catch events =========================================================
// toggle "snap to grid" option
$(mapContainer).on('pf:menuGrid', function(e, data){
@@ -2403,7 +2408,12 @@ define([
}
Util.showNotify({title: 'Grid snapping', text: notificationText, type: 'info'});
});
// delete system event
// triggered from "map info" dialog scope
$(mapContainer).on('pf:deleteSystems', function(e, data){
deleteSystems(map, data.systems, data.callback);
});
$(mapContainer).on('pf:menuSelectSystem', function(e, data){
@@ -2419,7 +2429,6 @@ define([
// select system
system.showSystemInfo(map);
}
});
@@ -2544,9 +2553,7 @@ define([
// get invisible menu entries
var hideOptions = getHiddenContextMenuOptions(component);
var activeOptions = getActiveContextMenuOptions(component);
$(e.target).trigger('pf:openContextMenu', [e, component, hideOptions, activeOptions]);
return false;
@@ -2556,7 +2563,6 @@ define([
* init context menu for all connections
* must be triggered manually on demand
*/
$(connection.canvas).contextMenu({
menuSelector: "#" + config.connectionContextMenuId,
menuSelected: function (params){
@@ -2726,10 +2732,7 @@ define([
buttons: {
close: {
label: 'cancel',
className: 'btn-default',
callback: function(){
$(systemDialog).modal('hide');
}
className: 'btn-default'
},
success: {
label: '<i class="fa fa-fw fa-check"></i> save',
@@ -2788,7 +2791,7 @@ define([
};
saveSystem(map, requestData, sourceSystem, function(){
$(systemDialog).modal('hide');
bootbox.hideAll();
});
return false;
}
@@ -2803,7 +2806,7 @@ define([
// init system select live search - some delay until modal transition has finished
var selectElement = modalContent.find('.' + config.systemDialogSelectClass);
selectElement.delay(200).initSystemSelect({
selectElement.delay(240).initSystemSelect({
key: 'systemId',
disabledOptions: mapSystemIds
});
@@ -2837,11 +2840,15 @@ define([
type: 'POST',
url: Init.path.saveSystem,
data: requestData,
dataType: 'json'
dataType: 'json',
context: {
map: map,
sourceSystem: sourceSystem
}
}).done(function(newSystemData){
// draw new system to map
drawSystem(map, newSystemData, sourceSystem);
drawSystem(this.map, newSystemData, this.sourceSystem);
Util.showNotify({title: 'New system', text: newSystemData.name, type: 'success'});
@@ -3274,7 +3281,7 @@ define([
outlineWidth: 2 // width of the outline for an Endpoint or Connector. An integer.
},
Connector:[ 'Bezier', { curviness: 40 } ], // default connector style (this is not used!) all connections have their own style (by scope)
Endpoints: [ [ 'Dot', { radius: 6 } ], [ 'Dot', { radius: 6 } ] ],
Endpoints: [ [ 'Dot', { radius: 5 } ], [ 'Dot', { radius: 5 } ] ],
// Endpoint: 'Blank', // does not work... :(
ReattachConnections: false, // re-attach connection if dragged with mouse to "nowhere"
Scope: Init.defaultMapScope, // default map scope for connections

284
js/app/mappage.js Normal file
View File

@@ -0,0 +1,284 @@
/**
* Main map application
*/
define([
'jquery',
'app/init',
'app/util',
'app/render',
'app/logging',
'app/ccp',
'app/page',
'app/ui/form_element',
'app/module_map'
], function($, Init, Util, Render, Logging, CCP, Page) {
'use strict';
$(function(){
// load page
$('body').loadPageStructure();
// show app information in browser console
Util.showVersionInfo();
// init logging
Logging.init();
if( !CCP.isTrusted() ){
// show trust message
$(document).trigger('pf:showTrustDialog');
return;
}
var mapModule = $('#' + Util.config.mapModuleId);
// map init load static data =======================================================
$.getJSON( Init.path.initMap, function( initData ) {
Init.timer = initData.timer;
Init.mapTypes = initData.mapTypes;
Init.mapScopes = initData.mapScopes;
Init.connectionScopes = initData.connectionScopes;
Init.systemStatus = initData.systemStatus;
Init.systemType = initData.systemType;
Init.characterStatus = initData.characterStatus;
Init.maxSharedCount = initData.maxSharedCount;
// init tab change observer, Once the timers are available
Page.initTabChangeObserver();
// init map module
mapModule.initMapModule();
}).fail(function( jqXHR, status, error) {
var reason = status + ' ' + jqXHR.status + ': ' + error;
$(document).trigger('pf:shutdown', {reason: reason});
});
/**
* main function for init all map relevant trigger calls
*/
$.fn.initMapModule = function(){
var mapModule = $(this);
// log keys ------------------------------------------------------------------------
// get map data from client
var logKeyGetClientMapData = 'GET_CLIENT_MAP_DATA';
// ajax request update map data
var logKeyServerMapData = 'UPDATE_SERVER_MAP';
// update client map data
var logKeyClientMapData = 'UPDATE_CLIENT_MAP';
// ajax request update map user data
var logKeyServerUserData = 'UPDATE_SERVER_USER_DATA';
// update client map user data
var logKeyClientUserData = 'UPDATE_CLIENT_USER_DATA';
// main update intervals/trigger (heartbeat)
var updateTimeouts = {
mapUpdate: 0,
userUpdate: 0
};
// ping for main map update ========================================================
var triggerMapUpdatePing = function(){
// check each execution time if map module is still available
var check = $('#' + mapModule.attr('id')).length;
if(check === 0){
// program crash stop any update
return;
}
// get updated map data
Util.timeStart(logKeyGetClientMapData);
var updatedMapData = mapModule.getMapModuleDataForUpdate();
var mapDataLogDuration = Util.timeStop(logKeyGetClientMapData);
// log execution time
Util.log(logKeyGetClientMapData, {duration: mapDataLogDuration, type: 'client', description: 'get client data'});
// wrap array to object
updatedMapData = {mapData: updatedMapData};
// start log
Util.timeStart(logKeyServerMapData);
// store updatedMapData
$.ajax({
type: 'POST',
url: Init.path.updateMapData,
data: updatedMapData,
dataType: 'json'
}).done(function(data){
// log request time
var duration = Util.timeStop(logKeyServerMapData);
Util.log(logKeyServerMapData, {duration: duration, type: 'server', description: 'request map data'});
if(
data.error &&
data.error.length > 0
){
// any error in the main trigger functions result in a user log-off
$(document).trigger('pf:menuLogout');
}else{
$(document).setProgramStatus('online');
if(data.mapData.length === 0){
// no map data available -> show "new map" dialog
$(document).trigger('pf:menuShowMapSettings', {tab: 'new'});
}else{
// map data found
// start log
Util.timeStart(logKeyClientMapData);
// load/update main map module
mapModule.updateMapModule(data.mapData);
// log client map update time
duration = Util.timeStop(logKeyClientMapData);
Util.log(logKeyClientMapData, {duration: duration, type: 'client', description: 'update map'});
}
// get the current update delay (this can change if a user is inactive)
var mapUpdateDelay = Util.getCurrentTriggerDelay( logKeyServerMapData, 0 );
// init new trigger
updateTimeouts.mapUpdate = setTimeout(function(){
triggerMapUpdatePing();
}, mapUpdateDelay);
// initial start for the userUpdate trigger
// this should only be called at the first time!
if(updateTimeouts.userUpdate === 0){
// start user update trigger after map loaded
updateTimeouts.userUpdate = setTimeout(function(){
triggerUserUpdatePing();
}, 3000);
}
}
}).fail(function( jqXHR, status, error) {
// clear both main update request trigger timer
clearUpdateTimeouts();
var reason = status + ' ' + jqXHR.status + ': ' + error;
$(document).trigger('pf:shutdown', {reason: reason});
});
};
// ping for user data update =======================================================
var triggerUserUpdatePing = function(){
// IMPORTANT: Get user data for ONE map that is currently visible
// On later releases this can be easy changed to "full update" all maps for a user
//
var mapIds = [];
var activeMap = Util.getMapModule().getActiveMap();
if(activeMap){
mapIds = [ activeMap.data('id') ];
}
var updatedUserData = {
mapIds: mapIds,
systemData: Util.getCurrentSystemData()
};
Util.timeStart(logKeyServerUserData);
$.ajax({
type: 'POST',
url: Init.path.updateUserData,
data: updatedUserData,
dataType: 'json'
}).done(function(data){
// log request time
var duration = Util.timeStop(logKeyServerUserData);
Util.log(logKeyServerUserData, {duration: duration, type: 'server', description:'request user data'});
if(data.error.length > 0){
// any error in the main trigger functions result in a user log-off
$(document).trigger('pf:menuLogout');
}else{
$(document).setProgramStatus('online');
if(data.userData !== undefined){
// store current user data global (cache)
var userData = Util.setCurrentUserData(data.userData);
if(userData.character === undefined){
// no active character found -> show settings dialog
Util.showNotify({title: 'No main character found', text: 'Set up your main character', type: 'error'});
$(document).triggerMenuEvent('ShowSettingsDialog');
}
// start log
Util.timeStart(logKeyClientUserData);
// active character data found
mapModule.updateMapModuleData(data);
// log client user data update time
duration = Util.timeStop(logKeyClientUserData);
Util.log(logKeyClientUserData, {duration: duration, type: 'client', description:'update users'});
// get the current update delay (this can change if a user is inactive)
var mapUserUpdateDelay = Util.getCurrentTriggerDelay( logKeyServerUserData, 0 );
// init new trigger
updateTimeouts.userUpdate = setTimeout(function(){
triggerUserUpdatePing();
}, mapUserUpdateDelay);
}
}
}).fail(function( jqXHR, status, error) {
// clear both main update request trigger timer
clearUpdateTimeouts();
var reason = status + ' ' + jqXHR.status + ': ' + error;
$(document).trigger('pf:shutdown', {reason: reason});
});
};
/**
* clear both main update timeouts
* -> stop program from working -> shutdown
*/
var clearUpdateTimeouts = function(){
for(var intervalKey in updateTimeouts) {
if(updateTimeouts.hasOwnProperty(intervalKey)){
clearTimeout( updateTimeouts[intervalKey] );
}
}
};
// initial start of the map update function
triggerMapUpdatePing();
};
});
});

View File

@@ -2,12 +2,14 @@ define([
'jquery',
'app/init',
'app/util',
'app/counter',
'app/ui/system_info',
'app/ui/system_graph',
'app/ui/system_signature',
'app/ui/system_route',
'app/ui/system_killboard',
'datatablesTableTools',
'datatablesResponsive',
'app/map/map'
], function($, Init, Util) {

View File

@@ -232,7 +232,7 @@ define([
if(register){
if(reroutePath !== undefined){
// root user to main app
window.location = Util.buildUrl(reroutePath);
window.location = reroutePath;
}
}else{
// close dialog
@@ -330,7 +330,7 @@ define([
}
});
Util.showNotify({title: 'Account data saved', type: 'success'});
Util.showNotify({title: 'Account saved', type: 'success'});
}
}).fail(function( jqXHR, status, error) {

View File

@@ -21,12 +21,13 @@ define([
/**
* show jump info dialog
*/
$.fn.showCreditsDialog = function(){
$.fn.showCreditsDialog = function(callback, enableHover){
requirejs(['text!templates/dialog/credit.html', 'mustache'], function(template, Mustache) {
var data = {
logoContainerId: config.creditsDialogLogoContainerId
logoContainerId: config.creditsDialogLogoContainerId,
version: $('body').data('version')
};
var content = Mustache.render(template, data);
@@ -41,7 +42,7 @@ define([
creditDialog.on('shown.bs.modal', function(e) {
// load Logo svg
$('#' + config.creditsDialogLogoContainerId).drawLogo();
creditDialog.find('#' + config.creditsDialogLogoContainerId).drawLogo(callback, enableHover);
});
});

View File

@@ -26,6 +26,8 @@ define([
tableActionCellClass: 'pf-table-action-cell', // class for table "action" cells
tableCounterCellClass: 'pf-table-counter-cell', // cell for table "counter" cells
systemIdPrefix: 'pf-system-', // id prefix for a system
loadingOptions: { // config for loading overlay
icon: {
size: 'fa-2x'
@@ -33,6 +35,18 @@ define([
}
};
// confirmation dialog settings (e.g. delete row)
var confirmationSettings = {
container: 'body',
placement: 'left',
btnCancelClass: 'btn btn-sm btn-default',
btnCancelLabel: 'cancel',
btnCancelIcon: 'fa fa-fw fa-ban',
btnOkClass: 'btn btn-sm btn-danger',
btnOkLabel: 'delete',
btnOkIcon: 'fa fa-fw fa-close'
};
/**
* loads the map info data into an element
* @param mapData
@@ -132,80 +146,159 @@ define([
systemsElement.showLoadingAnimation(config.loadingOptions);
// table init complete
systemTable.on( 'init.dt', function () {
systemsElement.hideLoadingAnimation();
// init table tooltips
var tooltipElements = systemsElement.find('[data-toggle="tooltip"]');
tooltipElements.tooltip();
});
// prepare data for dataTables
var systemsData = [];
for(var i = 0; i < mapData.data.systems.length; i++){
var tempSystemData = mapData.data.systems[i];
var tempData = [];
var tempData = {};
// system id
tempData.id = tempSystemData.id;
// current position
if(tempSystemData.currentUser === true){
tempData.push( '<i class="fa fa fa-map-marker fa-lg fa-fw"></i>' );
tempData.position = {
position: '<i class="fa fa fa-map-marker fa-lg fa-fw"></i>',
position_sort: 1
};
}else{
tempData.push( '' );
tempData.position = {
position: '',
position_sort: 0
};
}
// active pilots
if(tempSystemData.userCount > 0){
tempData.push(tempSystemData.userCount);
tempData.userCount = tempSystemData.userCount;
}else{
tempData.push( '' );
tempData.userCount = '';
}
// type
tempData.push(Util.getSystemTypeInfo(tempSystemData.type.id, 'name'));
tempData.type = {
type: Util.getSystemTypeInfo(tempSystemData.type.id, 'name'),
type_sort: tempSystemData.type.id
};
// name
tempData.push( tempSystemData.name );
tempData.name = tempSystemData.name;
// region
tempData.region = tempSystemData.region.name;
// static
var statics = [];
for(var j = 0; j < tempSystemData.statics.length; j++){
var security = tempSystemData.statics[j].security;
var secClass = Util.getSecurityClassForSystem(security);
statics.push('<span class="' + secClass + '">' + security + '</span>');
}
tempData.static = statics.join('&nbsp;&nbsp;');
// status
var systemStatusClass = Util.getStatusInfoForSystem(tempSystemData.status.id, 'class');
if(systemStatusClass !== ''){
tempData.push( '<i class="fa fa fa-square-o fa-lg fa-fw ' + systemStatusClass + '"></i>' );
tempData.status = {
status: '<i class="fa fa fa-square-o fa-lg fa-fw ' + systemStatusClass + '"></i>',
status_sort: tempSystemData.status.id
};
}else{
tempData.push( '' );
tempData.status = {
status: '',
status_sort: tempSystemData.status.id
};
}
// effect
var systemEffectClass = Util.getEffectInfoForSystem(tempSystemData.effect, 'class');
if(systemEffectClass !== ''){
tempData.push( '<i class="fa fa fa-square fa-lg fa-fw ' + systemEffectClass + '"></i>' );
tempData.effect = {
effect: '<i class="fa fa fa-square fa-lg fa-fw ' + systemEffectClass + '"></i>',
effect_sort: tempSystemData.effect
};
}else{
tempData.push( '' );
tempData.effect = {
effect: '',
effect_sort: ''
};
}
// trueSec
var systemTrueSecClass = Util.getTrueSecClassForSystem(tempSystemData.trueSec);
if(systemTrueSecClass !== ''){
tempData.push( '<span class="' + systemTrueSecClass + '">' + tempSystemData.trueSec.toFixed(1) + '</span>' );
tempData.trueSec = {
trueSec: '<span class="' + systemTrueSecClass + '">' + tempSystemData.trueSec.toFixed(1) + '</span>',
trueSec_sort: tempSystemData.trueSec
};
}else{
tempData.push( '' );
tempData.trueSec = {
trueSec: '',
trueSec_sort: tempSystemData.trueSec
};
}
// locked
if(tempSystemData.locked === 1){
tempData.push( '<i class="fa fa-lock fa-lg fa-fw"></i>' );
tempData.locked = {
locked: '<i class="fa fa-lock fa-lg fa-fw"></i>',
locked_sort: tempSystemData.locked
};
}else{
tempData.push( '' );
tempData.locked = {
locked: '',
locked_sort: 0
};
}
// rally point
if(tempSystemData.rally === 1){
tempData.push( '<i class="fa fa-users fa-lg fa-fw"></i>' );
tempData.rally = {
rally: '<i class="fa fa-users fa-lg fa-fw"></i>',
rally_sort: tempSystemData.rally
};
}else{
tempData.push( '' );
tempData.rally = {
rally: '',
rally_sort: 0
};
}
// updated
tempData.updated = tempSystemData.updated.updated;
// delete row
tempData.clear = '<i class="fa fa-close txt-color txt-color-redDarker"></i>';
systemsData.push(tempData);
}
var systemsDataTable = systemTable.dataTable( {
paging: false,
pageLength: 20,
paging: true,
lengthMenu: [[5, 10, 20, 50, -1], [5, 10, 20, 50, 'All']],
ordering: true,
order: [ 0, 'desc' ],
order: [[ 7, 'desc' ], [ 2, 'asc' ]],
autoWidth: false,
responsive: {
breakpoints: [
{ name: 'desktop', width: Infinity },
{ name: 'tablet', width: 1200 },
{ name: 'fablet', width: 780 },
{ name: 'phone', width: 480 }
],
details: false
},
hover: false,
data: systemsData,
columnDefs: [],
@@ -217,52 +310,144 @@ define([
},
columns: [
{
title: '<i class="fa fa fa-map-marker fa-lg"></i>',
width: '15px',
searchable: false
},{
title: '<i class="fa fa fa-plane fa-lg"></i>',
width: '18px',
searchable: false
},{
title: 'type',
width: '50px'
width: '25px',
className: ['min-desktop'].join(' '),
data: 'type',
render: {
_: 'type',
sort: 'type_sort'
}
},{
title: 'system'
},{
title: 'status',
width: '30px',
class: 'text-center',
orderable: false,
searchable: false
},{
title: 'effect',
width: '30px',
class: 'text-center',
orderable: false,
searchable: false
},{
title: 'sec.',
width: '20px',
class: 'text-center',
orderable: false,
searchable: false
},{
title: '<i class="fa fa-lock fa-lg fa-fw"></i>',
width: '30px',
class: 'text-center',
searchable: false
},{
title: '<i class="fa fa-users fa-lg fa-fw"></i>',
width: '30px',
title: 'sec',
width: '18px',
className: 'text-center',
searchable: false
searchable: false,
data: 'trueSec',
render: {
_: 'trueSec',
sort: 'trueSec_sort'
}
},{
title: 'system',
data: 'name'
},{
title: 'region',
data: 'region'
},{
title: '<i class="fa fa-square-o fa-lg" title="system&nbsp;status" data-toggle="tooltip"></i>',
width: '12px',
searchable: false,
data: 'status',
render: {
_: 'status',
sort: 'status_sort'
}
},{
title: '<i class="fa fa-square fa-lg" title="system&nbsp;effect" data-toggle="tooltip"></i>',
width: '12px',
className: 'text-center',
searchable: false,
data: 'effect',
render: {
_: 'effect',
sort: 'effect_sort'
}
},{
title: 'static',
width: '30px',
data: 'static'
},{
title: '<i class="fa fa-map-marker fa-lg" title="your&nbsp;position" data-toggle="tooltip"></i>',
width: '8px',
searchable: false,
data: 'position',
render: {
_: 'position',
sort: 'position_sort'
}
},{
title: '<i class="fa fa-plane fa-lg" title="active&nbsp;pilots" data-toggle="tooltip"></i>',
width: '12px',
className: 'text-center',
searchable: false,
data: 'userCount'
},{
title: '<i class="fa fa-lock fa-lg" title="system&nbsp;locked" data-toggle="tooltip"></i>',
width: '10px',
searchable: false,
data: 'locked',
render: {
_: 'locked',
sort: 'locked_sort'
}
},{
title: '<i class="fa fa-users fa-lg fa-fw" title="rally&nbsp;point" data-toggle="tooltip"></i>',
width: '15px',
className: ['min-desktop'].join(' '),
searchable: false,
data: 'rally',
render: {
_: 'rally',
sort: 'rally_sort'
}
},{
title: 'updated',
width: '80px',
searchable: false,
className: ['text-right', config.tableCounterCellClass, 'min-desktop'].join(' '),
data: 'updated',
createdCell: function(cell, cellData, rowData, rowIndex, colIndex){
$(cell).initTimestampCounter();
// highlight cell
var diff = new Date().getTime() - cellData * 1000;
var dateDiff = new Date(diff);
if(dateDiff.getUTCDate() > 1){
$(cell).addClass('txt-color txt-color-warning');
}
}
},{
title: '',
orderable: false,
searchable: false,
width: '10px',
className: ['text-center', config.tableActionCellClass].join(' '),
data: 'clear',
createdCell: function(cell, cellData, rowData, rowIndex, colIndex) {
var tempTableElement = this;
var tempConfirmationSettings = confirmationSettings;
tempConfirmationSettings.title = 'Delete system';
tempConfirmationSettings.onConfirm = function(e, target){
var deleteRowElement = $(target).parents('tr');
var activeMap = Util.getMapModule().getActiveMap();
var systemElement = $('#' + config.systemIdPrefix + mapData.config.id + '-' + rowData.id);
if(systemElement){
// trigger system delete event
activeMap.trigger('pf:deleteSystems', [{
systems: [systemElement],
callback: function(){
// callback function after ajax "delete" success
// remove table row
tempTableElement.DataTable().rows(deleteRowElement).remove().draw();
Util.showNotify({title: 'System deleted', text: rowData.name, type: 'success'});
}
}]);
}
};
// init confirmation dialog
$(cell).confirmation(tempConfirmationSettings);
}
}
]
});
systemsElement.hideLoadingAnimation();
};
/**
@@ -281,6 +466,11 @@ define([
connectionsElement.showLoadingAnimation(config.loadingOptions);
// table init complete
connectionTable.on( 'init.dt', function () {
connectionsElement.hideLoadingAnimation();
});
// connections table ==================================================
// prepare data for dataTables
@@ -292,7 +482,10 @@ define([
tempConData.id = tempConnectionData.id;
tempConData.scope = Util.getScopeInfoForConnection( tempConnectionData.scope, 'label');
tempConData.scope = {
scope: Util.getScopeInfoForConnection(tempConnectionData.scope, 'label'),
scope_sort: tempConnectionData.scope
};
// source system name
tempConData.source = tempConnectionData.sourceName;
@@ -319,7 +512,9 @@ define([
}
var connectionDataTable = connectionTable.dataTable( {
paging: false,
pageLength: 20,
paging: true,
lengthMenu: [[5, 10, 20, 50, -1], [5, 10, 20, 50, 'All']],
ordering: true,
order: [ 0, 'desc' ],
autoWidth: false,
@@ -336,15 +531,19 @@ define([
{
title: 'scope',
width: '50px',
orderable: false,
data: 'scope'
orderable: true,
data: 'scope',
render: {
_: 'scope',
sort: 'scope_sort'
}
},{
title: 'source system',
data: 'source'
},{
title: 'connection',
width: '80px',
class: 'text-center',
className: 'text-center',
orderable: false,
searchable: false,
data: 'connection'
@@ -353,57 +552,51 @@ define([
data: 'target'
},{
title: 'updated',
width: '90px',
width: '80px',
searchable: false,
className: [config.tableCounterCellClass, 'min-tablet-l'].join(' '),
className: ['text-right', config.tableCounterCellClass].join(' '),
data: 'updated',
createdCell: function(cell, cellData, rowData, rowIndex, colIndex){
$(cell).initTimestampCounter();
// highlight cell
var diff = new Date().getTime() - cellData * 1000;
var dateDiff = new Date(diff);
if(dateDiff.getUTCDate() > 1){
$(cell).addClass('txt-color txt-color-warning');
}
}
},{
title: '',
orderable: false,
searchable: false,
width: '10px',
class: ['text-center', config.tableActionCellClass].join(' '),
className: ['text-center', config.tableActionCellClass].join(' '),
data: 'clear',
createdCell: function(cell, cellData, rowData, rowIndex, colIndex) {
var tempTableElement = this;
var confirmationSettings = {
container: 'body',
placement: 'left',
btnCancelClass: 'btn btn-sm btn-default',
btnCancelLabel: 'cancel',
btnCancelIcon: 'fa fa-fw fa-ban',
title: 'Delete connection',
btnOkClass: 'btn btn-sm btn-danger',
btnOkLabel: 'delete',
btnOkIcon: 'fa fa-fw fa-close',
onConfirm : function(e, target){
var deleteRowElement = $(target).parents('tr');
var tempConfirmationSettings = confirmationSettings;
tempConfirmationSettings.title = 'Delete connection';
tempConfirmationSettings.onConfirm = function(e, target){
var deleteRowElement = $(target).parents('tr');
// deleteSignatures(row);
var connection = $().getConnectionById(mapData.config.id, rowData.id);
// deleteSignatures(row);
var connection = $().getConnectionById(mapData.config.id, rowData.id);
$().deleteConnections([connection], function(){
// callback function after ajax "delete" success
// remove table row
tempTableElement.DataTable().rows(deleteRowElement).remove().draw();
});
}
$().deleteConnections([connection], function(){
// callback function after ajax "delete" success
// remove table row
tempTableElement.DataTable().rows(deleteRowElement).remove().draw();
});
};
// init confirmation dialog
$(cell).confirmation(confirmationSettings);
$(cell).confirmation(tempConfirmationSettings);
}
}
]
});
connectionsElement.hideLoadingAnimation();
};
/**

View File

@@ -203,7 +203,7 @@ define([
*/
$.fn.initHeader = function(callback){
largeHeader = $(this)[0];
canvas = $(this).find('canvas')[0];
canvas = $(this).find('canvas:visible')[0];
// header preview elements
$('.' + config.previewElementClass).velocity('transition.bounceIn', {
@@ -211,21 +211,24 @@ define([
stagger: 60,
delay: 120,
complete: function(){
// header animation
initHeader();
initAnimation();
addListeners();
// show header canvas animation
$(canvas).velocity('fadeIn', {
duration: 900,
visibility: 'visible',
complete: function(){
if(callback !== undefined){
callback();
if(canvas){
// header animation
initHeader();
initAnimation();
addListeners();
$(canvas).velocity('fadeIn', {
duration: 900,
visibility: 'visible',
complete: function(){
if(callback !== undefined){
callback();
}
}
}
});
});
}
}
});

View File

@@ -91,7 +91,7 @@ define([
});
// show full logo
$('#' + config.staticLogoId + '').velocity({
canvasElement.find('#' + config.staticLogoId + '').velocity({
opacity: 1
},{
delay: 100,
@@ -99,7 +99,7 @@ define([
complete: function(){
// execute callback
if(callback !== undefined){
if(typeof callback === 'function'){
callback();
}

View File

@@ -18,8 +18,9 @@ define([
systemInfoModuleClass: 'pf-system-info-module', // module wrapper
// breadcrumb
constellationLinkClass: 'pf-system-info-constellation', // class for "constellation" link
regionLinkClass: 'pf-system-info-region', // class for "region" link
constellationLinkClass: 'pf-system-info-constellation', // class for "constellation" name
regionLinkClass: 'pf-system-info-region', // class for "region" name
typeLinkClass: 'pf-system-info-type', // class for "type" name
// info table
systemInfoTableClass: 'pf-system-info-table', // class for system info table
@@ -397,7 +398,8 @@ define([
ajaxConstellationInfoUrl: Init.path.getConstellationData,
systemConstellationLinkClass: config.constellationLinkClass,
systemRegionLinkClass: config.regionLinkClass
systemRegionLinkClass: config.regionLinkClass,
systemTypeLinkClass: config.typeLinkClass
};

View File

@@ -233,7 +233,7 @@ define([
if(data.count === 0){
labelOptions.type = 'label-success';
label = getLabel( 'No kills found within 24h', labelOptions );
label = getLabel( 'No kills found within the last 24h', labelOptions );
killboardGraphElement.append( label );
minifyKillboardGraphElement(killboardGraphElement);

View File

@@ -95,7 +95,7 @@ define([
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
var findRouteDialog = bootbox.dialog({
title: 'Search route',
title: 'Search shortest route',
message: content,
buttons: {
close: {
@@ -150,10 +150,9 @@ define([
var modalContent = $('#' + config.routeDialogId);
// init system select live search
// init system select live search - some delay until modal transition has finished
var selectElement = modalContent.find('.' + config.systemDialogSelectClass);
selectElement.initSystemSelect({key: 'name'});
selectElement.delay(240).initSystemSelect({key: 'name'});
});
});
};
@@ -188,7 +187,8 @@ define([
*/
var formatRouteData = function(routeData){
var rowData = false;
var tableRowData = {};
if(
routeData.routePossible === true &&
routeData.route.length > 0
@@ -196,9 +196,10 @@ define([
// route data available
// add route Data
rowData = [routeData.route[ routeData.route.length - 1 ].system.toLowerCase(), routeData.routeJumps];
var rowData = [routeData.route[ routeData.route.length - 1 ].system.toLowerCase(), routeData.routeJumps];
var jumpData = [];
var avgSecTemp = 0;
// loop all systems on this route
for(var i = 0; i < routeData.route.length; i++){
@@ -215,16 +216,26 @@ define([
var system = '<i class="fa fa-square ' + systemSecClass + '" ';
system += 'data-toggle="tooltip" data-placement="bottom" data-container="body" ';
system += 'title="' + routeNodeData.system + ' [' + systemSec + '] "></i>';
system += 'title="' + routeNodeData.system.toLowerCase() + ' [' + systemSec + '] "></i>';
jumpData.push( system );
avgSecTemp += Number(routeNodeData.security);
}
rowData.push( jumpData.join(' ') );
var avgSec = ( avgSecTemp / routeData.route.length).toFixed(2);
var avgSecClass = config.systemSecurityClassPrefix + ( avgSecTemp / routeData.route.length).toFixed(1).toString().replace('.', '-');
tableRowData.system = rowData[0];
tableRowData.jumps = rowData[1];
tableRowData.avgTrueSec = {
value: avgSec,
formatted: '<span class="' + avgSecClass + '">' + avgSec + '</span>'
};
tableRowData.route = jumpData.join(' ');
}
return rowData;
return tableRowData;
};
/**
@@ -294,17 +305,31 @@ define([
{
targets: 0,
orderable: true,
title: 'system&nbsp;&nbsp;&nbsp;'
title: 'system&nbsp;&nbsp;&nbsp;',
data: 'system'
},{
targets: 1,
orderable: true,
title: 'jumps&nbsp;&nbsp;&nbsp',
width: '40px',
class: 'text-right'
class: 'text-right',
data: 'jumps'
},{
targets: 2,
orderable: true,
title: '&#216;&nbsp;&nbsp;&nbsp',
width: '25px',
class: 'text-right',
data: 'avgTrueSec',
render: {
_: 'formatted',
sort: 'value'
}
},{
targets: 3,
orderable: false,
title: 'route'
title: 'route',
data: 'route'
}
],
data: [] // will be added dynamic

View File

@@ -8,9 +8,7 @@ define([
'app/util',
'app/render',
'config/signature_type',
'bootbox',
'app/counter',
'datatablesResponsive'
'bootbox'
], function($, Init, Util, Render, SignatureType, bootbox) {
'use strict';
@@ -931,9 +929,6 @@ define([
// open next field dialog ---------------------------------------------------------------
openNextEditDialogOnSave(sigNameFields);
openNextEditDialogOnSave(sigGroupFields);
// init signature counter ---------------------------------------------------------------
tableElement.find('.' + config.sigTableCounterClass + '[data-counter!="init"]').initTimestampCounter();
};
/**
@@ -1485,22 +1480,35 @@ define([
title: 'created',
width: '90px',
searchable: false,
className: [config.sigTableCounterClass, config.sigTableCreatedCellClass, 'min-tablet-l'].join(' '),
className: ['text-right', config.sigTableCounterClass, config.sigTableCreatedCellClass, 'min-tablet-l'].join(' '),
data: 'created',
render: {
_: 'created',
sort: 'created'
},
createdCell: function(cell, cellData, rowData, rowIndex, colIndex){
$(cell).initTimestampCounter();
}
},{
targets: 6,
title: 'updated',
width: '90px',
searchable: false,
className: [config.sigTableCounterClass, config.sigTableUpdatedCellClass, 'min-tablet-l'].join(' '),
className: ['text-right', config.sigTableCounterClass, config.sigTableUpdatedCellClass, 'min-tablet-l'].join(' '),
data: 'updated',
render: {
_: 'updated',
sort: 'updated'
},
createdCell: function(cell, cellData, rowData, rowIndex, colIndex){
$(cell).initTimestampCounter();
// highlight cell
var diff = new Date().getTime() - cellData.updated * 1000;
var dateDiff = new Date(diff);
if(dateDiff.getUTCDate() > 1){
$(cell).addClass('txt-color txt-color-warning');
}
}
},{
targets: 7,

View File

@@ -540,6 +540,14 @@ define([
* ==========================================================================================================
*/
/**
* show current program version information in browser console
*/
var showVersionInfo = function(){
var versionNumber = $('body').data('version');
console.info('PATHFINDER', versionNumber);
};
/**
* get the current main trigger delay for the main trigger functions
* optional in/decrease the delay
@@ -566,7 +574,6 @@ define([
Init.timer[updateKey]['CURRENT_DELAY'] += value;
}
return Init.timer[updateKey]['CURRENT_DELAY'];
};
@@ -633,15 +640,6 @@ define([
return duration;
};
/**
* build a program URL by a given path
* @param path
* @returns {string}
*/
var buildUrl = function(path){
return document.location.protocol + '//' + document.location.host + path;
};
/**
* trigger main logging event with log information
* @param message
@@ -1438,7 +1436,7 @@ define([
}).done(function(data){
if(data.reroute !== undefined){
var landingPageUrl = buildUrl(data.reroute);
var landingPageUrl = data.reroute;
var currentUrl = document.URL;
// relocate to landing page
@@ -1455,11 +1453,11 @@ define([
return {
config: config,
showVersionInfo: showVersionInfo,
getCurrentTriggerDelay: getCurrentTriggerDelay,
getServerTime: getServerTime,
timeStart: timeStart,
timeStop: timeStop,
buildUrl: buildUrl,
log: log,
showNotify: showNotify,
getLogInfo: getLogInfo,

File diff suppressed because one or more lines are too long

38
node_modules/.bin/build.js generated vendored
View File

@@ -76,21 +76,23 @@
//of its dependencies includes i18n bundles, they may not be included in the
//built file unless the locale: section is set above.
{
name: 'app/main',
name: 'mappage',
include: ['text'],
exclude: [
// "jquery",
// "jsPlumb"
excludeShallow: [
'app'
]
},{
name: 'app/landingpage',
name: 'landingpage',
include: ['text'],
exclude: [
// "jquery",
// "jsPlumb"
excludeShallow: [
'app'
]
},{
name: 'app/notification'
name: 'app/notification',
excludeShallow: [
'app',
'jquery'
]
}
],
@@ -104,7 +106,7 @@
//NOTE: As of 2.1.7, if using xpcshell to run the optimizer, it cannot
//parse out comments since its native Reflect parser is used, and does
//not have the same comments option support as esprima.
preserveLicenseComments: false,
preserveLicenseComments: false, // not working with "generate source maps" :(
//Introduced in 2.1.2 and considered experimental.
//If the minifier specified in the "optimize" option supports generating
@@ -118,6 +120,16 @@
//source maps as ".js.src" files.
generateSourceMaps: true,
//Sets the logging level. It is a number. If you want "silent" running,
//set logLevel to 4. From the logger.js file:
//TRACE: 0,
//INFO: 1,
//WARN: 2,
//ERROR: 3,
//SILENT: 4
//Default is 0.
logLevel: 0,
//How to optimize all the JS files in the build output directory.
//Right now only the following values
//are supported:
@@ -170,13 +182,17 @@
onBuildWrite: function (moduleName, path, contents) {
// show module names for each file
if(moduleName === 'app/main'){
if(moduleName === 'mappage'){
// test :)
}
return contents;
},
paths: {
app: "./../js/app" // the main config file will not be build
},
//The directory path to save the output. If not specified, then
//the path will default to be a directory called "build" as a sibling
//to the build file. All relative paths are relative to the build file.

View File

@@ -1,7 +0,0 @@
/*! ========================================================================
* Bootstrap Toggle: bootstrap2-toggle.css v2.2.0
* http://www.bootstraptoggle.com
* ========================================================================
* Copyright 2014 Min Hur, The New York Times Company
* Licensed under MIT
* ======================================================================== */label.checkbox .toggle,label.checkbox.inline .toggle{margin-left:-20px;margin-right:5px}.toggle{min-width:40px;height:20px;position:relative;overflow:hidden}.toggle input[type="checkbox"]{display:none}.toggle-group{position:absolute;width:200%;top:0;bottom:0;left:0;transition:left 0.35s;-webkit-transition:left 0.35s;-moz-user-select:none;-webkit-user-select:none}.toggle.off .toggle-group{left:-100%}.toggle-on{position:absolute;top:0;bottom:0;left:0;right:50%;margin:0;border:0;border-radius:0}.toggle-off{position:absolute;top:0;bottom:0;left:50%;right:0;margin:0;border:0;border-radius:0}.toggle-handle{position:relative;margin:0 auto;padding-top:0px;padding-bottom:0px;height:100%;width:0px;border-width:0 1px}.toggle-handle.btn-mini{top:-1px}.toggle.btn{min-width:30px}.toggle-on.btn{padding-right:24px}.toggle-off.btn{padding-left:24px}.toggle.btn-large{min-width:40px}.toggle-on.btn-large{padding-right:35px}.toggle-off.btn-large{padding-left:35px}.toggle.btn-small{min-width:25px}.toggle-on.btn-small{padding-right:20px}.toggle-off.btn-small{padding-left:20px}.toggle.btn-mini{min-width:20px}.toggle-on.btn-mini{padding-right:12px}.toggle-off.btn-mini{padding-left:12px}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -8,12 +8,10 @@
</div>
<h1 class="text-center txt-color txt-color-grayLight">
<h3 class="text-right txt-color txt-color-grayLight">
<strong>Pathfinder</strong>
<small>v.0.02 beta</small>
</h1>
<hr>
<small>{{version}}</small>
</h3>
<blockquote>
<p>
@@ -27,9 +25,9 @@
<div class="pf-dynamic-area">
<dl class="dl-horizontal">
<dt class="text-left txt-color txt-color-grayLight">URL <i class="fa fa-lg fa-external-link fa-fw"></i></dt>
<dd><a target="_blank" href="http://www.pathfinder.exodus4d.de/"><em class="pf-brand">pathfinder</em></a></dd>
<dd><a target="_blank" href="https://www.pathfinder.exodus4d.de"><em class="pf-brand">pathfinder</em></a></dd>
<dt class="text-left txt-color txt-color-grayLight">Dev Page <i class="fa fa-lg fa-external-link fa-fw"></i></dt>
<dd><a target="_blank" href="http://exodus4d.github.io/pathfinder/"><em class="pf-brand">pathfinder</em> developer</a></dd>
<dd><a target="_blank" href="http://exodus4d.github.io/pathfinder"><em class="pf-brand">pathfinder</em> developer</a></dd>
<dt class="text-left txt-color txt-color-grayLight">Source <i class="fa fa-lg fa-github fa-fw"></i></dt>
<dd><a target="_blank" href="https://github.com/exodus4d/pathfinder"><em class="pf-brand">pathfinder</em> repository</a></dd>
<dt class="text-left txt-color txt-color-grayLight">Contact <i class="fa fa-lg fa-google-plus fa-fw"></i></dt>
@@ -41,69 +39,19 @@
</dl>
</div>
<h1 class="text-center txt-color txt-color-grayLight">
<strong>Thanks</strong>
</h1>
<h3 class="txt-color txt-color-grayLight">
<strong>CCP Copyright Notice</strong>
</h3>
<hr>
<table class="table">
<thead>
<tr>
<th>#</th>
<th>URL</th>
<th>Reason</th>
</tr>
</thead>
<tbody>
<tr>
<td>CCP</td>
<td><a target="_blank" href="http://www.ccpgames.com/">http://www.ccpgames.com/</a></td>
<td>Special thanks to CCP for EVE ONLINE and all the dev APIs.</td>
</tr>
<tr>
<td><i class="fa fa-lg fa-fw fa-stack-overflow"></i></td>
<td><a target="_blank" href="http://stackoverflow.com/">http://stackoverflow.com/</a></td>
<td>Special thanks to all user who where answering all of my question.</td>
</tr>
<tr>
<td><i class="fa fa-lg fa-fw fa-codepen"></i></td>
<td><a target="_blank" href="http://codepen.io/">http://codepen.io/</a></td>
<td>Special thanks for delivering such a helpful service.</td>
</tr>
<tr>
<td><i class="fa fa-lg fa-fw fa-jsfiddle"></i></td>
<td><a target="_blank" href="http://jsfiddle.net/">http://jsfiddle.net/</a></td>
<td>Special thanks for delivering such a helpful service.</td>
</tr>
<tr>
<td><i class="fa fa-lg fa-fw fa-html5"></i></td>
<td><a target="_blank" href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></td>
<td>Thanks for all the fancy new specs that made our all life more easier.</td>
</tr>
<tr>
<td><i class="fa fa-lg fa-fw fa-twitter"></i></td>
<td><a target="_blank" href="http://getbootstrap.com/">http://getbootstrap.com/</a></td>
<td>Thanks to TWITTER for supporting and developing Bootstrap.</td>
</tr>
<tr>
<td><i class="fa fa-lg fa-fw fa-github"></i></td>
<td><a target="_blank" href="https://github.com/">https://github.com/</a></td>
<td>Thanks to GitHub for hosting this project.</td>
</tr>
<tr>
<td><i class="fa fa-lg fa-fw fa-reddit"></i></td>
<td><a target="_blank" href="http://www.reddit.com/r/evetech">http://www.reddit.com/r/evetech</a></td>
<td>Thanks to Reddit´s deve tech channel for all the help.</td>
</tr>
<tr>
<td></td>
<td></td>
<td>Thanks to all the OpenSource lovers out there.</td>
</tr>
</tbody>
</table>
<p class="txt-color txt-color-grayLight">
EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide.
All other trademarks are the property of their respective owners.
EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf.
All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the
intellectual property relating to these trademarks are likewise the intellectual property of CCP hf.
CCP is in no way responsible for the content on or functioning of this website, nor can it be liable for
any damage arising from the use of this website.
</p>
</div>
</div>

View File

@@ -8,6 +8,13 @@
</div>
</nav>
<div class="alert alert-info fade in hidden-md hidden-lg">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><i class="fa fa-close"></i></button>
<span class="txt-color txt-color-information">Info</span>
<small> Your browser window is to small. Resize it to obtain more columns.</small>
</div>
<h4><i class="fa fa-code-fork fa-lg fa-fw"></i> Map</h4>
<div id="{{mapInfoId}}" class="pf-dynamic-area">

View File

@@ -14,7 +14,7 @@
</h5>
<h5 style="display: inline-block"><a href="javascript:void(0);" data-url="{{ajaxConstellationInfoUrl}}/{{system.constellation.id}}" class="{{systemConstellationLinkClass}} popup-ajax" title="constellation">{{system.constellation.name}}</a>&nbsp;<i class="fa fa-fw fa-angle-double-right"></i></h5>
<h5 style="display: inline-block"><span class="{{systemRegionLinkClass}}" data-toggle="tooltip" data-placement="top" data-container="body" title="region">{{system.region.name}}</span>&nbsp;<i class="fa fa-fw fa-angle-double-right"></i></h5>
<h5 style="display: inline-block"><span data-toggle="tooltip" data-placement="top" data-container="body" title="type">{{systemTypeName}}</span></h5>
<h5 style="display: inline-block"><span class="{{systemTypeLinkClass}}" data-toggle="tooltip" data-placement="top" data-container="body" title="type">{{systemTypeName}}</span></h5>
<a href="http://evemaps.dotlan.net/system/{{system.name}}" target="_blank">
<div data-toggle="tooltip" data-placement="top" data-container="body" title="dotlan" class="pf-icon pf-icon-dotlan"></div>

View File

@@ -33,14 +33,23 @@
<title>Pathfinder</title>
<link rel="stylesheet" type="text/css" media="screen" href="public/css/pathfinder.css">
<meta property="og:title" content="EVE ONLINE mapping tool" />
<meta property="og:site_name" content="PATHFINDER" />
<meta property="og:image" content="https://www.pathfinder.exodus4d.de/logo.png" />
<meta property="og:url" content="https://www.pathfinder.exodus4d.de" />
<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="de_DE" />
<meta property="og:description" content="PATHFINDER is an 'open source' mapping tool for EVE ONLINE,
primarily developed to enrich the gameplay of small scale PvP and PvE." />
<link rel="stylesheet" type="text/css" media="screen" href="public/css/pathfinder.css?{{ @PATHFINDER.VERSION }}">
</head>
<body class="{{ @bodyClass }}" data-trusted="{{ @trusted }}" data-script="app/{{ @jsView }}">
<body class="{{ @bodyClass }}" data-trusted="{{ @trusted }}" data-js-path="{{ @pathJs }}" data-script="{{ @jsView }}" data-version="{{ @PATHFINDER.VERSION }}">
<check if="{{ @pageContent }}">
<include href="{{ @pageContent }}"/>
</check>
<include if="{{ @pageContent }}" href="{{ @pageContent }}"/>
<!-- Hey dude! Where is all the magic? -->
<script data-main="js/app" src="js/lib/require.js" ></script>
</body>

View File

@@ -1,3 +1,10 @@
{* config *}
<check if="{{ @PATHFINDER.REGISTRATION.STATUS != '1' }}">
<set registrationStatusButton="disabled" />
<set registrationStatusTitle= "{{@PATHFINDER.REGISTRATION.MSG_DISABLED}}" />
</check>
{* splash page *}
<div class="pf-splash">
<div class="pf-color-line"></div>
<div class="pf-splash-title">
@@ -20,7 +27,9 @@
</button>
<p class="navbar-text">
<span class="badge txt-color txt-color-grayLight">v.0.02 beta</span>
<a target="_blank" href="{{ @PATHFINDER.REPO }}">
<span class="badge txt-color txt-color-grayLight">{{ @PATHFINDER.VERSION }}</span>
</a>
</p>
<ul class="nav navbar-nav navbar-right" role="tablist">
@@ -34,6 +43,7 @@
<li> <a class="page-scroll" data-anchor="#pf-landing-pricing" href="#">Pricing</a></li>
<li> <a class="page-scroll" data-anchor="#pf-landing-about" href="#">About</a></li>
<li> <a class="page-scroll" data-anchor="#pf-landing-faq" href="#">FAQ</a></li>
<li> <a class="pf-navbar-license" href="#">License</a></li>
</ul>
</div>
</div>
@@ -42,7 +52,7 @@
{* header *}
<header id="pf-landing-top">
<div id="pf-header-container">
<canvas id="pf-header-canvas" width="500" height="480"></canvas>
<canvas id="pf-header-canvas" class="hidden-xs" width="500" height="480"></canvas>
<div class="container">
<check if="{{ @isIngame == 1 }}">
@@ -119,11 +129,11 @@
<div class="row text-center">
<div class="col-sm-6 col-sm-offset-3">
<div class="col-sm-4 col-sm-offset-2">
<button class="pf-register-button btn-block btn btn-primary" tabindex="4"><i class="fa fa-fw fa-user-plus"></i> Register</button>
<div class="col-sm-4 col-sm-offset-2" data-placement="left" title="{{@registrationStatusTitle}}">
<button class="pf-register-button btn-block btn btn-primary {{@registrationStatusButton}}" tabindex="4"><i class="fa fa-fw fa-user-plus"></i> Sign up</button>
</div>
<div class="col-sm-4">
<button class="pf-login-button btn-block btn btn-success" tabindex="3"><i class="fa fa-fw fa-sign-in"></i> Login</button>
<button class="pf-login-button btn-block btn btn-success" tabindex="3"><i class="fa fa-fw fa-sign-in"></i> Log in</button>
</div>
</div>
</div>
@@ -526,8 +536,8 @@
</ul>
</div>
</div>
<div class="panel-footer text-align-center">
<button class="btn btn-primary btn-block pf-register-button" role="button">Register</button>
<div class="panel-footer text-align-center" data-placement="top" title="{{@registrationStatusTitle}}">
<button class="btn btn-primary btn-block pf-register-button {{@registrationStatusButton}}" role="button"><i class="fa fa-fw fa-user-plus"></i> Sign up</button>
</div>
</div>
</div>
@@ -554,7 +564,7 @@
</div>
</div>
<div class="panel-footer text-align-center">
<a href="javascript:void(0);" class="btn btn-default btn-block disabled" role="button">Apply for</a>
<a href="javascript:void(0);" class="btn btn-default btn-block disabled" role="button"><i class="fa fa-fw fa-pencil-square-o"></i> Apply for</a>
</div>
</div>
</div>
@@ -581,7 +591,7 @@
</div>
</div>
<div class="panel-footer text-align-center">
<a href="javascript:void(0);" class="btn btn-default btn-block disabled" role="button">Apply for</a>
<a href="javascript:void(0);" class="btn btn-default btn-block disabled" role="button"><i class="fa fa-fw fa-pencil-square-o"></i> Apply for</a>
</div>
</div>
</div>
@@ -622,14 +632,14 @@
The main focus of my daily work is based on large scale frontend applications.
</p>
<p>
I decided to make this project <a target="_blank" href="https://github.com/exodus4d/pathfinder">"Open Source"</a>, once the beta testing is finished.
I decided to make this project <a target="_blank" href="{{ @PATHFINDER.REPO }}">"Open Source"</a>, once the beta testing is finished.
It would be a great pleasure to me if you would help me to improve this project by submitting <a target="_blank" href="https://github.com/exodus4d/pathfinder/issues">bug reports</a>
or any kind of security issues.
</p>
</div>
<div class="col-xs-12 col-sm-5 col-md-4 col-lg-4 text-center">
<img class="pf-landing-image-preview pf-landing-image-preview-small pf-landing-about-me" alt="" src="http://image.eveonline.com/Character/1946320202_256.jpg">
<img class="pf-landing-image-preview pf-landing-image-preview-small pf-landing-about-me" alt="" src="https://image.eveonline.com/Character/1946320202_256.jpg">
</div>
</div>
@@ -793,7 +803,7 @@
<ul class="pf-social-networks text-right">
<li><a target="_blank" href="https://www.youtube.com/channel/UC7HU7XEoMbqRwqxDTbMjSPg"> <i class="fa fa-lg fa-youtube-play fa-fw"></i> </a></li>
<li><a target="_blank" href="https://plus.google.com/u/0/b/110257318165279088853/110257318165279088853/about"> <i class="fa fa-lg fa-google-plus fa-fw"></i> </a></li>
<li><a target="_blank" href="https://github.com/exodus4d/pathfinder"> <i class="fa fa-lg fa-github fa-fw"></i> </a></li>
<li><a target="_blank" href="{{ @PATHFINDER.REPO }}"> <i class="fa fa-lg fa-github fa-fw"></i> </a></li>
</ul>
</div>
</div>

View File

@@ -547,7 +547,7 @@ $modal-content-border-color: rgba(0,0,0,.2);
$modal-content-fallback-border-color: #999;
$modal-backdrop-bg: #000;
$modal-backdrop-opacity: .5;
$modal-backdrop-opacity: .3;
$modal-header-border-color: #e5e5e5;
$modal-footer-border-color: $modal-header-border-color;

View File

@@ -23,6 +23,10 @@ a{
color: $teal-lightest;
text-decoration: none;
}
&:focus{
color: $teal;
}
}
// emphasized text

View File

@@ -2,7 +2,7 @@
$mapHeight: 520px;
$mapWidth: 2500px ;
// start bounce mixin ==============================================
// start bounce mixin =========================================================
@mixin bounce-up-down{
@@ -31,7 +31,7 @@ $mapWidth: 2500px ;
60% {transform: translateY(-4px);}
}
// end bounce mixin ================================================
// end bounce mixin ===========================================================
#pf-map-tab-element{
max-width: 2515px;
@@ -59,7 +59,7 @@ $mapWidth: 2500px ;
}
}
// map overlay =====================================================
// map overlay ================================================================
.pf-map-overlay{
position: absolute;
display: none; // triggered by js
@@ -114,8 +114,7 @@ $mapWidth: 2500px ;
position: relative;
font-family: $font-family-bold;
// jsPlumb classes =================================================
// jsPlumb classes ==========================================================
._jsPlumb_target, ._jsPlumb_source{
}
@@ -132,8 +131,7 @@ $mapWidth: 2500px ;
@extend .pf-system-selected;
}
// hover effects ===================================================
// hover effects ============================================================
._jsPlumb_hover{
// hover effect for connections
@@ -152,8 +150,7 @@ $mapWidth: 2500px ;
@include box-shadow(0 6px 12px rgba(0,0,0,.3));
}
// =================================================================
// ==========================================================================
.pf-system{
position: absolute;
min-width: 60px;
@@ -207,7 +204,7 @@ $mapWidth: 2500px ;
}
}
// ===============================================================
// ========================================================================
.pf-system-body{
height: 0px;
@@ -239,7 +236,7 @@ $mapWidth: 2500px ;
color: $orange-light;
display: none; // hover effect
}
// user status ===============================================
// user status ========================================================
.pf-user-status{
font-size: 7px;
width: 10px;
@@ -305,11 +302,12 @@ $mapWidth: 2500px ;
}
}
// Endpoints =======================================================
// Endpoints ================================================================
.pf-map-endpoint-source, .pf-map-endpoint-target{
z-index: 50;
z-index: 90;
svg {
overflow: visible; // this fixes a "half-pixel" bug on SVG circle with border
circle{
@include transition( stroke 0.18s ease-out, fill 0.18s ease-out);
}
@@ -319,20 +317,22 @@ $mapWidth: 2500px ;
stroke-width: 2; // border width
fill: $gray;
cursor: pointer;
&:hover{
stroke: $gray-lightest; // hover style
}
}
}
// hover effect for Endpoints
// hover (with cursor) effect for Endpoints
&:hover{
circle{
stroke: $orange !important;
}
}
// hover class (e.g. connection is hovered -> endpoints get this class)
&._jsPlumb_hover{
// increase z-index -> prevent overlapping multiple endpoints
z-index: 95;
}
// while dragging
&._jsPlumb_dragging{
circle {
@@ -355,7 +355,7 @@ $mapWidth: 2500px ;
}
}
// Connections =====================================================
// Connections ==============================================================
svg._jsPlumb_connector{
cursor: pointer;
@@ -375,36 +375,23 @@ $mapWidth: 2500px ;
stroke: $gray-light; // outer line
}
&:hover{
&._jsPlumb_hover{
z-index: 80;
path:first-child{
stroke: $gray-lightest; // hover style
stroke: $gray-lightest; // hover style
}
}
&._jsPlumb_dragging{
@include transition( opacity 0.18s ease-out) ;
opacity: 0.4;
}
}
svg.pf-map-connection-stargate {
path:first-child{
stroke: $gray-light;
}
path:not(:first-child){
stroke: $indigo-darkest;
}
&:hover{
path:first-child{
stroke: $gray-lightest;
}
z-index: 80;
}
}
svg.pf-map-connection-jumpbridge {
z-index: 50;
path:first-child{
stroke: rgba(255,255,255,0); // invisible border color
@@ -425,8 +412,31 @@ $mapWidth: 2500px ;
}
}
svg.pf-map-connection-wh-fresh {
// special wh-connection style (
svg.pf-map-connection-stargate {
z-index: 60;
path:first-child{
stroke: $gray-light;
}
path:not(:first-child){
stroke: $indigo-darkest;
}
&:hover{
path:first-child{
stroke: $gray-lightest;
}
}
}
svg{
&.pf-map-connection-wh-fresh,
&.pf-map-connection-wh-reduced,
&.pf-map-connection-wh-critical,
&.pf-map-connection-wh-eol{
z-index: 70;
}
}
svg.pf-map-connection-wh-eol {
@@ -456,7 +466,7 @@ $mapWidth: 2500px ;
}
}
// Connection overlay ==============================================
// Connection overlay =======================================================
.pf-map-connection-overlay{
padding: 1px 4px;
font-size: 11px;
@@ -476,14 +486,14 @@ $mapWidth: 2500px ;
}
}
// dialoges ===========================================================
// dialoges ===================================================================
.ui-dialog-content{
label{
min-width: 60px;
}
}
// context menu ======================================================
// context menu ===============================================================
.dropdown-menu{
font-family: $font-family-bold;
z-index: 1020; // over tooltips

View File

@@ -25,13 +25,8 @@
.pf-system-info-module{
// breadcrumb
.breadcrumb{
font-family: $font-family-bold;
li{
text-transform: capitalize;
}
h5{
text-transform: capitalize;
}
// dynamic area specific for the description field
@@ -49,10 +44,8 @@
font-size: 11px;
white-space: nowrap
}
}
// signature table module ==================================================
.pf-sig-table-module{
@@ -96,25 +89,32 @@
cursor: pointer;
}
// signature timer/date counter head
th.pf-table-counter-cell{
padding-right: 20px !important;
th{
&.sorting,
&.sorting_asc,
&.sorting_desc{
// prevent overlapping of text and sort icon (if text-right align)
padding-right: 18px !important;
}
}
// signature timer/date counter
.pf-table-counter-cell{
text-align: right;
td{
.pf-digit-counter-small{
width: 20px;
display: inline-block;
font-size: 10px;
}
&.pf-table-counter-cell{
color: $gray-light;
.pf-digit-counter-large{
width: 26px;
display: inline-block;
font-size: 10px;
.pf-digit-counter-small{
width: 20px;
display: inline-block;
font-size: 10px;
}
.pf-digit-counter-large{
width: 26px;
display: inline-block;
font-size: 10px;
}
}
}
@@ -134,10 +134,14 @@
.pf-system-route-table{
width: 100%;
font-size: 10px;
font-size: 11px;
td{
text-transform: capitalize;
& > .fa{
font-size: 10px;
}
}
}
}

View File

@@ -94,7 +94,7 @@ table.dataTable.hover tbody tr.odd:hover,
table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover,
table.dataTable.display tbody tr.odd:hover,
table.dataTable.display tbody tr.even:hover {
background-color: $orange;
background-color: darken($orange, 10%);
color: $gray-darker;
a {
@@ -111,7 +111,7 @@ table.dataTable.hover tbody tr.odd:hover.selected,
table.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected,
table.dataTable.display tbody tr.odd:hover.selected,
table.dataTable.display tbody tr.even:hover.selected {
background-color: $orange-dark;
background-color: darken($orange-dark, 10%);
}
table.dataTable.order-column tbody tr > .sorting_1,
table.dataTable.order-column tbody tr > .sorting_2,
@@ -131,7 +131,7 @@ table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.
background-color: $teal-darker;
}
table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
background-color: #f3f3f3;
background-color: $teal-darkest;
}
table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
background-color: whitesmoke;
@@ -149,7 +149,7 @@ table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column
background-color: $teal-darker;
}
table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
background-color: #fbfbfb;
background-color: $teal-darkest;
}
table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
background-color: #fdfdfd;
@@ -168,7 +168,7 @@ table.dataTable.display tbody tr.odd:hover > .sorting_1,
table.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1,
table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1,
table.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 {
background-color: $orange-dark;
background-color: darken($orange-dark, 10%);;
}
table.dataTable.display tbody tr:hover > .sorting_2,
table.dataTable.display tbody tr.odd:hover > .sorting_2,
@@ -189,7 +189,7 @@ table.dataTable.display tbody tr.odd:hover.selected > .sorting_1,
table.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1,
table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1,
table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 {
background-color: darken($orange-dark, 2%);
background-color: darken($orange-dark, 12%);;
}
table.dataTable.display tbody tr:hover.selected > .sorting_2,
table.dataTable.display tbody tr.odd:hover.selected > .sorting_2,