', {
+ class: config.systemKillboardGraphsClass
+ });
+
+ moduleElement.append(headline, graphElement);
+
+ parentElement.append(moduleElement);
+
+ // update graph
+ graphElement.updateSystemInfoGraphs(systemData.systemId);
+
+ return moduleElement;
+ };
+
+
+ /**
+ * main module load function
+ * @param systemData
+ */
+ $.fn.drawSystemKillboardModule = function(systemData){
+
+ var parentElement = $(this);
+
+ // show route module
+ var showModule = function(moduleElement){
+ if(moduleElement){
+
+ moduleElement.velocity('stop').velocity('transition.slideUpIn', {
+ queue: false,
+ duration: Init.animationSpeed.mapModule
+ });
+ }
+ };
+
+ // check if module already exists
+ var moduleElement = parentElement.find('.' + config.systemKillboardModuleClass);
+
+ if(moduleElement.length > 0){
+ moduleElement.velocity('stop').velocity('reverse', {
+ complete: function(tempElement){
+ $(tempElement).remove();
+
+ moduleElement = getModule(parentElement, systemData);
+ showModule(moduleElement);
+ }
+ });
+ }else{
+ moduleElement = getModule(parentElement, systemData);
+ showModule(moduleElement);
+ }
+
+ };
+});
\ No newline at end of file
diff --git a/js/app/ui/system_route.js b/js/app/ui/system_route.js
new file mode 100644
index 00000000..8880ddb3
--- /dev/null
+++ b/js/app/ui/system_route.js
@@ -0,0 +1,383 @@
+/**
+ * system route module
+ */
+
+define([
+ 'jquery',
+ 'app/init',
+ 'app/util',
+ 'bootbox'
+], function($, Init, Util, bootbox) {
+ 'use strict';
+
+ var config = {
+ // module info
+ moduleClass: 'pf-module', // class for each module
+
+ // system route module
+ systemRouteModuleClass: 'pf-system-route-module', // class for this module
+
+ // tables
+ tableToolsClass: 'pf-table-tools', // table toolbar
+
+ systemSecurityClassPrefix: 'pf-system-security-', // prefix class for system security level (color)
+
+ // dialog
+ routeDialogId: 'pf-route-dialog', // id for route dialog
+ systemDialogSelectClass: 'pf-system-dialog-select', // class for system select Element
+ systemInfoRoutesTableRowPrefix: 'pf-system-info-routes-row-', // prefix class for a row in the route table
+ systemInfoRoutesTableClass: 'pf-system-route-table' // class for route tables
+
+ };
+
+ var cache = {
+ systemRoutes: {} // jump information between solar systems
+ };
+
+
+ /**
+ * callback function, adds new row to a dataTable with jump information for a route
+ * @param context
+ * @param routeData
+ */
+ var callbackAddRouteRow = function(context, routeData){
+ // format routeData
+ var rowData = formatRouteData(context, routeData);
+
+ cache.systemRoutes[context.cacheKey] = rowData;
+
+ // add new row
+ context.dataTable.row.add( cache.systemRoutes[context.cacheKey] ).draw().nodes().to$().addClass( context.rowClass );
+
+ // init tooltips for each jump system
+ var tooltipElements = context.moduleElement.find('.' + context.rowClass + ' [data-toggle="tooltip"]');
+ $(tooltipElements).tooltip();
+ };
+
+
+ /**
+ * show route dialog. User can search for systems and jump-info for each system is added to a data table
+ * @param dialogData
+ */
+ var showFindRouteDialog = function(dialogData){
+
+ var data = {
+ id: config.routeDialogId,
+ selectClass: config.systemDialogSelectClass,
+ systemFrom: dialogData.systemFrom
+ };
+
+ requirejs(['text!templates/dialog/route.html', 'mustache'], function(template, Mustache) {
+
+ var content = Mustache.render(template, data);
+
+ // disable modal focus event -> otherwise select2 is not working! -> quick fix
+ $.fn.modal.Constructor.prototype.enforceFocus = function() {};
+
+ var findRouteDialog = bootbox.dialog({
+ title: 'Search route',
+ message: content,
+ buttons: {
+ close: {
+ label: 'cancel',
+ className: 'btn-default',
+ callback: function(){
+ $(findRouteDialog).modal('hide');
+ }
+ },
+ success: {
+ label: '
search route',
+ className: 'btn-primary',
+ callback: function () {
+ // add new route to route table
+
+ // get form Values
+ var form = $('#' + config.routeDialogId).find('form');
+
+ var routeDialogData = $(form).getFormValues();
+
+ // validate form
+ form.validator('validate');
+
+ // check weather the form is valid
+ var formValid = form.isValidForm();
+
+ if(formValid === false){
+ // don't close dialog
+ return false;
+ }
+
+ // get route Data
+ var requestData = {
+ systemFrom: dialogData.systemFrom,
+ systemTo: routeDialogData.systemTo
+ };
+
+ // data passed into callback
+ var contextData = {
+ moduleElement: dialogData.moduleElement,
+ systemTo: routeDialogData.systemTo,
+ dataTable: dialogData.dataTable,
+ rowClass: config.systemInfoRoutesTableRowPrefix + dialogData.dataTable.rows().data().length,
+ cacheKey: dialogData.systemFrom + '_' + routeDialogData.systemTo
+ };
+
+ getRouteData(requestData, contextData, callbackAddRouteRow);
+ }
+ }
+ }
+ });
+
+
+ // init dialog
+ findRouteDialog.on('shown.bs.modal', function(e) {
+
+ var modalContent = $('#' + config.routeDialogId);
+
+ // init system select live search
+ var selectElement = modalContent.find('.' + config.systemDialogSelectClass);
+ selectElement.initSystemSelect({key: 'name'});
+ });
+
+
+ });
+
+ };
+
+ /**
+ * requests route data from eveCentral API and execute callback
+ * @param systemFrom
+ * @param systemTo
+ * @param callback
+ */
+ var getRouteData = function(requestData, contextData, callback){
+
+ // get route from API
+ var baseUrl = Init.url.eveCentral + 'route/from/';
+
+ var url = baseUrl + requestData.systemFrom + '/to/' + requestData.systemTo;
+
+ $.ajax({
+ url: url,
+ dataType: 'json',
+ context: contextData
+ }).done(function(routeData){
+ // execute callback
+ callback(this, routeData);
+ });
+
+ };
+
+ /**
+ * format route data from API request into dataTable row format
+ * @param context
+ * @param routeData
+ * @returns {*[]}
+ */
+ var formatRouteData = function(context, routeData){
+
+ // add row Data
+ var rowData = [context.systemTo, routeData.length];
+
+ var jumpData = [];
+ // loop all systems on a rout
+ $.each(routeData, function(j, systemData){
+
+ var systemSecClass = config.systemSecurityClassPrefix;
+ var systemSec = systemData.to.security.toFixed(1).toString();
+ var tempSystemSec = systemSec;
+
+ if(tempSystemSec < 0){
+ tempSystemSec = '0-0';
+ }
+
+ systemSecClass += tempSystemSec.replace('.', '-');
+ var system = '
';
+ jumpData.push( system );
+
+ });
+
+
+ rowData.push( jumpData.join(' ') );
+
+ return rowData;
+ };
+
+ var getModule = function(systemData){
+
+ var moduleElement = null;
+
+ // load trade routes for k-space systems
+ if(systemData.type.id === 2){
+
+ // create new module container
+ moduleElement = $('
', {
+ class: [config.moduleClass, config.systemRouteModuleClass].join(' ')
+ });
+
+ // headline
+ var headline = $('
', {
+ class: 'pull-left',
+ text: 'Routes'
+ });
+
+ moduleElement.append(headline);
+
+ var systemFrom = systemData.name;
+ var systemsTo = ['Jita', 'Amarr', 'Rens', 'Dodixie'];
+
+ // crate new route table
+ var table = $('
', {
+ class: ['compact', 'stripe', 'order-column', 'row-border', config.systemInfoRoutesTableClass].join(' ')
+ });
+
+ moduleElement.append( $(table) );
+
+ // init empty table
+ var routesTable = table.DataTable( {
+ paging: false,
+ ordering: true,
+ order: [ 1, 'asc' ],
+ info: false,
+ searching: false,
+ hover: false,
+
+ autoWidth: false,
+ columnDefs: [
+ {
+ targets: 0,
+ orderable: true,
+ title: 'system '
+ },{
+ targets: 1,
+ orderable: true,
+ title: 'jumps  ',
+ width: '40px',
+ class: 'text-right'
+ },{
+ targets: 2,
+ orderable: false,
+ title: 'route'
+ }
+ ],
+ data: [] // will be added dynamic
+ });
+
+ // add toolbar buttons for table -------------------------------------
+ var tableToolbar = $('', {
+ class: [config.tableToolsClass, 'pull-right'].join(' ')
+ }).append(
+ $('
-
-
diff --git a/sass/layout/_images.scss b/sass/layout/_images.scss
index 05af6f46..025c998b 100644
--- a/sass/layout/_images.scss
+++ b/sass/layout/_images.scss
@@ -3,9 +3,25 @@
}
.pf-icon-dotlan{
- background: url('../img/icons/dotlan_logo.png');
+ background: inline-image("#{$base-url}/icons/dotlan_logo.png");
width: 17px;
height: 17px;
opacity: 0.8;
- margin: -5px 10px 0 10px;
+ margin: -5px 0px 0 10px;
+}
+
+.pf-icon-wormhol-es{
+ background: inline-image("#{$base-url}/icons/wormhol_es_logo.png");
+ width: 17px;
+ height: 17px;
+ opacity: 0.8;
+ margin: -5px 0px 0 10px;
+}
+
+.pf-icon-zkillboard{
+ background: inline-image("#{$base-url}/icons/zkillboard_logo.png");
+ width: 16px;
+ height: 16px;
+ opacity: 0.8;
+ margin: -5px 0px 0 10px;
}
diff --git a/sass/layout/_main.scss b/sass/layout/_main.scss
index 7aff31f6..87f21899 100644
--- a/sass/layout/_main.scss
+++ b/sass/layout/_main.scss
@@ -27,6 +27,28 @@ em{
}
}
+.pf-font-capitalize{
+ text-transform: capitalize;
+}
+
+// table styles =====================================================
+
+// table icon toolbar
+.pf-table-tools{
+ height: 45px;
+
+ .btn:not(:last-child){
+ margin-right: 10px;
+ }
+}
+
+.pf-table-tools-action{
+ height: 75px;
+ display: none; // triggered by js
+}
+
+
+
// full screen view of an element
/*
.pf-fullscreen{
@@ -125,7 +147,7 @@ em{
}
.pf-map-type-tab-global{
- border-top: 2px solid $green;
+ border-top: 2px solid $teal;
}
.pf-map-type-tab-alliance{
@@ -133,7 +155,11 @@ em{
}
.pf-map-type-tab-private{
- border-top: 2px solid $teal;
+ border-top: 2px solid $green;
+ }
+
+ .fa{
+ margin-right: 5px;
}
}
@@ -553,5 +579,9 @@ Animate the stripes
}
}
+.row{
+ will-change: all, transform;
+
+}
diff --git a/sass/layout/_map.scss b/sass/layout/_map.scss
index cc5fe179..0fa644d2 100644
--- a/sass/layout/_map.scss
+++ b/sass/layout/_map.scss
@@ -302,7 +302,7 @@ $mapWidth: 2500px;
stroke-linecap: round; // line endings
path{
- @include transition( stroke 0.2s ease-out);
+ @include transition( stroke 0.2s ease-out) ;
}
path:not(:first-child){
diff --git a/sass/layout/_system-info.scss b/sass/layout/_system-info.scss
index e3dbf8e3..902f46d0 100644
--- a/sass/layout/_system-info.scss
+++ b/sass/layout/_system-info.scss
@@ -25,20 +25,6 @@
padding: 0 5px;
}
}
-
- // system info killboard graph ===========================================
- .pf-system-info-graph-kills{
- width: 100%;
- height: 150px;
- padding: 10px 0;
- position: relative;
- }
-
- // routes table ==========================================================
- .pf-system-route-table{
- font-size: 10px;
- }
-
}
@@ -104,23 +90,39 @@
}
}
}
+}
- // table icon toolbar
- .pf-sig-table-tools{
- height: 45px;
+// system graph module ===================================================
+.pf-system-graph-module{
- .btn:not(:last-child){
- margin-right: 10px;
- }
+ .pf-system-graph{
+ width: 100%;
+ height: 100px;
+ }
+}
+
+// route module ==========================================================
+.pf-system-route-module{
+
+ .pf-system-route-table{
+ width: 100%;
+ font-size: 10px;
+ }
+}
+
+// killboard module ======================================================
+.pf-system-killboard-module{
+
+ .pf-system-killboard-graphs{
+ margin-bottom: 10px;
}
- .pf-sig-table-tools-action{
- height: 75px;
- display: none; // triggered by js
+ .pf-system-killboard-graph-kills{
+ width: 100%;
+ height: 100px;
+ position: relative;
}
-
}
-
diff --git a/sass/smartadmin/_main-colorpallet.scss b/sass/smartadmin/_main-colorpallet.scss
index bef57495..dc1893ab 100644
--- a/sass/smartadmin/_main-colorpallet.scss
+++ b/sass/smartadmin/_main-colorpallet.scss
@@ -13,7 +13,9 @@
&.txt-color-green { color: $green !important; }
&.txt-color-greenLight { color: $greenLight !important; }
&.txt-color-greenDark { color: $greenDark !important; }
+ &.txt-color-redLight { color: $redLight !important; }
&.txt-color-red { color: $red !important; }
+ &.txt-color-redDarker { color: $red-darker !important; }
&.txt-color-yellow { color: $yellow !important; }
&.txt-color-orange { color: $orange !important; }
&.txt-color-orangeDark { color: $orangeDark !important; }
@@ -25,7 +27,6 @@
&.txt-color-white { color: $white !important; }
&.txt-color-magenta { color: $magenta !important; }
&.txt-color-teal { color: $teal !important; }
- &.txt-color-redLight { color: $redLight !important; }
&.txt-color-primary { color: $brand-primary !important; }
&.txt-color-success { color: $brand-success !important; }
diff --git a/sass/smartadmin/_main.scss b/sass/smartadmin/_main.scss
index aba49648..7f790678 100644
--- a/sass/smartadmin/_main.scss
+++ b/sass/smartadmin/_main.scss
@@ -163,7 +163,7 @@ h4 {
h5 {
font-size: $font-size-h5;
font-weight: 300;
- margin: 10px 0;
+ margin-top: 0;
line-height:normal;
}