map update logic

This commit is contained in:
exodus4d
2015-01-14 23:22:07 +01:00
parent 7bcc9ec394
commit 9e74c2dee9
37 changed files with 1898 additions and 3869 deletions

View File

@@ -10,6 +10,7 @@
<w>datatables</w>
<w>deps</w>
<w>fontawesome</w>
<w>fullscreen</w>
<w>jqueryui</w>
<w>jumpbridge</w>
<w>killboard</w>
@@ -17,6 +18,7 @@
<w>mouseover</w>
<w>nonblock</w>
<w>pnotify</w>
<w>revalidate</w>
<w>scrollbar</w>
<w>scrollbars</w>
<w>scrollspy</w>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
img/notifications/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

View File

@@ -6,6 +6,25 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="cache-control" content="public">
<link rel="apple-touch-icon" sizes="57x57" href="favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="favicons/favicon-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="favicons/favicon-160x160.png" sizes="160x160">
<link rel="icon" type="image/png" href="favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="favicons/favicon-32x32.png" sizes="32x32">
<meta name="msapplication-TileColor" content="#2d89ef">
<meta name="msapplication-TileImage" content="favicons/mstile-144x144.png">
<!--
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="Pragma" content="no-cache" />
@@ -14,7 +33,7 @@
<meta name="keywords" content="eve,wormhole,mapping,tool,mmo,space,game,igb">
<meta name="author" content="Exodus 4D">
<title>Pathfinder - Mapping Tool</title>
<title>Pathfinder</title>
<link rel="stylesheet" type="text/css" media="screen" href="css/pathfinder.css">
</head>

View File

@@ -1,17 +1,18 @@
requirejs.config({
baseUrl: 'js', // user build_js files, change to "js" for un-compressed source
stubModules: ['text'], // Exclude these modules on build
paths: {
layout: 'layout',
jquery: 'lib/jquery-1.11.1.min', // v1.11.1 jQuery
//jquery: "lib/jquery-2.1.1.min", // v2.1.1 jQuery
//jqueryUI: "lib/jquery-ui.min", // v1.11.2 jQuery UI default
jqueryUI: 'lib/jquery-ui-custom.min', // v1.11.2 custom script (without tooltip -> conflict with bootstrap)
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.
templates: '../templates', // template dir
slidebars: 'lib/slidebars', // v0.10 Slidebars - side menu plugin http://plugins.adchsm.me/slidebars/
jsPlumb: 'lib/jsPlumb-1.6.4-min', // v1.4.6 jsPlumb - main map draw plugin http://www.jsplumb.org/
// jsPlumb: 'lib/jsPlumb-1.6.4-min', // v1.4.6 jsPlumb - main map draw plugin http://www.jsplumb.org/
jsPlumb: 'lib/dom.jsPlumb-1.7.2-min', // v1.7.2 jsPlumb (Vanilla)- main map draw plugin http://www.jsplumb.org/
customScrollbar: 'lib/jquery.mCustomScrollbar.concat.min', // v3.1.11 Custom scroll bars - http://manos.malihu.gr/
datatables: 'lib/jquery.dataTables.min', // v1.10.3 DataTables - tables
datatablesBootstrap: 'lib/dataTables.bootstrap', // DataTables - not used (bootstrap style)
@@ -22,6 +23,9 @@ requirejs.config({
easyPieChart: 'lib/jquery.easypiechart.min', // v2.1.6 Easy Pie Chart - HTML 5 pie charts - http://rendro.github.io/easy-pie-chart/
dragToSelect: 'lib/jquery.dragToSelect', // v1.1 Drag to Select - http://andreaslagerkvist.com/jquery/drag-to-select/
hoverIntent: 'lib/jquery.hoverIntent.minified', // v1.8.0 Hover intention - http://cherne.net/brian/resources/jquery.hoverIntent.html
fullScreen: 'lib/jquery.fullscreen.min', // v0.5.0 Full screen mode - https://github.com/private-face/jquery.fullscreen
pnotify: 'lib/pnotify/pnotify.core', // v2.0.1 PNotify - notification core file
//'pnotify.buttons': 'lib/pnotify/pnotify.buttons', // PNotify - buttons notification extension
@@ -39,7 +43,7 @@ requirejs.config({
deps: ['jquery']
},
bootstrap: {
deps: ['jquery', 'jqueryUI']
deps: ['jquery']
},
slidebars: {
deps: ['jquery']
@@ -75,13 +79,14 @@ requirejs.config({
},
hoverIntent: {
deps : ['jquery']
},
fullScreen: {
deps : ['jquery']
}
}
});
/*
requirejs(['jquery', 'xEditable'], function($, ) {
});
*/
// load the main app module in order to start the app
requirejs(["app/main"]);
requirejs(['app/main']);

View File

@@ -10,6 +10,9 @@ define(['jquery'], function($) {
timer: {
mainPing: 3000 // main server ping
},
path: {
img: 'img/'
},
url: {
zKillboard: 'https://zkillboard.com/api/', // killboard api
eveCentral: 'http://api.eve-central.com/api/' // jump rout api
@@ -190,17 +193,20 @@ define(['jquery'], function($) {
// map connection types
connectionTypes: {
jumpbridge: {
cssClass: 'pf-map-connection-jumpbridge'
cssClass: 'pf-map-connection-jumpbridge',
paintStyle: {
dashstyle: '2'
}
},
stargate: {
cssClass: 'pf-map-connection-stargate'
},
wh: {
cssClass: 'pf-map-connection-wh'
},
wh_eol: {
cssClass: 'pf-map-connection-wh-eol'
},
wh_fresh: {
cssClass: 'pf-map-connection-wh-fresh'
},
wh_reduced: {
cssClass: 'pf-map-connection-wh-reduced'
},
@@ -959,7 +965,7 @@ define(['jquery'], function($) {
},
2: {
name: 'relic site',
label: 'Relict'
label: 'Relic'
},
3: {
name: 'data site',

View File

@@ -8,7 +8,7 @@ define([
'app/render',
'app/ccp',
'app/page',
'app/module_map',
'app/module_map'
], function($, Init, Render, CCP) {
'use strict';
@@ -21,14 +21,13 @@ define([
$(function() {
CCP.requestTrust();
$('body').loadPageStructure();
// Map init options
var mapData =[{
map: {},
config: {
id: 1,
id: 99,
name: 'Polaris',
scope: 'wormhole',
icon: 'fa-globe',
@@ -39,6 +38,7 @@ define([
{
id: 2,
name: 'J150020',
alias: 'Polaris',
effect: 'magnetar',
type: 'wh',
security: 'C6',
@@ -48,43 +48,54 @@ define([
rally: '0',
position: {
x: 8,
y: 0
}
y: 300
},
updated: 1420903681
},{
id: 3,
name: 'J115844',
alias: '',
effect: 'wolfRyet',
type: 'wh',
security: 'C6',
trueSec: -1,
status: 'empty',
position: {
x: 65,
y: 60
}
x: 25,
y: 40
},
updated: 1420903681
},{
id: 4,
name: 'J155207',
alias: '',
effect: 'wolfRyet',
type: 'wh',
security: 'C6',
trueSec: -1,
status: '',
locked: '1',
rally: '1',
position: {
x: 203,
y: 60
}
},
updated: 1420903681
},{
id: 5,
name: 'J145510',
alias: '',
effect: 'pulsar',
security: 'C3',
trueSec: -1,
type: 'wh',
status: 'hostile',
position: {
x: 110,
y: 110
}
x: 40,
y: 160
},
updated: 1420903681
},{
id: 30002979,
name: 'Tararan',
@@ -103,9 +114,10 @@ define([
type: 'k-space',
status: '',
position: {
x: 301,
x: 280,
y: 250
}
},
updated: 1420903681
},{
id: 30000142,
name: 'Jita',
@@ -126,34 +138,158 @@ define([
position: {
x: 400,
y: 150
}
},
updated: 1420903681
},{
id: 31000152,
name: 'J121418',
alias: '',
effect: '',
security: 'C1',
trueSec: -1,
region: {
id: '11000002',
name: 'A-R00002'
},
constellation: {
id: '21000002',
name: 'A-C00002'
},
type: 'wh',
status: 'occupied',
position: {
x: 600,
y: 75
},
updated: 1420903681
},{
id: 30000144,
name: 'Perimeter',
alias: '',
effect: '',
security: 'H',
trueSec: 0.9,
region: {
id: '10000002',
name: 'The Forge'
},
constellation: {
id: '20000020',
name: 'Kimotoro'
},
type: 'k-space',
status: 'unscanned',
position: {
x: 550,
y: 200
},
updated: 1420903681
},{
id: 30001028,
name: 'RMOC-W',
alias: '',
effect: '',
security: '0.0',
trueSec: -0.1,
region: {
id: '10000012',
name: 'Curse'
},
constellation: {
id: '20000150',
name: 'Sound'
},
type: 'k-space',
status: '',
position: {
x: 500,
y: 300
},
updated: 1420903681
}
],
connections: [
{
id: 2,
source: 2,
target: 5,
scope: 'wh',
type: [
'wh_reduced'
],
updated: 1420903681
},{
id: 3,
source: 5,
target: 4,
scope: 'wh',
type: [
'wh_fresh',
'frigate'
],
updated: 1420903681
},{
id: 5,
source: 3,
target: 4,
scope: 'wh',
type: [
'wh_critical'
],
updated: 1420903681
},
{
id: 77,
source: 4,
target: 30002979,
scope: 'wh',
type: [
'wh_critical'
],
updated: 1420903681
},
{
id: 95,
source: 4,
target: 30000142,
scope: 'wh',
type: [
'wh_eol',
'wh_reduced',
'preserve_mass'
],
updated: 1420903681
},
{
id: 96,
source: 30000142,
target: 31000152,
scope: 'wh',
type: [
'wh_fresh'
],
updated: 1420903681
},
{
id: 97,
source: 30000142,
target: 30000144,
scope: 'stargate',
type: [
'stargate'
]
],
updated: 1420903681
},
{
source: 4,
target: 30002979,
id: 98,
source: 30002979,
target: 30001028,
scope: 'jumpbridge',
type: [
'wh',
'wh_critical'
]
},
{
source: 4,
target: 30000142,
type: [
'wh',
'wh_eol',
'wh_reduced'
]
'jumpbridge'
],
updated: 1420903681
}
]
}
@@ -172,6 +308,7 @@ define([
{
id: 50,
name: 'J150020',
alias: '',
effect: 'magnetar',
security: 'C6',
type: 'wh',
@@ -179,10 +316,12 @@ define([
position: {
x: 5,
y: 7
}
},
updated: 1420903681
},{
id: 51,
name: 'J115844',
alias: '',
effect: 'wolfRyet',
security: 'C6',
type: 'wh',
@@ -190,15 +329,18 @@ define([
position: {
x: 60,
y: 65
}
},
updated: 1420903681
}
],
connections: [{
id: 23,
source: 50,
target: 51,
type: [
'wh'
]
'wh_fresh'
],
updated: 1420903681
}]
}
},
@@ -231,7 +373,7 @@ define([
mapUserData: [ // user Data for all maps
{
config: { // map config
id: 1 // map id
id: 99 // map id
},
data: {
systems:[ // systems in map
@@ -268,25 +410,35 @@ define([
}
]};
// load map module ==========================================
$('#' + config.mapModuleId).loadMapModule(mapData);
// update map module ========================================
setTimeout(
function() {
$('#' + config.mapModuleId).updateMapModule(userData);
console.time('updateUserData')
// $('#' + config.mapModuleId).updateMapModuleData(userData);
console.timeEnd('updateUserData')
}, 5000);
console.log('update map done');
}, 500);
// server ping
var triggerMainPing = function(){
var mapData = $('#' + config.mapModuleId).getMapModuleData();
var triggerMainPing = function(tempMapData){
console.time('updateMapData')
// load map module ==========================================
$('#' + config.mapModuleId).updateMapModule(tempMapData);
console.timeEnd('updateMapData')
// console.log(mapData);
console.time('getMapData')
var mapData = $('#' + config.mapModuleId).getMapModuleData();
console.timeEnd('getMapData')
console.log(mapData);
};
setInterval(triggerMainPing, Init.timer.mainPing);
//setInterval(triggerMainPing, 5000, mapData);
setInterval(triggerMainPing, Init.timer.mainPing, mapData);
});

View File

@@ -10,7 +10,7 @@ define(["jquery"], function($) {
$(this).on("pf:openContextMenu", function (e, originalEvent, component, hiddenOptions, activeOptions) {
// hide all other open context menus
// $('.dropdown-menu').hide();
$('#pf-dialog-wrapper > .dropdown-menu').hide();
var contextMenu = $(settings.menuSelector);
@@ -24,7 +24,7 @@ define(["jquery"], function($) {
contextMenu.find('li[data-action="' + hiddenOptions[i] + '"]').hide();
}
// un activate all menu entries
// deactivate all menu entries
menuLiElements.removeClass('active');
//set active specific menu entries

File diff suppressed because it is too large Load Diff

View File

@@ -13,11 +13,15 @@ define([
'use strict';
var currentMapData = []; // current map data
var config = {
dynamicElementWrapperId: 'pf-dialog-wrapper', // parent Element for dynamic content (dialoges,..)
dynamicElementWrapperId: 'pf-dialog-wrapper', // parent Element for dynamic content (dialogs,..)
mapTabElementId: 'pf-map-tab-element', // id for map tab element (tabs + content)
mapTabBarId: 'pf-map-tabs',
mapTabIdPrefix: 'pf-map-tab-',
mapTabClass: 'pf-map-tab',
mapTabLinkTextClass: 'nav-tabs-link', // class for span elements in a tab
mapTabContentClass: 'pf-map-tab-content',
mapTabContentSystemInfoClass: 'pf-map-tab-content-system',
mapWrapperClass: 'pf-map-wrapper', // scrollable
@@ -170,18 +174,6 @@ define([
return $('#' + config.mapTabBarId).find('a[data-toggle="tab"]');
};
/**
* get all Tabs for a maps module
* @param mapModule
* @returns {*}
*/
var getTabContentElements = function(mapContentModule){
var tabs = $(mapContentModule).find('.' + config.mapTabContentClass );
return tabs;
};
/**
* set Tab Observer, events are triggered within map.js
* @param mapContentModule
@@ -203,53 +195,12 @@ define([
// highlight a mapTab
$(this).on('pf:highlightTab', function(e, data){
// update Tab Content with system data information
highlightTab(e.target, data);
// TODO
});
});
};
/**
* highlight a Tab in this module e.g. when user has an active pilot in this map
* @param contentElement
* @param data
*/
var highlightTab = function(contentElement, data){
var tabElements = getTabElements();
contentElement = $(contentElement);
// look for related tab element
$.each(tabElements, function(i, tabElement){
tabElement = $(tabElement);
if(tabElement.attr('data-map-index') === contentElement.attr('data-map-index')){
tabElement.tooltip({placement: 'top', trigger: 'manual'});
tabElement.attr('title', '');
tabElement.tooltip('hide');
// check if this tab needs to be highlighted
if(data.system){
// destroy empty tooltip end create new
tabElement.tooltip('destroy');
tabElement.attr('title', $(data.system).data('name'));
tabElement.tooltip('show');
// scroll to system
contentElement.find('.' + config.mapWrapperClass).scrollTo( '#' + data.system.id );
}
return false;
}
});
};
/**
* open "signature reader" dialog for signature table
*/
@@ -888,7 +839,6 @@ define([
name: ' W237',
lifetime: 24
}],
//type: 'wh'
type: 'wh'
};
}
@@ -1796,7 +1746,7 @@ define([
* updates complete map module (all maps)
* @param userData
*/
$.fn.updateMapModule = function(userData){
$.fn.updateMapModuleData = function(userData){
// get all active map elements for module
var mapElements = $(this).getMaps();
@@ -1818,7 +1768,7 @@ define([
$.each(userData.mapUserData, function(j, tempMapData){
if(tempMapData.config.id === mapId){
// map userdata found
// map userData found
mapUserData = tempMapData;
}
});
@@ -1856,113 +1806,350 @@ define([
};
var getTabElementh = function(options){
var tabElement = $('<div>', {
id: config.mapTabElementId
});
var tabBar = $('<ul>', {
class: ['nav', 'nav-tabs'].join(' '),
id: options.barId
}).attr('role', 'tablist');
var tabContent = $('<div>', {
class: 'tab-content'
}).attr('data-map-tabs', options.barId);
tabElement.append(tabBar);
tabElement.append(tabContent);
return tabElement;
};
/**
* load map module into element (all maps)
* add a new tab to tab-map-module end returns the new objects
* @param options
* @returns {{listElement: (*|void), contentElement: (*|HTMLElement)}}
*/
$.fn.addTab = function(options){
var tabElement = $(this);
var tabBar = tabElement.find('ul.nav-tabs');
var tabContent = tabElement.find('div.tab-content');
var listElement = $('<li>', {
class: options.tabClasses.join(' ')
}).attr('role', 'presentation');
if(options.active === true){
listElement.addClass('active');
}
if(options.right === true){
listElement.addClass('pull-right');
}
// link element -------
var linkElement = $('<a>', {
href: '#' + config.mapTabIdPrefix + options.id
}).attr('role', 'tab').attr('data-toggle', 'tab').data('map-id', options.id);
// icon element ------
var iconElement = $('<i>', {
class: ['fa', 'fa-fw', options.icon].join(' ')
});
// text element -----
var textElement = $('<span>', {
class: config.mapTabLinkTextClass,
text: options.name
});
var newListElement = listElement.append(
linkElement.append(iconElement).append(textElement)
);
tabBar.append( newListElement );
// tabs content ====================================
var contentElement = $('<div>', {
id: config.mapTabIdPrefix + options.id,
class: options.contentClasses.join(' ')
});
contentElement.addClass('tab-pane');
if(options.active === true){
contentElement.addClass('active');
}
tabContent.append(contentElement);
return {
listElement: newListElement,
contentElement: contentElement
};
};
/**
* deletes a map tab for a given map id
* @param mapId
*/
$.fn.deleteTab = function(mapId){
var tabElement = $(this);
var linkElement = tabElement.find('a[href="#' + config.mapTabIdPrefix + mapId + '"]');
var deletedTabName = '';
if(linkElement.length > 0){
deletedTabName = linkElement.find('.' + config.mapTabLinkTextClass).text();
var liElement = linkElement.parent();
var contentElement = tabElement.find('div[id="' + config.mapTabIdPrefix + mapId + '"]');
var findNewActiveTab = false;
// check if liElement was active
if(liElement.hasClass('active')){
// search any remaining li element and set active
findNewActiveTab = true;
}
liElement.remove();
contentElement.remove();
if(findNewActiveTab === true){
tabElement.find('a:first').tab('show');
}
}
return deletedTabName;
};
/**
* get current map data for a map id
* @param mapId
* @returns {boolean}
*/
var getMapDataById = function(mapId){
var mapData = false;
for(var i = 0; i < currentMapData.length; i++){
if(currentMapData[i].config.id === mapId){
mapData = currentMapData[i];
break;
}
}
return mapData;
};
/**
* load/update map module into element (all maps)
* @param mapData
*/
$.fn.loadMapModule = function(mapData){
$.fn.updateMapModule = function(mapData){
var moduleConfig = {
name: 'modules/tabs',
position: $(this),
link: 'prepend',
functions: {
after: function(){
// update current map data
currentMapData = mapData;
// this new created module
var mapContentModule = $("div[data-map-tabs='" + config.mapTabBarId + "']");
// temp store current map data to prevent data-change while function execution!
var tempMapData = currentMapData;
// load first map i in first tab content container
var tabContentElements = getTabContentElements(mapContentModule);
// set observer for manually triggered map events
tabContentElements.setTabContentObserver();
var mapModuleElement = $(this);
// load all the structure elements for ALL Tab Content Body
tabContentElements.initContentStructure();
// check if tabs module is already loaded
var tabMapElement = $('#' + config.mapTabElementId);
// load first map i in first tab content container
$( tabContentElements[0] ).initMap(mapData[0]);
// check if tabs have changed
var tabsChanged = false;
// check for "new map" action before tap-change
getTabElements().on('show.bs.tab', function (e) {
if(tabMapElement.length > 0){
// tab element already exists
var mapIndex = parseInt( $(e.target).attr('data-map-index') );
var tabElements = getTabElements();
if(mapIndex === -1){
// add new Tab selected
showNewMapDialog();
e.preventDefault();
// mapIds that are currently active
var activeMapIds = [];
// check whether a tab/map is still active
for(var i = 0; i < tabElements.length; i++){
var mapId = $(tabElements[i]).data('map-id');
if(mapId > 0){
var tabMapData = getMapDataById(mapId);
if(tabMapData !== false){
// map data available -> update map
activeMapIds.push(mapId);
}else{
tabsChanged = true;
// map data not available -> remove tab
var deletedTabName = tabMapElement.deleteTab(mapId);
if(deletedTabName.length > 0){
Util.showNotify({title: 'Map removed', text: deletedTabName + ' deleted', type: 'warning'});
}
});
// load new map right after tab-change
getTabElements().on('shown.bs.tab', function (e) {
var mapIndex = parseInt( $(e.target).attr('data-map-index') );
var mapId = mapData[mapIndex].config.id;
var currentTabContentElement = $('#' + config.mapTabIdPrefix + mapId);
$( currentTabContentElement).initMap( mapData[mapIndex]);
// "wake up" scrollbr for map and get previous state back
var scrollableElement = currentTabContentElement.find('.' + config.mapWrapperClass);
$(scrollableElement).mCustomScrollbar( 'update');
});
getTabElements().on('hide.bs.tab', function (e) {
var mapIndex = parseInt( $(e.target).attr('data-map-index') );
var mapId = mapData[mapIndex].config.id;
var currentTabContentElement = $('#' + config.mapTabIdPrefix + mapId);
// disable scrollbar for map that will be hidden. "freeze" current state
var scrollableElement = currentTabContentElement.find('.' + config.mapWrapperClass);
$(scrollableElement).mCustomScrollbar( 'disable' );
});
}
}
}
};
var moduleData = {
id: config.mapTabBarId,
tabs: []
};
// add new tabs for new maps
$.each(tempMapData, function(i, data){
// add new tab data for each map
$.each(mapData, function(i, data){
if( activeMapIds.indexOf( data.config.id ) === -1 ){
// add new map tab
var tabOptions = {
id: parseInt( data.config.id ),
tabClasses: [config.mapTabClass, Util.getInfoForMap( data.config.type, 'classTab') ],
contentClasses: [config.mapTabContentClass],
active: false,
icon: data.config.icon,
name: data.config.name,
right: false
};
var newTabElements = tabMapElement.addTab(tabOptions);
// set observer for manually triggered map events
newTabElements.contentElement.setTabContentObserver();
// load all the structure elements for the new tab
newTabElements.contentElement.initContentStructure();
Util.showNotify({title: 'Map added', text: data.config.name + ' added', type: 'success'});
}
});
}else{
// create Tab Element
tabsChanged = true;
var options = {
barId: config.mapTabBarId
};
tabMapElement = getTabElementh(options);
// add new tab for each map
for(var j = 0; j < tempMapData.length; j++){
var data = tempMapData[j];
var activeTab = false;
if(j === 0){
activeTab = true;
}
var tabOptions = {
id: parseInt( data.config.id ),
tabClasses: [config.mapTabClass, Util.getInfoForMap( data.config.type, 'classTab') ],
contentClasses: [config.mapTabContentClass],
active: activeTab,
icon: data.config.icon,
name: data.config.name,
right: false
};
tabMapElement.addTab(tabOptions);
var active = false;
if(i === 0){
active = true;
}
moduleData.tabs.push({
id: data.config.id,
index: i,
name: data.config.name,
icon: data.config.icon,
tabClass: [config.mapTabClass, Util.getInfoForMap( data.config.type, 'classTab') ].join(' '),
contentClass: config.mapTabContentClass,
active: active
// add "add" button
var tabAddOptions = {
id: 0,
tabClasses: [config.mapTabClass, Util.getInfoForMap( 'default', 'classTab') ],
contentClasses: [config.mapTabContentClass],
icon: 'fa-plus',
name: 'add',
right: true
};
tabMapElement.addTab(tabAddOptions);
mapModuleElement.prepend(tabMapElement);
// ==============================================================
// this new created module
var tabContentElements = tabMapElement.find('.' + config.mapTabContentClass);
// set observer for manually triggered map events
tabContentElements.setTabContentObserver();
// load all the structure elements for ALL Tab Content Body
tabContentElements.initContentStructure();
// load first map i in first tab content container
$( tabContentElements[0] ).updateMapData(tempMapData[0]);
}
if(tabsChanged === true){
// remove previous event handlers
var allTabElements = getTabElements();
allTabElements.off('show.bs.tab');
allTabElements.off('shown.bs.tab');
allTabElements.off('hide.bs.tab');
// check for "new map" action before tap-change
allTabElements.on('show.bs.tab', function (e) {
var mapId = $(e.target).data('map-id');
if(mapId === 0){
// add new Tab selected
showNewMapDialog();
e.preventDefault();
}
});
});
// add new tab
moduleData.tabs.push({
id: 0,
index: -1,
name: 'add',
icon: 'fa-plus',
tabClass: [config.mapTabClass, Util.getInfoForMap( 'default', 'classTab') ].join(' '),
contentClass: config.mapTabContentClass,
pullRight: true
});
// load new map right after tab-change
allTabElements.on('shown.bs.tab', function (e) {
var mapId = $(e.target).data('map-id');
var tabMapData = getMapDataById(mapId);
Render.showModule(moduleConfig, moduleData);
if(tabMapData !== false){
// load map
var currentTabContentElement = $('#' + config.mapTabIdPrefix + mapId);
$( currentTabContentElement).updateMapData( tabMapData);
// "wake up" scrollbar for map and get previous state back
var scrollableElement = currentTabContentElement.find('.' + config.mapWrapperClass);
$(scrollableElement).mCustomScrollbar( 'update');
}else{
// no map data found -> remove tab
tabMapElement.deleteTab(mapId);
}
});
allTabElements.on('hide.bs.tab', function (e) {
var mapId = $(e.target).data('map-id');
var currentTabContentElement = $('#' + config.mapTabIdPrefix + mapId);
// disable scrollbar for map that will be hidden. "freeze" current state
var scrollableElement = currentTabContentElement.find('.' + config.mapWrapperClass);
$(scrollableElement).mCustomScrollbar( 'disable' );
});
}
};
@@ -1989,11 +2176,11 @@ define([
};
/**
* init map, load into a container and init custom scrollbar
* @param container
* load OR updates a map module with its data
* @param mapData
* @returns {*}
*/
$.fn.initMap = function(mapData){
$.fn.updateMapData = function(mapData){
return this.each(function(){
$(this).loadMap(mapData);

View File

@@ -1,5 +1,6 @@
define([
'jquery',
'app/init',
'pnotify',
//'pnotify.buttons',
//'pnotify.confirm',
@@ -8,24 +9,24 @@ define([
//'pnotify.history',
'pnotify.callbacks',
//'pnotify.reference'
], function($, PNotify) {
], function($, Init, PNotify) {
'use strict';
var config = {
title: '',
text: '',
type: '', // 'info', 'success', error, 'warning'
type: '', // 'info', 'success', error, 'warning'
icon: false,
opacity: 0.8,
styling: 'fontawesome', // 'fontawesome', 'bootstrap3', 'jqueryui'
animate_speed: 200, // effect animation
position_animate_speed: 100, // animation speed for notifications moving up/down
hide: true, // close after few seconds
delay: 5000, // visible time for notification in browser
mouse_reset: true, // Reset the hide timer if the mouse moves over the notice.
styling: 'fontawesome', // 'fontawesome', 'bootstrap3', 'jqueryui'
animate_speed: 200, // effect animation
position_animate_speed: 100, // animation speed for notifications moving up/down
hide: true, // close after few seconds
delay: 5000, // visible time for notification in browser
mouse_reset: true, // Reset the hide timer if the mouse moves over the notice.
shadow: true,
addclass: 'stack-bottomright', // class for display, must changed on stack different stacks
addclass: 'stack-bottomright', // class for display, must changed on stack different stacks
width: '250px',
// animation settings
animation: {
@@ -45,8 +46,8 @@ define([
},
// desktop extension "Web Notifications"
desktop: {
desktop: false, // change for enable
icon: 'http://eve.damianvila.com/images/eve-logo.png'
desktop: false, // change for enable
icon: Init.path.img + 'notifications/logo.png' // default image for desktop notifications
}
};
@@ -111,6 +112,10 @@ define([
customConfig.delay = 10000;
customConfig.desktop.desktop = true;
console.log(customConfig.desktop)
// make browser tab blink
startTabBlink(customConfig.title);
}else{
customConfig.delay = 5000;
customConfig.desktop.desktop = false;
@@ -151,9 +156,46 @@ define([
new PNotify(customConfig);
};
/**
* change document.title and make the browsers tab blink
* @param blinkTitle
*/
var startTabBlink = function(blinkTitle){
var initBlink = (function(blinkTitle){
var currentTitle = document.title;
var timeoutId;
var blink = function(){
document.title = document.title === blinkTitle ? currentTitle : blinkTitle;
console.log(document.title)
};
var clear = function() {
clearInterval(timeoutId);
document.title = currentTitle;
window.onmousemove = null;
timeoutId = null;
};
return function () {
if (!timeoutId) {
timeoutId = setInterval(blink, 1000);
window.onmousemove = clear;
}
};
}( blinkTitle ));
initBlink();
};
return {
showNotify: showNotify
showNotify: showNotify,
startTabBlink: startTabBlink
};
});

View File

@@ -8,6 +8,7 @@ define([
'app/render',
'bootbox',
'slidebars',
'fullScreen',
'app/module_map'
], function($, Init, Util, Render, bootbox) {
@@ -22,6 +23,7 @@ define([
pageSlidebarRightClass: 'sb-right', // class for right menu
pageSlideLeftWidth: '150px', // slide distance left menu
pageSlideRightWidth: '150px', // slide distance right menu
fullScreenClass: 'pf-fullscreen', // class for the "full screen" element
// page structure
pageClass: 'pf-site',
@@ -35,6 +37,10 @@ define([
// footer
pageFooterId: 'pf-footer', // id for page footer
// menu
menuHeadMenuLogoClass: 'pf-head-menu-logo', // class for main menu logo
menuButtonFullScreenId: 'pf-menu-button-fullscreen', // id for menu button "full screen"
// map module
mapModuleId: 'pf-map-module', // main map module
@@ -164,6 +170,19 @@ define([
).on('click', function(){
$(document).triggerMenuEvent('ShowJumpInfo');
})
).append(
$('<a>', {
class: 'list-group-item hide', // trigger by js
id: config.menuButtonFullScreenId,
href: '#'
}).html('&nbsp;&nbsp;Full screen').prepend(
$('<i>',{
class: 'glyphicon glyphicon-fullscreen',
css: {width: '1.23em'}
})
).on('click', function(){
$(document).triggerMenuEvent('FullScreen', {button: this});
})
).append(
$('<a>', {
class: 'list-group-item',
@@ -186,6 +205,13 @@ define([
)
)
);
// init menu
if($.fullscreen.isNativelySupported() === true){
$('#' + config.menuButtonFullScreenId).removeClass('hide');
}
};
/**
@@ -212,7 +238,7 @@ define([
href: '#'
}).html('&nbsp;&nbsp;Grid snap').prepend(
$('<i>',{
class: 'fa fa-th fa-fw'
class: 'glyphicon glyphicon-th'
})
).on('click', function(){
$('#' + config.mapModuleId).getActiveMap().triggerMenuEvent('Grid', {button: this});
@@ -267,6 +293,7 @@ define([
var moduleData = {
id: config.pageHeaderId,
brandLogo: config.menuHeadMenuLogoClass,
userName: 'Exodus 4D'
};
@@ -303,29 +330,68 @@ define([
* catch all global document events
*/
var setDocumentObserver = function(){
$(document).on('fscreenchange', function(e, state, elem){
var menuButton = $('#' + config.menuButtonFullScreenId);
if(state === true){
// full screen active
menuButton.addClass('active');
}else{
menuButton.removeClass('active');
}
});
$(document).on('pf:menuShowSystemEffectInfo', function(e){
// show system effects info box
showSystemEffectInfoDialog();
return false;
});
$(document).on('pf:menuShowJumpInfo', function(e){
// show system effects info box
showJumpInfoDialog();
return false;
});
$(document).on('pf:menuNotificationTest', function(e){
// show system effects info box
notificationTest();
return false;
});
$(document).on('pf:menuManual', function(e){
// show map manual
showMapManual();
return false;
});
$(document).on('pf:menuShowMapInfo', function(e){
// show map information dialog
showMapInfoDialog();
return false;
});
$(document).on('pf:menuFullScreen', function(e, data){
var fullScreenElement = $('body');
// close all menus
$(this).trigger('pf:closeMenu', [{}]);
// wait until menu is closed before switch mode (looks better)
setTimeout(
function() {
if($.fullscreen.isFullScreen()){
$.fullscreen.exit();
}else{
fullScreenElement.fullscreen({overflow: 'overflow-y', toggleClass: config.fullScreenClass});
}
}, 400);
return false;
});
};
@@ -336,257 +402,266 @@ define([
*/
var showMapInfoDialog = function(){
var mapData = $('#' + config.mapModuleId).getActiveMap().getMapData();
var mapData = $('#' + config.mapModuleId).getActiveMap().getMapData(true);
requirejs(['text!templates/modules/map_info_dialog.html', 'lib/mustache'], function(template, Mustache) {
if(mapData !== false){
requirejs(['text!templates/modules/map_info_dialog.html', 'lib/mustache'], function(template, Mustache) {
console.log(mapData)
var data = {
mapInfoSystemsId: config.mapInfoSystemsId,
mapInfoConnectionsId: config.mapInfoConnectionsId,
mapDataConfig: mapData.config,
mapName: mapData.config.name,
mapTypeClass: Util.getInfoForMap( mapData.config.type, 'class'),
mapTypeLabel: Util.getInfoForMap( mapData.config.type, 'label')
};
var content = Mustache.render(template, data);
var mapInfoDialog = bootbox.dialog({
title: 'Map information',
message: content,
buttons: {
success: {
label: 'close',
className: 'btn-primary',
callback: function() {
$(mapInfoDialog).modal('hide');
}
}
}
});
mapInfoDialog.on('shown.bs.modal', function(e) {
// modal on open
var systemsElement = $('#' + config.mapInfoSystemsId);
var connectionsElement = $('#' + config.mapInfoConnectionsId);
var loadingOptions = {
icon: {
size: 'fa-2x'
}
var data = {
mapInfoSystemsId: config.mapInfoSystemsId,
mapInfoConnectionsId: config.mapInfoConnectionsId,
mapDataConfig: mapData.config,
mapName: mapData.config.name,
mapTypeClass: Util.getInfoForMap( mapData.config.type, 'class'),
mapTypeLabel: Util.getInfoForMap( mapData.config.type, 'label')
};
var content = Mustache.render(template, data);
var systemTable = $('<table>', {
class: ['compact', 'stripe', 'order-column', 'row-border', config.mapInfoTableClass].join(' ')
});
systemsElement.append(systemTable);
systemsElement.showLoadingAnimation(loadingOptions);
var connectionTable = $('<table>', {
class: ['compact', 'stripe', 'order-column', 'row-border', config.mapInfoTableClass].join(' ')
});
connectionsElement.append(connectionTable);
connectionsElement.showLoadingAnimation(loadingOptions);
// systems table ==================================================
// prepare data for dataTables
var systemsData = [];
for(var i = 0; i < mapData.data.systems.length; i++){
var tempSystemData = mapData.data.systems[i];
var tempData = [];
// current position
if(tempSystemData.currentUser === true){
tempData.push( '<i class="fa fa fa-map-marker fa-lg fa-fw"></i>' );
}else{
tempData.push( '' );
}
tempData.push( tempSystemData.name );
if( tempSystemData.name !== tempSystemData.alias){
tempData.push( tempSystemData.alias );
}else{
tempData.push( '' );
}
// status
var systemStatusClass = Util.getStatusInfoForSystem(tempSystemData.status, 'class');
if(systemStatusClass !== ''){
tempData.push( '<i class="fa fa fa-square-o fa-lg fa-fw ' + systemStatusClass + '"></i>' );
}else{
tempData.push( '' );
}
// effect
var systemEffectClass = Util.getEffectInfoForSystem(tempSystemData.effect, 'class');
if(systemEffectClass !== ''){
tempData.push( '<i class="fa fa fa-square fa-lg fa-fw ' + systemEffectClass + '"></i>' );
}else{
tempData.push( '' );
}
// trueSec
var systemTrueSecClass = Util.getTrueSecClassForSystem(tempSystemData.trueSec);
if(systemTrueSecClass !== ''){
tempData.push( '<span class="' + systemTrueSecClass + '">' + tempSystemData.trueSec.toFixed(1) + '</span>' );
}else{
tempData.push( '' );
}
// locked
if(tempSystemData.locked === true){
tempData.push( '<i class="fa fa-lock fa-lg fa-fw"></i>' );
}else{
tempData.push( '' );
}
// rally point
if(tempSystemData.rally === true){
tempData.push( '<i class="fa fa-users fa-lg fa-fw"></i>' );
}else{
tempData.push( '' );
}
systemsData.push(tempData);
}
var systemsDataTable = systemTable.dataTable( {
paging: false,
ordering: true,
order: [ 0, 'desc' ],
autoWidth: false,
hover: false,
data: systemsData,
columnDefs: [],
language: {
emptyTable: 'Map is empty',
zeroRecords: 'No systems found',
lengthMenu: 'Show _MENU_ systems',
info: 'Showing _START_ to _END_ of _TOTAL_ systems'
},
columns: [
{
title: '<i class="fa fa fa-map-marker fa-lg"></i>',
width: '15px',
searchable: false
},{
title: 'system',
width: '50px'
},{
title: 'alias'
},{
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',
className: 'text-center',
searchable: false
var mapInfoDialog = bootbox.dialog({
title: 'Map information',
message: content,
buttons: {
success: {
label: 'close',
className: 'btn-primary',
callback: function() {
$(mapInfoDialog).modal('hide');
}
}
]
}
});
systemsElement.hideLoadingAnimation();
mapInfoDialog.on('shown.bs.modal', function(e) {
// modal on open
// connections table ==================================================
var systemsElement = $('#' + config.mapInfoSystemsId);
var connectionsElement = $('#' + config.mapInfoConnectionsId);
// prepare data for dataTables
var connectionData = [];
for(var j = 0; j < mapData.data.connections.length; j++){
var tempConnectionData = mapData.data.connections[j];
var loadingOptions = {
icon: {
size: 'fa-2x'
}
};
var tempConData = [];
tempConData.push( Util.getScopeInfoForMap( tempConnectionData.scope, 'label') );
var systemTable = $('<table>', {
class: ['compact', 'stripe', 'order-column', 'row-border', config.mapInfoTableClass].join(' ')
});
systemsElement.append(systemTable);
// source system name
tempConData.push( tempConnectionData.sourceName );
systemsElement.showLoadingAnimation(loadingOptions);
// connection
var connectionClasses = [];
for(var k = 0; k < tempConnectionData.type.length; k++){
connectionClasses.push( Util.getConnectionInfo( tempConnectionData.type[k], 'cssClass') );
var connectionTable = $('<table>', {
class: ['compact', 'stripe', 'order-column', 'row-border', config.mapInfoTableClass].join(' ')
});
connectionsElement.append(connectionTable);
connectionsElement.showLoadingAnimation(loadingOptions);
// systems table ==================================================
// prepare data for dataTables
var systemsData = [];
for(var i = 0; i < mapData.data.systems.length; i++){
var tempSystemData = mapData.data.systems[i];
var tempData = [];
// current position
if(tempSystemData.currentUser === true){
tempData.push( '<i class="fa fa fa-map-marker fa-lg fa-fw"></i>' );
}else{
tempData.push( '' );
}
// type
tempData.push(tempSystemData.type);
// name
tempData.push( tempSystemData.name );
// alias
if( tempSystemData.name !== tempSystemData.alias){
tempData.push( tempSystemData.alias );
}else{
tempData.push( '' );
}
// status
var systemStatusClass = Util.getStatusInfoForSystem(tempSystemData.status, 'class');
if(systemStatusClass !== ''){
tempData.push( '<i class="fa fa fa-square-o fa-lg fa-fw ' + systemStatusClass + '"></i>' );
}else{
tempData.push( '' );
}
// effect
var systemEffectClass = Util.getEffectInfoForSystem(tempSystemData.effect, 'class');
if(systemEffectClass !== ''){
tempData.push( '<i class="fa fa fa-square fa-lg fa-fw ' + systemEffectClass + '"></i>' );
}else{
tempData.push( '' );
}
// trueSec
var systemTrueSecClass = Util.getTrueSecClassForSystem(tempSystemData.trueSec);
if(systemTrueSecClass !== ''){
tempData.push( '<span class="' + systemTrueSecClass + '">' + tempSystemData.trueSec.toFixed(1) + '</span>' );
}else{
tempData.push( '' );
}
// locked
if(tempSystemData.locked === true){
tempData.push( '<i class="fa fa-lock fa-lg fa-fw"></i>' );
}else{
tempData.push( '' );
}
// rally point
if(tempSystemData.rally === true){
tempData.push( '<i class="fa fa-users fa-lg fa-fw"></i>' );
}else{
tempData.push( '' );
}
systemsData.push(tempData);
}
connectionClasses = connectionClasses.join(' ');
var systemsDataTable = systemTable.dataTable( {
paging: false,
ordering: true,
order: [ 0, 'desc' ],
autoWidth: false,
hover: false,
data: systemsData,
columnDefs: [],
language: {
emptyTable: 'Map is empty',
zeroRecords: 'No systems found',
lengthMenu: 'Show _MENU_ systems',
info: 'Showing _START_ to _END_ of _TOTAL_ systems'
},
columns: [
{
title: '<i class="fa fa fa-map-marker fa-lg"></i>',
width: '15px',
searchable: false
},{
title: 'type',
width: '50px'
},{
title: 'system',
width: '50px'
},{
title: 'alias'
},{
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',
className: 'text-center',
searchable: false
}
]
});
tempConData.push( '<div class="pf-fake-connection ' + connectionClasses + '"></div>' );
systemsElement.hideLoadingAnimation();
// connections table ==================================================
tempConData.push( tempConnectionData.targetName );
// prepare data for dataTables
var connectionData = [];
for(var j = 0; j < mapData.data.connections.length; j++){
var tempConnectionData = mapData.data.connections[j];
connectionData.push(tempConData);
}
var tempConData = [];
tempConData.push( Util.getScopeInfoForMap( tempConnectionData.scope, 'label') );
// source system name
tempConData.push( tempConnectionData.sourceName );
// connection
var connectionClasses = [];
for(var k = 0; k < tempConnectionData.type.length; k++){
connectionClasses.push( Util.getConnectionInfo( tempConnectionData.type[k], 'cssClass') );
var connectionDataTable = connectionTable.dataTable( {
paging: false,
ordering: true,
order: [ 0, 'desc' ],
autoWidth: false,
hover: false,
data: connectionData,
columnDefs: [],
language: {
emptyTable: 'No connections',
zeroRecords: 'No connections found',
lengthMenu: 'Show _MENU_ connections',
info: 'Showing _START_ to _END_ of _TOTAL_ connections'
},
columns: [
{
title: 'scope',
width: '50px',
orderable: false
},{
title: 'source system'
},{
title: 'connection',
width: '80px',
class: 'text-center',
orderable: false,
searchable: false
},{
title: 'target system'
}
]
connectionClasses = connectionClasses.join(' ');
tempConData.push( '<div class="pf-fake-connection ' + connectionClasses + '"></div>' );
tempConData.push( tempConnectionData.targetName );
connectionData.push(tempConData);
}
var connectionDataTable = connectionTable.dataTable( {
paging: false,
ordering: true,
order: [ 0, 'desc' ],
autoWidth: false,
hover: false,
data: connectionData,
columnDefs: [],
language: {
emptyTable: 'No connections',
zeroRecords: 'No connections found',
lengthMenu: 'Show _MENU_ connections',
info: 'Showing _START_ to _END_ of _TOTAL_ connections'
},
columns: [
{
title: 'scope',
width: '50px',
orderable: false
},{
title: 'source system'
},{
title: 'connection',
width: '80px',
class: 'text-center',
orderable: false,
searchable: false
},{
title: 'target system'
}
]
});
connectionsElement.hideLoadingAnimation();
});
connectionsElement.hideLoadingAnimation();
});
});
}
};

View File

@@ -2,7 +2,7 @@
* Render controller
*/
define(['jquery', 'lib/mustache', 'jqueryUI'], function($, Mustache) {
define(['jquery', 'lib/mustache'], function($, Mustache) {
"use strict";

6
js/lib/dom.jsPlumb-1.7.2-min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

14
js/lib/jquery.fullscreen.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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

@@ -14,6 +14,33 @@
//baseUrl should be specified as relative to the appDir.
baseUrl: "./",
//Specify modules to stub out in the optimized file. The optimizer will
//use the source version of these modules for dependency tracing and for
//plugin use, but when writing the text into an optimized bundle, these
//modules will get the following text instead:
//If the module is used as a plugin:
// define({load: function(id){throw new Error("Dynamic load not allowed: " + id);}});
//If just a plain module:
// define({});
//This is useful particularly for plugins that inline all their resources
//and use the default module resolution behavior (do *not* implement the
//normalize() method). In those cases, an AMD loader just needs to know
//that the module has a definition. These small stubs can be used instead of
//including the full source for a plugin.
stubModules: ['text'],
//Finds require() dependencies inside a require() or define call. By default
//this value is false, because those resources should be considered dynamic/runtime
//calls. However, for some optimization scenarios, it is desirable to
//include them in the build.
//Introduced in 1.0.3. Previous versions incorrectly found the nested calls
//by default.
findNestedDependencies: false,
//If set to true, any files that were combined into a build bundle will be
//removed from the output folder.
removeCombined: true,
//List the modules that will be optimized. All their immediate and deep
//dependencies will be included in the module's file when the build is
//done. If that module or any of its dependencies includes i18n bundles,
@@ -27,28 +54,44 @@
name: "app/main",
exclude: [
// "jquery",
// "jqueryUI",
// "jsPlumb"
]
}
],
"paths": {
layout: "layout",
jquery: "lib/jquery-1.11.1.min",
//jquery: "lib/jquery-2.1.1.min",
//jqueryUI: "lib/jquery-ui.min",
jqueryUI: "lib/jquery-ui-custom.min", // custom script (without tooltip -> conflict with bootstrap)
bootstrap: "lib/bootstrap.min",
text: "lib/requirejs/text",
templates: "../templates",
jsPlumb: "lib/jsPlumb-1.6.4-min", // main map draw plugin
customScrollbar: "lib/jquery.mCustomScrollbar.concat.min", // custom scroll bars
datatables: "lib/jquery.dataTables.min", // tables
datatablesBootstrap: "lib/dataTables.bootstrap", // not used (bootstrap style)
xEditable: "lib/bootstrap-editable.min", // in placed editing
morris: "lib/morris.min", // graphs
raphael: "lib/raphael-min", // required for morris (dependency)
bootbox: "lib/bootbox.min" // custom dialogs
paths: {
layout: 'layout',
jquery: 'lib/jquery-1.11.1.min', // v1.11.1 jQuery
//jquery: "lib/jquery-2.1.1.min", // v2.1.1 jQuery
//jqueryUI: "lib/jquery-ui.min", // v1.11.2 jQuery UI default
//jqueryUI: 'lib/jquery-ui-custom.min', // v1.11.2 custom script (without tooltip -> conflict with bootstrap)
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.
templates: '../templates', // template dir
slidebars: 'lib/slidebars', // v0.10 Slidebars - side menu plugin http://plugins.adchsm.me/slidebars/
// jsPlumb: 'lib/jsPlumb-1.6.4-min', // v1.4.6 jsPlumb - main map draw plugin http://www.jsplumb.org/
jsPlumb: 'lib/dom.jsPlumb-1.7.2-min', // v1.7.2 jsPlumb (Vanilla)- main map draw plugin http://www.jsplumb.org/
customScrollbar: 'lib/jquery.mCustomScrollbar.concat.min', // v3.1.11 Custom scroll bars - http://manos.malihu.gr/
datatables: 'lib/jquery.dataTables.min', // v1.10.3 DataTables - tables
datatablesBootstrap: 'lib/dataTables.bootstrap', // DataTables - not used (bootstrap style)
xEditable: 'lib/bootstrap-editable.min', // v1.5.1 X-editable - in placed editing
morris: 'lib/morris.min', // v0.5.0 Morris.js - graphs and charts
raphael: 'lib/raphael-min', // v2.1.2 Raphaël - required for morris (dependency)
bootbox: 'lib/bootbox.min', // v4.3.0 Bootbox.js - custom dialogs
easyPieChart: 'lib/jquery.easypiechart.min', // v2.1.6 Easy Pie Chart - HTML 5 pie charts - http://rendro.github.io/easy-pie-chart/
dragToSelect: 'lib/jquery.dragToSelect', // v1.1 Drag to Select - http://andreaslagerkvist.com/jquery/drag-to-select/
hoverIntent: 'lib/jquery.hoverIntent.minified', // v1.8.0 Hover intention - http://cherne.net/brian/resources/jquery.hoverIntent.html
pnotify: 'lib/pnotify/pnotify.core', // v2.0.1 PNotify - notification core file
//'pnotify.buttons': 'lib/pnotify/pnotify.buttons', // PNotify - buttons notification extension
//'pnotify.confirm': 'lib/pnotify/pnotify.confirm', // PNotify - confirmation notification extension
'pnotify.nonblock': 'lib/pnotify/pnotify.nonblock', // PNotify - notification non-block extension (hover effect)
'pnotify.desktop': 'lib/pnotify/pnotify.desktop', // PNotify - desktop push notification extension
//'pnotify.history': 'lib/pnotify/pnotify.history', // PNotify - history push notification history extension
'pnotify.callbacks': 'lib/pnotify/pnotify.callbacks' // PNotify - callbacks push notification extension
// 'pnotify.reference': 'lib/pnotify/pnotify.reference' // PNotify - reference push notification extension
},
shim: {
jqueryUI: {
@@ -56,7 +99,10 @@
deps: ['jquery']
},
bootstrap: {
deps: ['jquery', 'jqueryUI']
deps: ['jquery']
},
slidebars: {
deps: ['jquery']
},
customScrollbar: {
deps: ['jquery']
@@ -77,6 +123,21 @@
morris: {
deps: ['jquery', 'raphael'],
exports: 'Morris'
},
pnotify: {
deps : ['jquery']
},
easyPieChart: {
deps : ['jquery']
},
dragToSelect: {
deps : ['jquery']
},
hoverIntent: {
deps : ['jquery']
},
fontDetect: {
export : 'FontDetect'
}
},

3
node_modules/.bin/readme.txt generated vendored Normal file
View File

@@ -0,0 +1,3 @@
- requireJS optimizer in diesem ordner starten:
node r.js -o build.js

View File

@@ -87,7 +87,7 @@ $pf-font-path: "../fonts" !default;
$font-family-sans-serif: 'Oxygen', "Helvetica Neue", Helvetica, Arial, sans-serif !default;
$font-family-serif: 'Oxygen Regular' Georgia, "Times New Roman", Times, serif !default;
$font-family-serif: 'Oxygen' Georgia, "Times New Roman", Times, serif !default;
$font-family-monospace: Monaco, Menlo, Consolas, "Courier New", monospace;
$font-family-bold: 'Oxygen Bold', "Helvetica Neue", Helvetica, Arial, sans-serif !default;
$font-family-base: $font-family-sans-serif;
@@ -369,7 +369,7 @@ $navbar-default-link-disabled-bg: transparent;
// Navbar brand label
$navbar-default-brand-color: $navbar-default-link-color;
$navbar-default-brand-hover-color: $teal-dark;
$navbar-default-brand-hover-color: $teal;
$navbar-default-brand-hover-bg: transparent;
// Navbar toggle

View File

@@ -17,6 +17,23 @@ em{
}
}
// full screen view of an element
.pf-fullscreen{
&:fullscreen, &:-webkit-full-screen, {
background-color: red;
}
&:-webkit-full-screen{
background:url("#{$base-url}/#{$body-background-image}") $body-background-color;
background-repeat: no-repeat;
}
&:-moz-full-screen{
background-color: green;
}
}
// ajax laoding indicator overlay
.pf-loading-overlay{
@@ -105,7 +122,7 @@ em{
margin: 10px 0 0 0;
padding-bottom: 40px; // space for footer
// alle Module innerhalb einer row
// all modules within a row
.pf-module{
font-family: $font-family-bold;
background: rgba($gray, 0.3);
@@ -120,32 +137,39 @@ em{
// WH effects ==================================================
.pf-system-effect{
display: none; // if effect is active it will be overwritten
cursor: default;
color: $gray-lighter;
}
.pf-system-effect-magnetar{
color: $wh-color-magnetar;
display: inline-block;
}
.pf-system-effect-redgiant{
color: $wh-color-redgiant;
display: inline-block;
}
.pf-system-effect-pulsar{
color: $wh-color-pulsar;
display: inline-block;
}
.pf-system-effect-wolfryet{
color: $wh-color-wolfryet;
display: inline-block;
}
.pf-system-effect-cataclysmic{
color: $wh-color-cataclysmic;
display: inline-block;
}
.pf-system-effect-blackhole{
color: $wh-color-blackhole;
display: inline-block;
}
// system info status ================================================
@@ -335,6 +359,7 @@ em{
position: absolute;
left: 25px;
top: -6px;
font-family: $font-family-bold;
@include border-radius(3px);
}
}
@@ -348,6 +373,7 @@ em{
position: absolute;
left: 9px;
top: -6px;
font-family: $font-family-bold;
@include border-radius(3px);
}
}
@@ -381,6 +407,36 @@ em{
border-left-color: $gray-light;
}
// header =======================================================
#pf-head{
a{
&:hover{
text-decoration: none;
}
}
.pf-head-menu{
.pf-head-menu-logo{
width: 18px;
height: 18px;
display: inline-block;
float: left;
background: inline-image("#{$base-url}/icons/logo-18x18-gray.png");
}
&:hover .pf-head-menu-logo{
background: inline-image("#{$base-url}/icons/logo-18x18-teal.png");
}
&:focus .pf-head-menu-logo{
background: inline-image("#{$base-url}/icons/logo-18x18-teal.png");
}
}
}
// footer =======================================================
#pf-footer{
position: absolute;
@@ -389,6 +445,16 @@ em{
width: 100%;
margin: 0;
background: rgba($gray, 0.3);
a{
font-family: $font-family-serif;
color: $teal-darker;
&:hover{
color: $teal-dark;
text-decoration: none;
}
}
}
/*

View File

@@ -63,7 +63,7 @@
// 20x20px grid background
.pf-grid-small{
background: url("#{$base-url}/grid_20x20.png") !important;
background: inline-image("#{$base-url}/grid_20x20.png") !important;
}
@@ -75,7 +75,7 @@
.pf-system{
position: absolute;
min-width: 80px;
min-width: 60px;
height: auto;
background-color: $gray-dark;
font-family: $font-family-bold;
@@ -93,6 +93,8 @@
.pf-system-head{
padding: 0px 3px 0px 3px;
cursor: pointer;
font-family: Arial; // fix for element width on custom font family
font-weight: bold;
.pf-system-head-name{
border: none;
@@ -241,7 +243,7 @@
cursor: pointer;
stroke-linecap: round; // line endings
path:not(first-child){
path:not(:first-child){
stroke: $gray; // inner line
}
@@ -256,13 +258,13 @@
}
}
svg.pf-map-connection-stargate {
svg.pf-map-connection-stargate {
path:first-child{
stroke: $gray-light;
}
path:not(first-child){
path:not(:first-child){
stroke: $gray-light;
}
@@ -273,14 +275,14 @@
}
}
svg.pf-map-connection-jumpbridge {
svg.pf-map-connection-jumpbridge {
path:first-child{
stroke: $teal-light;
stroke: $teal;
}
path:not(first-child){
stroke: $teal-light;
path:not(:first-child){
stroke: $teal;
}
&:hover{
@@ -290,11 +292,11 @@
}
}
svg.pf-map-connection-wh {
svg.pf-map-connection-wh-fresh {
// special wh-connection style (
}
svg.pf-map-connection-wh-eol {
svg.pf-map-connection-wh-eol {
path:first-child{
stroke: $pink-dark;
@@ -307,16 +309,16 @@
}
}
svg.pf-map-connection-wh-reduced {
svg.pf-map-connection-wh-reduced {
path:not(first-child){
path:not(:first-child){
stroke: $orange;
}
}
svg.pf-map-connection-wh-critical {
svg.pf-map-connection-wh-critical {
path:not(first-child){
path:not(:first-child){
stroke: $red-darker;
}
}

View File

@@ -301,7 +301,8 @@
}
.mCSB_scrollTools .mCSB_buttonUp, .mCSB_scrollTools .mCSB_buttonDown, .mCSB_scrollTools .mCSB_buttonLeft, .mCSB_scrollTools .mCSB_buttonRight {
background-image: url(../img/custom-scrollbar/mCSB_buttons.png);
// background-image: url(../img/custom-scrollbar/mCSB_buttons.png); inline image
background: inline-image("#{$base-url}/custom-scrollbar/mCSB_buttons.png");;
background-repeat: no-repeat;
opacity: 0.4;
filter: "alpha(opacity=40)";

File diff suppressed because it is too large Load Diff

View File

@@ -39,6 +39,7 @@ html > body > .ui-pnotify {
}
.ui-pnotify-text {
display: block;
font-family: $font-family-bold;
}
.ui-pnotify-icon, .ui-pnotify-icon span {
display: block;

View File

@@ -25,7 +25,6 @@
// Libraries (Remove if not needed)
//@import "library/animation/animation-engine";
//@import "library/jqueryui/jquery-ui-1.10.3.custom";
@import "library/custom-scrollbar/_mCustomScrollbar"; // malihu-custom-scrollbar-plugin
@import "library/data-tables/_dataTables"; // DataTables 1.10.3
@import "library/data-tables/_dataTables-bootstrap"; // DataTables 1.10.3 bootsrap integration

View File

@@ -914,7 +914,7 @@ input[type="text"]:focus + .input-group-addon {
box-shadow: inset 0 -1px 0 rgba(red($black), green($black), blue($black), 0.15);
font-weight:bold;
text-shadow: 0 -1px 0 rgba(red($black), green($black), blue($black), 0.25);
background-image:url("#{$base-url}/overlay-pattern.png");
//background-image:url("#{$base-url}/overlay-pattern.png");
-webkit-transition: width 1.5s ease-in-out;
transition: width 1.5s ease-in-out;
}

View File

@@ -2,10 +2,14 @@
<div class="container-fluid">
<div class="navbar-header pull-left">
<p class="navbar-text txt-color txt-color-gray"><i class="fa fa-copyright"></i> 2015 by Exodus 4D, Mark Friedrich</p>
<p class="navbar-text txt-color txt-color-gray"><i class="fa fa-copyright"></i>
2015 <a href="https://github.com/exodus4d" target="_blank"><i class="fa fa-github fa-lg fa-fw"></i>Exodus 4D</a>
</p>
</div>
<div class="navbar-header pull-right">
<p class="navbar-text txt-color txt-color-gray">All EVE related materials are property of <a target="_blank" href="http://www.ccpgames.com/">CCP Games</a></p>
<p class="navbar-text txt-color txt-color-gray">All <a href="http://www.eveonline.com/" target="_blank">EVE ONLINE</a>
related materials are property of
<a target="_blank" href="http://www.ccpgames.com/">CCP Games</a></p>
</div>
</div>
</div>

View File

@@ -1,18 +1,21 @@
<div class="navbar navbar-default pf-head" role="navigation">
<div id="{{id}}" class="navbar navbar-default pf-head" role="navigation">
<div class="container-fluid">
<div class="navbar-header pull-left">
<a class="navbar-brand pf-head-menu" href="#">
<i class="fa fa-bars fa-lg fa-fw"></i>&nbsp;Menu
<!-- <img src="https://image.eveonline.com/Type/17738_32.png" /> -->
<div class={{brandLogo}}></div>&nbsp;&nbsp;Menu
</a>
<p class="navbar-text">Current system: Jita</p>
</div>
<div class="navbar-header pull-right">
<p class="navbar-text"><span class="badge bg-color bg-color-teal">7</span>&nbsp;&nbsp;&nbsp;online</p>
<p class="navbar-text">Signed in as {{userName}}</p>
<p class="navbar-text"><i class="fa fa-user fa-fw"></i> {{userName}}</p>
<p class="navbar-text"><a href="#"><i class="fa fa-map-marker fa-fw"></i> J155207</a></p>
<p class="navbar-text txt-color txt-color-green">
<i class="fa fa-refresh">&nbsp;</i>
active&nbsp;&nbsp;<span class="badge">4</span></p>
<a class="navbar-brand pf-head-map" href="#">
Map&nbsp;<i class="fa fa-code-fork fa-lg fa-fw"></i>
&nbsp;&nbsp;Map&nbsp;<i class="fa fa-code-fork fa-lg fa-fw"></i>
</a>
</div>
</div>

View File

@@ -39,6 +39,7 @@
<ul class="list-unstyled well" style=" margin-left: 10px;">
<li><i class="fa fa-info fa-fw"></i> Show some basic map information</li>
<li><i class="fa fa-plus fa-fw"></i> Add a new system at the position, you clicked at</li>
<li><i class="fa fa-filter fa-fw"></i> Filter map connections by a scope <small><a href="#" data-target="#pf-manual-scrollspy-anchor-connection-scope">more</a></small></li>
<li><i class="fa fa-eraser fa-fw"></i> Delete selected systems <small><a href="#" data-target="#pf-manual-scrollspy-anchor-system-delete">more</a></small></li>
</ul>
<h4 id="pf-manual-scrollspy-anchor-map-select">Select methods</h4>
@@ -49,7 +50,7 @@
<p>
Locked systems <small>(<i class="fa fa-lock fa-fw"></i><a href="#" data-target="#pf-manual-scrollspy-anchor-system-locked">more</a>)</small> can´t be selected.
</p>
<h4><i class="fa fa-th fa-fw"></i> Grid snapping</h4>
<h4><i class="glyphicon glyphicon-th"></i> Grid snapping</h4>
<p>
The <em>"Grid snapping"</em> option can be activated on the "Map Menu" <small>(<i class="fa fa-code-fork fa-fw"></i>)</small>. Systems will snap to a <samp>20x20px</samp> grid.
A grid overlay appears on the map.
@@ -188,6 +189,17 @@
<li>Switch Connection: <kbd>click</kbd><small> a <em>"Connection Endpoints"</em> and </small><kbd>drag</kbd><small> it to any other system</small></li>
<li>Add new System: <small>Add a system by using the context menu of a system (<a href="#" data-target="#pf-manual-scrollspy-anchor-system-contextmenu">more</a>)</small></li>
</ul>
<h4 id="pf-manual-scrollspy-anchor-connection-scope"><i class="fa fa-crosshairs fa-fw"></i> Connection scope</h4>
<p>
Each connection has its own <em>"Scope"</em>. Scopes represent connection types that exist in game.<br>
Maps can be filtered by specific scopes <small>(<a href="#" data-target="#pf-manual-scrollspy-anchor-map-contextmenu">more</a>)</small>.<br>
The <em>"Scope"</em> of a connection can be changed by using the context menu of a connection <small>(<a href="#" data-target="#pf-manual-scrollspy-anchor-connection-contextmenu">more</a>)</small>.
</p>
<ul class="list-unstyled" style=" margin-left: 10px;">
<li><div class="pf-fake-connection"></div> Wormhole<small> (Wormhole has not yet had its stability significantly disrupted)</small></li>
<li><div class="pf-fake-connection pf-map-connection-stargate"></div> Stargate<small> (Stargates are static <em>"K-space"</em> connections)</small></li>
<li><div class="pf-fake-connection pf-map-connection-jumpbridge"></div> Jumpbridge<small> (Jumpbridges are Player build <em>"K-space"</em> connections)</small></li>
</ul>
<h4 id="pf-manual-scrollspy-anchor-connection-status">Connection status</h4>
<p>
Wormholes will gain various statuses during its <em>"Lifetime"</em>.<br>
@@ -196,7 +208,6 @@
</p>
<ul class="list-unstyled" style=" margin-left: 10px;">
<li><div class="pf-fake-connection pf-map-connection-wh-eol"></div> end of life<small> (Wormhole is the end of its natural lifetime)</small></li>
<li><div class="pf-fake-connection"></div> fresh<small> (Wormhole has not yet had its stability significantly disrupted)</small></li>
<li><div class="pf-fake-connection pf-map-connection-wh-reduced"></div> reduced<small> (Wormhole had its stability reduced, but not to a critical degree) &lt;50% mass left</small></li>
<li><div class="pf-fake-connection pf-map-connection-wh-critical"></div> critical<small> (Wormhole is on the verge of collapse) &lt;10% mass left</small></li>
<li><div class="pf-fake-connection pf-map-connection-frig"></div> Frigate hole<small> (Only the smallest ships pass through)</small></li>
@@ -220,6 +231,7 @@
<li><i class="fa fa-plane fa-fw"></i> Toggles this connection as <em>"Frigate Hole"</em> <small><a href="#" data-target="#pf-manual-scrollspy-anchor-connection-frig">more</a></small></li>
<li><i class="fa fa-warning fa-fw"></i> Toggles this connection as <em>"Preserve Mass"</em> <small><a href="#" data-target="#pf-manual-scrollspy-anchor-connection-mass">more</a></small></li>
<li><i class="fa fa-reply fa-rotate-180 fa-fw"></i> Changes the status of this connection <small><a href="#" data-target="#pf-manual-scrollspy-anchor-connection-status">more</a></small></li>
<li><i class="fa fa-crosshairs fa-fw"></i> Changes the scope of this connection <small><a href="#" data-target="#pf-manual-scrollspy-anchor-connection-scope">more</a></small></li>
<li><i class="fa fa-eraser fa-fw"></i> Delete this connection <small><a href="#" data-target="#pf-manual-scrollspy-anchor-connection-delete">more</a></small></li>
</ul>
<h4 id="pf-manual-scrollspy-anchor-connection-frig"><i class="fa fa-plane fa-fw"></i> Frigate hole</h4>

View File

@@ -7,8 +7,8 @@
<textarea style="resize: vertical" rows="3" id="form_result" name="clipboard" class="form-control custom-scroll"></textarea>
<span class="help-block">
Copy and paste signatures from your probe scanning window.
Hit <kbd>ctrl</kbd> + <kbd>a</kbd> (for copy)
then <kbd>ctrl</kbd> + <kbd>c</kbd> (for paste). This tool can add and update signatures.
Hit <kbd>ctrl</kbd> + <kbd>c</kbd> (for copy)
then <kbd>ctrl</kbd> + <kbd>v</kbd> (for paste). This tool can add and update signatures.
</span>
</div>
</div>

View File

@@ -1,16 +0,0 @@
<ul class="nav nav-tabs" role="tablist" id="{{id}}">
{{#tabs}}
<li role="presentation" class="{{tabClass}} {{#pullRight}}pull-right{{/pullRight}} {{#active}}active{{/active}}">
<a href="#pf-map-tab-{{id}}" data-map-index="{{index}}" role="tab" data-toggle="tab">
<i class="fa fa-fw {{icon}}"></i>
<span class="nav-tabs-link">{{name}}</span>
</a>
</li>
{{/tabs}}
</ul>
<div class="tab-content" data-map-tabs="{{id}}" >
{{#tabs}}
<div role="tabpanel" class="tab-pane {{contentClass}} {{#active}}active{{/active}}" data-map-index="{{index}}" id="pf-map-tab-{{id}}"></div>
{{/tabs}}
</div>