bigfixing
This commit is contained in:
1
.idea/dictionaries/exodus4d.xml
generated
1
.idea/dictionaries/exodus4d.xml
generated
@@ -24,6 +24,7 @@
|
||||
<w>jumpbridge</w>
|
||||
<w>killboard</w>
|
||||
<w>killmail</w>
|
||||
<w>loopback</w>
|
||||
<w>malihu</w>
|
||||
<w>minify</w>
|
||||
<w>mouseover</w>
|
||||
|
||||
2
.idea/pathfinder.iml
generated
2
.idea/pathfinder.iml
generated
@@ -29,7 +29,7 @@
|
||||
<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="compass-library" level="project" />
|
||||
<orderEntry type="library" name="jquery-DefinitelyTyped" level="application" />
|
||||
<orderEntry type="library" name="compass-library" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
1730
.idea/workspace.xml
generated
1730
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@ requirejs.config({
|
||||
img: '../public/img', // images dir
|
||||
slidebars: 'lib/slidebars', // v0.10 Slidebars - side menu plugin http://plugins.adchsm.me/slidebars/
|
||||
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.1.11 Custom scroll bars - http://manos.malihu.gr/
|
||||
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)
|
||||
datatablesResponsive: 'lib/datatables/extensions/responsive/dataTables.responsive', // v1.0.6 TableTools (PlugIn) - https://datatables.net/extensions/responsive/
|
||||
@@ -37,6 +37,8 @@ requirejs.config({
|
||||
blueImpGalleryHelper: 'lib/blueimp-helper', // helper function for Blue Imp Gallery
|
||||
blueImpGalleryBootstrap: 'lib/bootstrap-image-gallery', // v3.1.1 Bootstrap extension for Blue Imp Gallery - https://blueimp.github.io/Bootstrap-Image-Gallery/
|
||||
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',
|
||||
@@ -122,6 +124,9 @@ requirejs.config({
|
||||
},
|
||||
bootstrapConfirmation: {
|
||||
deps : ['bootstrap']
|
||||
},
|
||||
bootstrapToggle: {
|
||||
deps : ['jquery']
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -63,7 +63,7 @@ define(["jquery"], function($) {
|
||||
* init a live counter based on a unix timestamp
|
||||
* @returns {*}
|
||||
*/
|
||||
$.fn.initSignatureCounter = function(){
|
||||
$.fn.initTimestampCounter = function(){
|
||||
return this.each(function(){
|
||||
|
||||
var element = $(this);
|
||||
|
||||
@@ -30,6 +30,8 @@ define(['jquery'], function($) {
|
||||
saveSystem: 'api/system/save', // ajax URL - saves system to map
|
||||
deleteSystem: 'api/system/delete', // ajax URL - delete system from map
|
||||
getSystemGraphData: 'api/system/graphData', // ajax URL - get all system graph data
|
||||
getConstellationData: 'api/system/constellationData', // ajax URL - get system constellation data
|
||||
|
||||
// connection API
|
||||
saveConnection: 'api/connection/save', // ajax URL - save new connection to map
|
||||
deleteConnection: 'api/connection/delete', // ajax URL - delete connection from map
|
||||
@@ -230,19 +232,34 @@ define(['jquery'], function($) {
|
||||
}
|
||||
},
|
||||
stargate: {
|
||||
cssClass: 'pf-map-connection-stargate'
|
||||
cssClass: 'pf-map-connection-stargate',
|
||||
paintStyle: {
|
||||
dashstyle: '0' // solid line
|
||||
}
|
||||
},
|
||||
wh_eol: {
|
||||
cssClass: 'pf-map-connection-wh-eol'
|
||||
cssClass: 'pf-map-connection-wh-eol',
|
||||
paintStyle: {
|
||||
dashstyle: '0' // solid line
|
||||
}
|
||||
},
|
||||
wh_fresh: {
|
||||
cssClass: 'pf-map-connection-wh-fresh'
|
||||
cssClass: 'pf-map-connection-wh-fresh',
|
||||
paintStyle: {
|
||||
dashstyle: '0' // solid line
|
||||
}
|
||||
},
|
||||
wh_reduced: {
|
||||
cssClass: 'pf-map-connection-wh-reduced'
|
||||
cssClass: 'pf-map-connection-wh-reduced',
|
||||
paintStyle: {
|
||||
dashstyle: '0' // solid line
|
||||
}
|
||||
},
|
||||
wh_critical: {
|
||||
cssClass: 'pf-map-connection-wh-critical'
|
||||
cssClass: 'pf-map-connection-wh-critical',
|
||||
paintStyle: {
|
||||
dashstyle: '0' // solid line
|
||||
}
|
||||
},
|
||||
frigate: {
|
||||
cssClass: 'pf-map-connection-frig',
|
||||
|
||||
@@ -142,6 +142,11 @@ define([
|
||||
*/
|
||||
var initCarousel = function(){
|
||||
|
||||
// check if carousel exists (e.g. not in IGB browser
|
||||
if($('#' + config.galleryCarouselId).length === 0){
|
||||
return;
|
||||
}
|
||||
|
||||
// extent "blueimp" gallery for a textFactory method to show HTML templates
|
||||
Gallery.prototype.textFactory = function (obj, callback) {
|
||||
var newSlideContent = $('<div>')
|
||||
|
||||
@@ -179,7 +179,17 @@ define([
|
||||
// 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()
|
||||
};
|
||||
|
||||
@@ -266,7 +276,6 @@ define([
|
||||
};
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -11,7 +11,7 @@ define(['jquery'], function($) {
|
||||
return this.each(function () {
|
||||
|
||||
// Open context menu
|
||||
$(this).on('pf:openContextMenu', function (e, originalEvent, component, hiddenOptions, activeOptions) {
|
||||
$(this).off('pf:openContextMenu').on('pf:openContextMenu', function (e, originalEvent, component, hiddenOptions, activeOptions) {
|
||||
|
||||
// hide all other open context menus
|
||||
$('#pf-dialog-wrapper > .dropdown-menu').hide();
|
||||
@@ -41,11 +41,12 @@ define(['jquery'], function($) {
|
||||
position: 'absolute',
|
||||
left: getLeftLocation(originalEvent),
|
||||
top: getTopLocation(originalEvent)
|
||||
}).off('click').velocity('transition.flipXIn', {
|
||||
duration: 180,
|
||||
}).velocity('transition.flipXIn', {
|
||||
duration: 150,
|
||||
complete: function(){
|
||||
// set context menu "click" observer
|
||||
$(this).on('click', {component: component, position:{x: getLeftLocation(originalEvent), y: getTopLocation(originalEvent)}}, function (e) {
|
||||
$(this).one('click', {component: component, position:{x: getLeftLocation(originalEvent), y: getTopLocation(originalEvent)}}, function (e) {
|
||||
// hide contextmenu
|
||||
$(this).hide();
|
||||
|
||||
var params = {
|
||||
@@ -60,16 +61,16 @@ define(['jquery'], function($) {
|
||||
}
|
||||
});
|
||||
|
||||
//make sure menu closes on any click
|
||||
$(document).one('click.closeContextmenu', function () {
|
||||
$('.dropdown-menu[role="menu"]').velocity('transition.flipXOut', {
|
||||
duration: 150
|
||||
});
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
//make sure menu closes on any click
|
||||
$(document).off('click').on('click', function () {
|
||||
|
||||
$('.dropdown-menu[role="menu"]').velocity('transition.flipXOut', {
|
||||
duration: 180
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function getLeftLocation(e) {
|
||||
|
||||
@@ -17,7 +17,7 @@ define([
|
||||
var config = {
|
||||
zIndexCounter: 110,
|
||||
newSystemOffset: {
|
||||
x: 150,
|
||||
x: 130,
|
||||
y: 0
|
||||
},
|
||||
|
||||
@@ -25,6 +25,7 @@ define([
|
||||
mapSnapToGrid: false, // Snap systems to grid while dragging
|
||||
mapTabContentClass: 'pf-map-tab-content', // Tab-Content element (parent element)
|
||||
mapWrapperClass: 'pf-map-wrapper', // wrapper div (scrollable)
|
||||
headMapTrackingId: 'pf-head-map-tracking', // id for "map tracking" toggle (checkbox)
|
||||
|
||||
mapClass: 'pf-map', // class for all maps
|
||||
mapGridClass: 'pf-grid-small', // class for map grid snapping
|
||||
@@ -40,8 +41,9 @@ define([
|
||||
systemBodyClass: 'pf-system-body', // class for system body
|
||||
systemBodyItemHeight: 16, // px of a system body entry
|
||||
systemBodyItemClass: 'pf-system-body-item', // class for a system body entry
|
||||
systemBodyItemStatusClass: 'pf-user-status',
|
||||
systemBodyRightClass: 'pf-system-body-right',
|
||||
systemBodyItemStatusClass: 'pf-user-status', // class for player status in system body
|
||||
systemBodyItemNameClass: 'pf-system-body-item-name', // class for player name in system body
|
||||
systemBodyRightClass: 'pf-system-body-right', // class for player ship name in system body
|
||||
systemTooltipInnerClass: 'pf-system-tooltip-inner', // class for system tooltip content
|
||||
systemTooltipInnerIdPrefix: 'pf-system-tooltip-inner-', // id prefix for system tooltip content
|
||||
dynamicElementWrapperId: 'pf-dialog-wrapper', // wrapper div for dynamic content (dialogs, context-menus,...)
|
||||
@@ -83,27 +85,22 @@ define([
|
||||
var globalMapConfig = {
|
||||
source: {
|
||||
filter: '.' + config.systemHeadNameClass,
|
||||
// anchor: 'Continuous',
|
||||
allowLoopback: false, // loopback connections are not allowed
|
||||
//isSource:true,
|
||||
isTarget:true, // add target Endpoint to each system (e.g. for drag&drop)
|
||||
uniqueEndpoint: false, // each connection has its own endpoint visible
|
||||
allowLoopback: false, // loopBack connections are not allowed
|
||||
cssClass: config.endpointSourceClass,
|
||||
uniqueEndpoint: false, // each connection has its own endpoint visible
|
||||
dragOptions:{
|
||||
// scope: 'fgd'
|
||||
},
|
||||
connectionsDetachable: true, // dragOptions are set -> allow detaching them
|
||||
maxConnections: 10 // due to isTarget is true, this is the max count of !out!-going connections
|
||||
},
|
||||
target: {
|
||||
// filter: '.' + config.systemHeadNameClass,
|
||||
// anchor: 'Continuous',
|
||||
filter: '.' + config.systemHeadNameClass,
|
||||
isSource:true,
|
||||
//isTarget:true,
|
||||
allowLoopback: false, // loopback connections are not allowed
|
||||
cssClass: config.endpointTargetClass,
|
||||
//isTarget:true,
|
||||
// uniqueEndpoint: false,
|
||||
isSource:true,
|
||||
// connectionsDetachable: false,
|
||||
dropOptions: {
|
||||
tolerance: 'touch',
|
||||
hoverClass: config.systemActiveClass,
|
||||
@@ -147,13 +144,12 @@ define([
|
||||
data &&
|
||||
data.user
|
||||
){
|
||||
|
||||
var cacheArray = [];
|
||||
// loop all active pilots and build cache-key
|
||||
for(var i = 0; i < data.user.length; i++){
|
||||
userCounter++;
|
||||
var tempUserData = data.user[i];
|
||||
cacheArray.push(tempUserData.id + '_' + tempUserData.log.ship.typeName);
|
||||
cacheArray.push(tempUserData.id + '_' + tempUserData.log.ship.id);
|
||||
}
|
||||
var cacheKey = cacheArray.join('_');
|
||||
|
||||
@@ -182,11 +178,12 @@ define([
|
||||
})
|
||||
).append(
|
||||
$('<i>', {
|
||||
class: ['fa', 'fa-circle', config.systemBodyItemStatusClass, statusClass].join(' ')
|
||||
class: ['fa', 'fa-fw', 'fa-circle', config.systemBodyItemStatusClass, statusClass].join(' ')
|
||||
})
|
||||
).append(
|
||||
$('<span>', {
|
||||
text: ' ' + userName
|
||||
class: config.systemBodyItemNameClass,
|
||||
text: userName
|
||||
})
|
||||
);
|
||||
|
||||
@@ -251,7 +248,7 @@ define([
|
||||
system.toggleSystemTooltip('destroy', {});
|
||||
|
||||
// no user -> clear SystemBody
|
||||
systemHeadExpand.velocity('stop', true).velocity('reverse',{
|
||||
systemHeadExpand.velocity('stop').velocity('reverse',{
|
||||
display: 'none',
|
||||
complete: function(){
|
||||
system.toggleBody(false, map, {});
|
||||
@@ -556,7 +553,6 @@ define([
|
||||
// show tooltip
|
||||
$(system).toggleSystemTooltip('show', {show: true});
|
||||
|
||||
|
||||
map.revalidate( systemId );
|
||||
}
|
||||
}
|
||||
@@ -564,7 +560,6 @@ define([
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// set system name or alias
|
||||
var systemName = data.name;
|
||||
|
||||
@@ -736,7 +731,7 @@ define([
|
||||
currentConnectionData[c].updated < connectionData.updated
|
||||
){
|
||||
// connection changed -> update
|
||||
var tempConnection = activeConnections[mapData.config.id][connectionData.id];
|
||||
var tempConnection = $().getConnectionById(mapData.config.id, connectionData.id);
|
||||
updateConnection(tempConnection, currentConnectionData[c], connectionData);
|
||||
}
|
||||
|
||||
@@ -764,20 +759,19 @@ define([
|
||||
}
|
||||
}
|
||||
|
||||
if(
|
||||
deleteThisConnection === true &&
|
||||
activeConnections[mapData.config.id][currentConnectionData[d].id] !== undefined
|
||||
){
|
||||
// connection not found -> delete connection
|
||||
var deleteConnection = activeConnections[mapData.config.id][currentConnectionData[d].id];
|
||||
if(deleteThisConnection === true){
|
||||
// get connection from cache -> delete connection
|
||||
var deleteConnection = $().getConnectionById(mapData.config.id, currentConnectionData[d].id);
|
||||
|
||||
// check if "source" and "target" still exist before remove
|
||||
// this is NOT the case if the system was removed previous
|
||||
if(
|
||||
deleteConnection.source &&
|
||||
deleteConnection.target
|
||||
){
|
||||
mapConfig.map.detach(deleteConnection, {fireEvent: false});
|
||||
if(deleteConnection){
|
||||
// check if "source" and "target" still exist before remove
|
||||
// this is NOT the case if the system was removed previous
|
||||
if(
|
||||
deleteConnection.source &&
|
||||
deleteConnection.target
|
||||
){
|
||||
mapConfig.map.detach(deleteConnection, {fireEvent: false});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -788,6 +782,26 @@ define([
|
||||
return mapContainer;
|
||||
};
|
||||
|
||||
/**
|
||||
* get a connection object from "cache" (this requires the "activeConnections" cache to be actual!
|
||||
* @param mapId
|
||||
* @param connectionId
|
||||
* @returns {*}
|
||||
*/
|
||||
$.fn.getConnectionById = function(mapId, connectionId){
|
||||
|
||||
var connection = null;
|
||||
|
||||
if(
|
||||
activeConnections[mapId] &&
|
||||
activeConnections[mapId][connectionId]
|
||||
){
|
||||
connection = activeConnections[mapId][connectionId];
|
||||
}
|
||||
|
||||
return connection;
|
||||
};
|
||||
|
||||
/**
|
||||
* make all systems appear visual on the map with its connections
|
||||
* @param show
|
||||
@@ -909,8 +923,6 @@ define([
|
||||
sourceConfig.connector = Util.getScopeInfoForConnection('wh', 'connectorDefinition');
|
||||
|
||||
map.makeSource(system, sourceConfig);
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -979,10 +991,11 @@ define([
|
||||
// connect new system (if connection data is given)
|
||||
if(connectedSystem){
|
||||
|
||||
// hint: "type" will be auto detected by jump distance
|
||||
var connectionData = {
|
||||
source: $(connectedSystem).data('id'),
|
||||
target: newSystem.data('id'),
|
||||
type: ['wh']
|
||||
type: ['wh_fresh'] // default type.
|
||||
};
|
||||
var connection = drawConnection(map, connectionData);
|
||||
|
||||
@@ -1179,7 +1192,8 @@ define([
|
||||
parameters: {
|
||||
connectionId: connectionId,
|
||||
updated: connectionData.updated
|
||||
}
|
||||
},
|
||||
type: null
|
||||
/* experimental (straight connections)
|
||||
anchors: [
|
||||
[ "Perimeter", { shape: 'Rectangle' }],
|
||||
@@ -1203,8 +1217,7 @@ define([
|
||||
}
|
||||
setConnectionScope(connection, scope);
|
||||
|
||||
// set Observer for new Connection
|
||||
setConnectionObserver(map, connection);
|
||||
// set Observer for new Connection -> is automatically set
|
||||
|
||||
return connection;
|
||||
};
|
||||
@@ -1236,16 +1249,18 @@ define([
|
||||
dataType: 'json'
|
||||
}).done(function(newConnectionData){
|
||||
|
||||
// update connection data
|
||||
connection.setParameter('connectionId', newConnectionData.id);
|
||||
connection.setParameter('updated', newConnectionData.updated);
|
||||
// update connection data e.g. "scope" has auto detected
|
||||
updateConnection(connection, connectionData, newConnectionData);
|
||||
|
||||
var text = 'New connection established';
|
||||
// connection scope
|
||||
var scope = Util.getScopeInfoForConnection(newConnectionData.scope, 'label');
|
||||
|
||||
var title = 'New connection established';
|
||||
if(connectionData.id > 0){
|
||||
text = 'Connection switched';
|
||||
title = 'Connection switched';
|
||||
}
|
||||
|
||||
Util.showNotify({title: text, type: 'success'});
|
||||
Util.showNotify({title: title, text: 'Scope: ' + scope, type: 'success'});
|
||||
}).fail(function( jqXHR, status, error) {
|
||||
|
||||
// remove this connection from map
|
||||
@@ -1258,12 +1273,10 @@ define([
|
||||
};
|
||||
|
||||
/**
|
||||
* Programmatically delete a connection and all related data
|
||||
* delete a connection and all related data
|
||||
* @param connections
|
||||
* @param deleteOnServer
|
||||
*/
|
||||
var deleteConnections = function(connections, deleteOnServer){
|
||||
|
||||
$.fn.deleteConnections = function(connections, callback){
|
||||
if(connections.length > 0){
|
||||
|
||||
// remove connections from map
|
||||
@@ -1277,52 +1290,50 @@ define([
|
||||
}
|
||||
};
|
||||
|
||||
if(deleteOnServer === true){
|
||||
// prepare delete request
|
||||
// prepare delete request
|
||||
|
||||
var map = connections[0]._jsPlumb.instance;
|
||||
var mapContainer = $( map.getContainer() );
|
||||
mapContainer.getMapOverlay('timer').startMapUpdateCounter();
|
||||
var map = connections[0]._jsPlumb.instance;
|
||||
var mapContainer = $( map.getContainer() );
|
||||
mapContainer.getMapOverlay('timer').startMapUpdateCounter();
|
||||
|
||||
|
||||
var connectionIds = [];
|
||||
// systemIds for delete request
|
||||
for(var i = 0; i < connections.length; i++){
|
||||
var connectionId = connections[i].getParameter('connectionId');
|
||||
// drag&drop a new connection does not have an id yet, if connection is not established correct
|
||||
if(connectionId !== undefined){
|
||||
connectionIds[i] = connections[i].getParameter('connectionId');
|
||||
var connectionIds = [];
|
||||
// systemIds for delete request
|
||||
for(var i = 0; i < connections.length; i++){
|
||||
var connectionId = connections[i].getParameter('connectionId');
|
||||
// drag&drop a new connection does not have an id yet, if connection is not established correct
|
||||
if(connectionId !== undefined){
|
||||
connectionIds[i] = connections[i].getParameter('connectionId');
|
||||
}
|
||||
}
|
||||
|
||||
if(connectionIds.length > 0){
|
||||
var requestData = {
|
||||
connectionIds: connectionIds
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: Init.path.deleteConnection,
|
||||
data: requestData,
|
||||
dataType: 'json'
|
||||
}).done(function(data){
|
||||
|
||||
// remove connections from map
|
||||
removeConnections(connections);
|
||||
|
||||
// optional callback
|
||||
if(callback){
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
if(connectionIds.length > 0){
|
||||
var requestData = {
|
||||
connectionIds: connectionIds
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: Init.path.deleteConnection,
|
||||
data: requestData,
|
||||
dataType: 'json'
|
||||
}).done(function(data){
|
||||
|
||||
// remove connections from map
|
||||
removeConnections(connections);
|
||||
|
||||
}).fail(function( jqXHR, status, error) {
|
||||
var reason = status + ' ' + error;
|
||||
Util.showNotify({title: jqXHR.status + ': deleteSystem', text: reason, type: 'warning'});
|
||||
$(document).setProgramStatus('problem');
|
||||
});
|
||||
}
|
||||
}else{
|
||||
// remove connections from map (no request)
|
||||
removeConnections(connections);
|
||||
}).fail(function( jqXHR, status, error) {
|
||||
var reason = status + ' ' + error;
|
||||
Util.showNotify({title: jqXHR.status + ': deleteSystem', text: reason, type: 'warning'});
|
||||
$(document).setProgramStatus('problem');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1337,9 +1348,16 @@ define([
|
||||
var mapContainer = $( map.getContainer() );
|
||||
var mapId = mapContainer.data('id');
|
||||
|
||||
// check id, IDs should never change but must be set after initial save
|
||||
if(connection.getParameter('connectionId') !== newConnectionData.id){
|
||||
connection.setParameter('connectionId', newConnectionData.id);
|
||||
}
|
||||
|
||||
// check scope
|
||||
if(connectionData.scope !== newConnectionData.scope){
|
||||
setConnectionScope(connection, newConnectionData.scope);
|
||||
// for some reason the observers are gone after scope change...
|
||||
setConnectionObserver(map, connection);
|
||||
}
|
||||
|
||||
var addType = $(newConnectionData.type).not(connectionData.type).get();
|
||||
@@ -1383,8 +1401,6 @@ define([
|
||||
|
||||
// set update date
|
||||
connection.setParameter('updated', newConnectionData.updated);
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1393,21 +1409,53 @@ define([
|
||||
* @param scope
|
||||
*/
|
||||
var setConnectionScope = function(connection, scope){
|
||||
var map = connection._jsPlumb.instance;
|
||||
var currentConnector = connection.getConnector();
|
||||
var newConnector = Util.getScopeInfoForConnection(scope, 'connectorDefinition');
|
||||
|
||||
connection.setConnector( Util.getScopeInfoForConnection(scope, 'connectorDefinition') );
|
||||
if(currentConnector.type !== newConnector[0]){
|
||||
// connector has changed
|
||||
|
||||
if(connection.scope !== scope){
|
||||
connection.setConnector( newConnector );
|
||||
|
||||
// remove all connection types
|
||||
connection.clearTypes();
|
||||
|
||||
// set new new connection type
|
||||
// if scope changed -> connection type == scope
|
||||
connection.addType(scope);
|
||||
connection.setType( getDefaultConnectionTypeByScope(scope) );
|
||||
|
||||
// change scope
|
||||
connection.scope = scope;
|
||||
|
||||
// new observer is required after scope change
|
||||
setConnectionObserver(map, connection);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* get the default connection type for a scope
|
||||
* e.g. for new type after scope change
|
||||
* @param scope
|
||||
* @returns {string}
|
||||
*/
|
||||
var getDefaultConnectionTypeByScope = function(scope){
|
||||
|
||||
var type = '';
|
||||
switch(scope){
|
||||
case 'wh':
|
||||
type = 'wh_fresh';
|
||||
break;
|
||||
case 'jumpbridge':
|
||||
type = 'jumpbridge';
|
||||
break;
|
||||
case'stargate':
|
||||
type = 'stargate';
|
||||
break;
|
||||
}
|
||||
|
||||
return type;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1417,8 +1465,6 @@ define([
|
||||
*/
|
||||
var setConnectionWHStatus = function(connection, status){
|
||||
|
||||
var map = connection._jsPlumb.instance;
|
||||
|
||||
if(
|
||||
status === 'wh_fresh' &&
|
||||
connection.hasType('wh_fresh') !== true
|
||||
@@ -1529,7 +1575,7 @@ define([
|
||||
var systemStatus = [];
|
||||
$.each(Init.systemStatus, function(status, statusData){
|
||||
var tempStatus = {
|
||||
subIcon: 'fa-circle',
|
||||
subIcon: 'fa-tag',
|
||||
subIconClass: statusData.class,
|
||||
subAction: 'change_status_' + status,
|
||||
subText: statusData.label
|
||||
@@ -1548,7 +1594,7 @@ define([
|
||||
{icon: 'fa-plus', action: 'add_system', text: 'add system'},
|
||||
{icon: 'fa-lock', action: 'lock_system', text: 'lock system'},
|
||||
{icon: 'fa-users', action: 'set_rally', text: 'set rally point'},
|
||||
{icon: 'fa-reply fa-rotate-180', text: 'change status', subitems: systemStatus},
|
||||
{icon: 'fa-tags', text: 'set status', subitems: systemStatus},
|
||||
{divider: true, action: 'ingame'},
|
||||
{icon: 'fa-reply fa-rotate-180', action: 'ingame', text: 'ingame actions', subitems: [
|
||||
{subIcon: 'fa-info', subAction: 'ingame_show_info', subText: 'show info'},
|
||||
@@ -1583,7 +1629,6 @@ define([
|
||||
// map overlay will be set on "drag" start
|
||||
var mapOverlayTimer = null;
|
||||
|
||||
|
||||
// make system draggable
|
||||
map.draggable(system, {
|
||||
containment: 'parent',
|
||||
@@ -1706,6 +1751,10 @@ define([
|
||||
},
|
||||
complete: function(){
|
||||
map.revalidate( hoverSystemId );
|
||||
|
||||
// extend player name element
|
||||
$(this).find('.' + config.systemBodyItemNameClass).css({width: '80px'});
|
||||
|
||||
$(this).find('.' + config.systemBodyRightClass).velocity('stop').velocity({
|
||||
opacity: 1
|
||||
},{
|
||||
@@ -1721,6 +1770,12 @@ define([
|
||||
var hoverSystem = $(this).parents('.' + config.systemClass);
|
||||
var hoverSystemId = hoverSystem.attr('id');
|
||||
|
||||
// stop animation (prevent visual bug if user spams hover-icon [in - out])
|
||||
systemBody.velocity('stop');
|
||||
|
||||
// reduce player name element back to "normal" size (css class width is used)
|
||||
systemBody.find('.' + config.systemBodyItemNameClass).css({width: ''});
|
||||
|
||||
systemBody.find('.' + config.systemBodyRightClass).velocity('stop').velocity( {
|
||||
opacity: 0,
|
||||
'min-width': '0px'
|
||||
@@ -2443,7 +2498,6 @@ define([
|
||||
}else{
|
||||
// not reduced is default
|
||||
activeOptions.push('status_fresh');
|
||||
|
||||
}
|
||||
|
||||
}else if( component.hasClass(config.mapClass) ){
|
||||
@@ -2481,7 +2535,8 @@ define([
|
||||
// get map container
|
||||
var mapElement = $( map.getContainer() );
|
||||
|
||||
connection.bind('contextmenu', function(component, e) {
|
||||
// if the connection already exists -> do not set it twice
|
||||
connection.unbind('contextmenu').bind('contextmenu', function(component, e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
@@ -2518,7 +2573,7 @@ define([
|
||||
// confirm dialog
|
||||
bootbox.confirm('Is this connection really gone?', function(result) {
|
||||
if(result){
|
||||
deleteConnections([params.component], true);
|
||||
$().deleteConnections([activeConnection]);
|
||||
}
|
||||
});
|
||||
break;
|
||||
@@ -2839,6 +2894,12 @@ define([
|
||||
|
||||
var mapElement = map.getContainer();
|
||||
|
||||
|
||||
// get map tracking toggle value
|
||||
// if "false" -> new systems/connections will not automatically added
|
||||
var mapTracking = $('#' + config.headMapTrackingId).is(':checked');
|
||||
|
||||
|
||||
// container must exist! otherwise systems can not be updated
|
||||
if(mapElement !== undefined){
|
||||
|
||||
@@ -2904,6 +2965,31 @@ define([
|
||||
headerUpdateData.currentSystemId = $(system).data('id');
|
||||
headerUpdateData.currentSystemName = currentCharacterLog.system.name;
|
||||
|
||||
// check connection exists between new and previous systems --------o------------------------------
|
||||
// e.g. a loop
|
||||
if(
|
||||
activeSystemCache &&
|
||||
mapTracking &&
|
||||
activeSystemCache.data('systemId') !== currentCharacterLog.system.id
|
||||
){
|
||||
// maybe a loop detected (both systems already on map -> connection missing
|
||||
var connections = checkForConnection(map, activeSystemCache, system );
|
||||
|
||||
if(connections.length === 0){
|
||||
var connectionData = {
|
||||
source: activeSystemCache.data('id') ,
|
||||
target: system.data('id'),
|
||||
type: ['wh_fresh'] // default type.
|
||||
};
|
||||
|
||||
var connection = drawConnection(map, connectionData);
|
||||
saveConnection(connection);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// cache current location
|
||||
activeSystemCache = system;
|
||||
}
|
||||
@@ -2915,34 +3001,48 @@ define([
|
||||
// current user was not found on any map system -> add new system to map where the user is in ----------------
|
||||
// this is restricted to IGB-usage! CharacterLog data is always set through the IGB
|
||||
// ->this prevent adding the same system multiple times, if a user if online with the IGB AND OOG
|
||||
|
||||
if(
|
||||
CCP.isInGameBrowser() === true &&
|
||||
currentUserIsHere === false &&
|
||||
currentCharacterLog
|
||||
currentCharacterLog &&
|
||||
mapTracking
|
||||
){
|
||||
|
||||
var requestData = {
|
||||
systemData: {
|
||||
systemId: currentCharacterLog.system.id
|
||||
},
|
||||
mapData: {
|
||||
id: userData.config.id
|
||||
// check if the system where the character is in exists on this map
|
||||
if(currentUserIsHere === false){
|
||||
// add new system to the map
|
||||
|
||||
var requestData = {
|
||||
systemData: {
|
||||
systemId: currentCharacterLog.system.id
|
||||
},
|
||||
mapData: {
|
||||
id: userData.config.id
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// check if a system jump is detected previous system !== current system
|
||||
// and add a connection to the previous system as well
|
||||
// hint: if a user just logged on -> there is no active system cached
|
||||
var sourceSystem = false;
|
||||
if(
|
||||
activeSystemCache &&
|
||||
activeSystemCache.data('systemId') !== currentCharacterLog.system.id
|
||||
){
|
||||
|
||||
// draw new connection
|
||||
sourceSystem = activeSystemCache;
|
||||
// calculate new system coordinates
|
||||
requestData.systemData.position = calculateNewSystemPosition(sourceSystem);
|
||||
}
|
||||
};
|
||||
|
||||
// check if a system jump is detected previous system !== current system
|
||||
// and add a connection to the previous system as well
|
||||
var sourceSystem = false;
|
||||
if( activeSystemCache.data('systemId') !== currentCharacterLog.system.id){
|
||||
sourceSystem = activeSystemCache;
|
||||
mapElement.getMapOverlay('timer').startMapUpdateCounter();
|
||||
|
||||
saveSystem(map, requestData, sourceSystem, false);
|
||||
|
||||
// calculate new system coordinates
|
||||
requestData.systemData.position = calculateNewSystemPosition(sourceSystem);
|
||||
}
|
||||
|
||||
mapElement.getMapOverlay('timer').startMapUpdateCounter();
|
||||
|
||||
saveSystem(map, requestData, sourceSystem, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -3125,8 +3225,18 @@ define([
|
||||
var updated = connection.getParameter('updated');
|
||||
|
||||
var connectionTypes = connection.getType();
|
||||
|
||||
// normalize connection array
|
||||
connectionTypes = $.grep(connectionTypes, function(n){ return(n); });
|
||||
connectionTypes = $.grep(connectionTypes, function(n){
|
||||
if(
|
||||
n.length > 0 &&
|
||||
n !== 'default' // this is added by jsplumb by default -_-
|
||||
){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
var data = {
|
||||
id: id ? id : 0,
|
||||
@@ -3188,7 +3298,6 @@ define([
|
||||
// event after DragStop a connection or new connection ------------------
|
||||
newJsPlumbInstance.bind('beforeDrop', function(info) {
|
||||
var connection = info.connection;
|
||||
console.log('beforeDrop');
|
||||
|
||||
// lock the target system for "click" events
|
||||
// to prevent loading system information
|
||||
@@ -3203,7 +3312,7 @@ define([
|
||||
|
||||
// set "default" connection status only for NEW connections
|
||||
if(!connection.suspendedElement){
|
||||
setConnectionWHStatus(connection, 'wh_fresh');
|
||||
setConnectionWHStatus(connection, getDefaultConnectionTypeByScope(connection.scope) );
|
||||
}
|
||||
|
||||
// prevent multiple connections between same systems
|
||||
@@ -3231,14 +3340,12 @@ define([
|
||||
newJsPlumbInstance.bind('connectionDetached', function(info, e){
|
||||
// a connection is manually (drag&drop) detached! otherwise this event should not be send!
|
||||
var connection = info.connection;
|
||||
deleteConnections([connection], true);
|
||||
console.log('connectionDetached');
|
||||
$().deleteConnections([connection]);
|
||||
});
|
||||
|
||||
newJsPlumbInstance.bind('checkDropAllowed', function(params){
|
||||
// connections can not be attached to foreign endpoints
|
||||
// the only endpoint available is endpoint from where the connection was dragged away (re-attach)
|
||||
console.log('checkDropAllowed');
|
||||
|
||||
return true;
|
||||
});
|
||||
@@ -3356,7 +3463,8 @@ define([
|
||||
advanced: {
|
||||
updateOnBrowserResize: true,
|
||||
updateOnContentResize: true,
|
||||
autoExpandHorizontalScroll: true
|
||||
autoExpandHorizontalScroll: true,
|
||||
autoScrollOnFocus: "div"
|
||||
},
|
||||
mouseWheel:{
|
||||
enable: false, // scroll weel currently disabled
|
||||
|
||||
@@ -105,11 +105,11 @@ define([
|
||||
var mapOverlayTimer = $(this);
|
||||
var counterChart = mapOverlayTimer.getMapCounter();
|
||||
|
||||
var seconds = config.logTimerCount;
|
||||
var maxSeconds = config.logTimerCount;
|
||||
|
||||
var counterChartLabel = counterChart.find('span');
|
||||
|
||||
var percentPerCount = 100 / seconds;
|
||||
var percentPerCount = 100 / maxSeconds;
|
||||
|
||||
// update counter
|
||||
var updateChart = function(tempSeconds){
|
||||
@@ -123,11 +123,15 @@ define([
|
||||
|
||||
// main timer function is called on any counter update
|
||||
var timer = function(){
|
||||
seconds--;
|
||||
// decrease timer
|
||||
var currentSeconds = counterChart.data('currentSeconds');
|
||||
currentSeconds--;
|
||||
counterChart.data('currentSeconds', currentSeconds);
|
||||
|
||||
if(seconds >= 0){
|
||||
|
||||
if(currentSeconds >= 0){
|
||||
// update counter
|
||||
updateChart(seconds);
|
||||
updateChart(currentSeconds);
|
||||
}else{
|
||||
// hide counter and reset
|
||||
clearInterval(mapUpdateCounter);
|
||||
@@ -141,23 +145,27 @@ define([
|
||||
}
|
||||
};
|
||||
|
||||
// get counter interval (in case there is an active one) ---------------------------
|
||||
var interval = counterChart.data('interval');
|
||||
// get current seconds (in case the timer is already running)
|
||||
var currentSeconds = counterChart.data('currentSeconds');
|
||||
|
||||
if(interval){
|
||||
clearInterval(interval);
|
||||
}
|
||||
// start values for timer and chart
|
||||
counterChart.data('currentSeconds', maxSeconds);
|
||||
updateChart(maxSeconds);
|
||||
|
||||
// start timer ---------------------------------------------------------------------
|
||||
var mapUpdateCounter = setInterval(timer, 1000);
|
||||
updateChart(seconds);
|
||||
if(
|
||||
currentSeconds === undefined ||
|
||||
currentSeconds < 0
|
||||
){
|
||||
// start timer
|
||||
var mapUpdateCounter = setInterval(timer, 1000);
|
||||
|
||||
// store counter -------------------------------------------------------------------
|
||||
counterChart.data('interval', mapUpdateCounter);
|
||||
// store counter interval
|
||||
counterChart.data('interval', mapUpdateCounter);
|
||||
|
||||
// show overlay -------------------------------------------------------------------
|
||||
if(mapOverlayTimer.is(':hidden')){
|
||||
mapOverlayTimer.velocity('stop').velocity('transition.whirlIn', { duration: Init.animationSpeed.mapOverlay });
|
||||
// show overlay
|
||||
if(mapOverlayTimer.is(':hidden')){
|
||||
mapOverlayTimer.velocity('stop').velocity('transition.whirlIn', { duration: Init.animationSpeed.mapOverlay });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -68,15 +68,6 @@ define([
|
||||
return map;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* get all TabElements in this map module
|
||||
* @returns {*}
|
||||
*/
|
||||
var getTabElements = function(){
|
||||
return $('#' + config.mapTabBarId).find('a');
|
||||
};
|
||||
|
||||
/**
|
||||
* set Tab Observer, events are triggered within map.js
|
||||
* @param mapContentModule
|
||||
@@ -534,7 +525,7 @@ define([
|
||||
|
||||
if(tabMapElement.length > 0){
|
||||
// tab element already exists
|
||||
var tabElements = getTabElements();
|
||||
var tabElements = mapModuleElement.getMapTabElements();
|
||||
|
||||
// mapIds that are currently active
|
||||
var activeMapIds = [];
|
||||
@@ -655,7 +646,7 @@ define([
|
||||
if(tabsChanged === true){
|
||||
|
||||
// remove previous event handlers
|
||||
var allTabElements = getTabElements();
|
||||
var allTabElements = mapModuleElement.getMapTabElements();
|
||||
allTabElements.off('show.bs.tab');
|
||||
allTabElements.off('shown.bs.tab');
|
||||
allTabElements.off('hide.bs.tab');
|
||||
|
||||
@@ -54,6 +54,7 @@ define([
|
||||
headActiveUserClass: 'pf-head-active-user', // class for "active user" link
|
||||
headCurrentLocationClass: 'pf-head-current-location', // class for "show current location" link
|
||||
headProgramStatusClass: 'pf-head-program-status', // class for "program status" notification
|
||||
headMapTrackingId: 'pf-head-map-tracking', // id for "map tracking" toggle (checkbox)
|
||||
|
||||
// footer
|
||||
pageFooterId: 'pf-footer', // id for page footer
|
||||
@@ -336,14 +337,15 @@ define([
|
||||
userCharacterClass: config.headUserCharacterClass,
|
||||
userCharacterImageClass: config.userCharacterImageClass,
|
||||
userShipClass: config.headUserShipClass,
|
||||
userShipImageClass: config.userShipImageClass
|
||||
userShipImageClass: config.userShipImageClass,
|
||||
mapTrackingId: config.headMapTrackingId
|
||||
};
|
||||
|
||||
var headRendered = Mustache.render(TplHead, moduleData);
|
||||
|
||||
pageElement.prepend(headRendered);
|
||||
|
||||
// init heaser =====================================================================
|
||||
// init header =====================================================================
|
||||
|
||||
// init slide menus
|
||||
var slideMenu = new $.slidebars({
|
||||
@@ -379,11 +381,46 @@ define([
|
||||
$(document).triggerMenuEvent('ShowTaskManager');
|
||||
});
|
||||
|
||||
// close menu
|
||||
$(document).on('pf:closeMenu', function(e){
|
||||
// close all menus
|
||||
slideMenu.slidebars.close();
|
||||
});
|
||||
|
||||
// tracking toggle
|
||||
var mapTrackingCheckbox = $('#' + config.headMapTrackingId);
|
||||
mapTrackingCheckbox.bootstrapToggle({
|
||||
size: 'mini',
|
||||
on: 'on',
|
||||
off: 'off',
|
||||
onstyle: 'success',
|
||||
offstyle: 'default',
|
||||
width: 38,
|
||||
height: 19
|
||||
});
|
||||
|
||||
// set default values for map tracking checkbox
|
||||
if(CCP.isInGameBrowser() === false){
|
||||
mapTrackingCheckbox.bootstrapToggle('disable');
|
||||
}else{
|
||||
mapTrackingCheckbox.bootstrapToggle('on');
|
||||
}
|
||||
|
||||
mapTrackingCheckbox.on('change', function(e) {
|
||||
var value = $(this).is(':checked');
|
||||
var tracking = 'off';
|
||||
var trackingText = 'Your current location will not actually be added';
|
||||
var trackingType = 'info';
|
||||
if(value){
|
||||
tracking = 'on';
|
||||
trackingText = 'New connections will actually be added';
|
||||
trackingType = 'success';
|
||||
}
|
||||
|
||||
Util.showNotify({title: 'Map tracking: ' + tracking, text: trackingText, type: trackingType}, false);
|
||||
});
|
||||
|
||||
|
||||
// init all tooltips
|
||||
var tooltipElements = $('#' + config.pageHeaderId).find('[title]');
|
||||
tooltipElements.tooltip({
|
||||
|
||||
@@ -302,7 +302,6 @@ define([
|
||||
|
||||
// set new captcha for any request
|
||||
// captcha is required for sensitive data (not for all data)
|
||||
|
||||
if(
|
||||
responseData.error &&
|
||||
responseData.error.length > 0
|
||||
|
||||
@@ -22,6 +22,10 @@ define([
|
||||
mapInfoTableClass: 'pf-map-info-table', // class for data
|
||||
mapInfoLifetimeCounterClass: 'pf-map-info-lifetime-counter', // class for map lifetime counter
|
||||
|
||||
// dataTable
|
||||
tableActionCellClass: 'pf-table-action-cell', // class for table "action" cells
|
||||
tableCounterCellClass: 'pf-table-counter-cell', // cell for table "counter" cells
|
||||
|
||||
loadingOptions: { // config for loading overlay
|
||||
icon: {
|
||||
size: 'fa-2x'
|
||||
@@ -103,7 +107,7 @@ define([
|
||||
mapElement.append(dlElementRight);
|
||||
|
||||
// init map lifetime counter
|
||||
$('.' + config.mapInfoLifetimeCounterClass).initSignatureCounter();
|
||||
$('.' + config.mapInfoLifetimeCounterClass).initTimestampCounter();
|
||||
|
||||
|
||||
|
||||
@@ -284,12 +288,14 @@ define([
|
||||
for(var j = 0; j < mapData.data.connections.length; j++){
|
||||
var tempConnectionData = mapData.data.connections[j];
|
||||
|
||||
var tempConData = [];
|
||||
var tempConData = {};
|
||||
|
||||
tempConData.push( Util.getScopeInfoForConnection( tempConnectionData.scope, 'label') );
|
||||
tempConData.id = tempConnectionData.id;
|
||||
|
||||
tempConData.scope = Util.getScopeInfoForConnection( tempConnectionData.scope, 'label');
|
||||
|
||||
// source system name
|
||||
tempConData.push( tempConnectionData.sourceName );
|
||||
tempConData.source = tempConnectionData.sourceName;
|
||||
|
||||
// connection
|
||||
var connectionClasses = [];
|
||||
@@ -300,10 +306,14 @@ define([
|
||||
|
||||
connectionClasses = connectionClasses.join(' ');
|
||||
|
||||
tempConData.push( '<div class="pf-fake-connection ' + connectionClasses + '"></div>' );
|
||||
tempConData.connection = '<div class="pf-fake-connection ' + connectionClasses + '"></div>';
|
||||
|
||||
|
||||
tempConData.push( tempConnectionData.targetName );
|
||||
tempConData.target = tempConnectionData.targetName;
|
||||
|
||||
tempConData.updated = tempConnectionData.updated;
|
||||
|
||||
tempConData.clear = '<i class="fa fa-close txt-color txt-color-redDarker"></i>';
|
||||
|
||||
connectionData.push(tempConData);
|
||||
}
|
||||
@@ -326,17 +336,68 @@ define([
|
||||
{
|
||||
title: 'scope',
|
||||
width: '50px',
|
||||
orderable: false
|
||||
orderable: false,
|
||||
data: 'scope'
|
||||
},{
|
||||
title: 'source system'
|
||||
title: 'source system',
|
||||
data: 'source'
|
||||
},{
|
||||
title: 'connection',
|
||||
width: '80px',
|
||||
class: 'text-center',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
searchable: false,
|
||||
data: 'connection'
|
||||
}, {
|
||||
title: 'target system',
|
||||
data: 'target'
|
||||
},{
|
||||
title: 'target system'
|
||||
title: 'updated',
|
||||
width: '90px',
|
||||
searchable: false,
|
||||
className: [config.tableCounterCellClass, 'min-tablet-l'].join(' '),
|
||||
data: 'updated',
|
||||
createdCell: function(cell, cellData, rowData, rowIndex, colIndex){
|
||||
$(cell).initTimestampCounter();
|
||||
}
|
||||
},{
|
||||
title: '',
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
width: '10px',
|
||||
class: ['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');
|
||||
|
||||
// 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();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// init confirmation dialog
|
||||
$(cell).confirmation(confirmationSettings);
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -369,6 +430,7 @@ define([
|
||||
var mapInfoDialog = bootbox.dialog({
|
||||
title: 'Map information',
|
||||
message: content,
|
||||
size: 'large',
|
||||
buttons: {
|
||||
success: {
|
||||
label: 'close',
|
||||
|
||||
@@ -18,8 +18,6 @@ define([
|
||||
dialogMapEditContainerId: 'pf-map-dialog-edit', // id for the "edit" container
|
||||
dialogMapSettingsContainerId: 'pf-map-dialog-settings', // id for the "settings" container
|
||||
|
||||
dialogMessageContainerId: 'pf-map-dialog-message-container', // id for dialog form message container
|
||||
|
||||
userSelectId: 'pf-map-dialog-user-select', // id for "user" select
|
||||
corporationSelectId: 'pf-map-dialog-corporation-select', // id for "corporation" select
|
||||
allianceSelectId: 'pf-map-dialog-alliance-select' // id for "alliance" select
|
||||
@@ -59,7 +57,8 @@ define([
|
||||
type: Util.getMapTypes(true),
|
||||
icon: Util.getMapIcons(),
|
||||
formErrorContainerClass: Util.config.formErrorContainerClass,
|
||||
formWarningContainerClass: Util.config.formWarningContainerClass
|
||||
formWarningContainerClass: Util.config.formWarningContainerClass,
|
||||
formInfoContainerClass: Util.config.formInfoContainerClass
|
||||
};
|
||||
|
||||
// render "new map" tab content -------------------------------------------
|
||||
@@ -99,7 +98,6 @@ define([
|
||||
dialogMapCreateContainerId: config.dialogMapCreateContainerId,
|
||||
dialogMapEditContainerId: config.dialogMapEditContainerId,
|
||||
dialogMapSettingsContainerId: config.dialogMapSettingsContainerId,
|
||||
dialogMessageContainerId: config.dialogMessageContainerId,
|
||||
|
||||
hideEditTab: hideEditTab,
|
||||
hideSettingsTab: hideSettingsTab,
|
||||
@@ -191,12 +189,17 @@ define([
|
||||
form.showFormMessage(responseData.error);
|
||||
}else{
|
||||
// success
|
||||
Util.showNotify({title: dialogTitle, text: 'Map: ' + responseData.name, type: 'success'});
|
||||
Util.showNotify({title: dialogTitle, text: 'Map: ' + responseData.mapData.mapData.name, type: 'success'});
|
||||
|
||||
// update map-tab Element
|
||||
var tabLinkElement = Util.getMapModule().getMapTabElements(responseData.mapData.mapData.id);
|
||||
if(tabLinkElement.length === 1){
|
||||
tabLinkElement.updateTabData(responseData.mapData.mapData);
|
||||
}
|
||||
|
||||
$(mapInfoDialog).modal('hide');
|
||||
$(document).trigger('pf:closeMenu', [{}]);
|
||||
}
|
||||
|
||||
}).fail(function( jqXHR, status, error) {
|
||||
var reason = status + ' ' + error;
|
||||
Util.showNotify({title: jqXHR.status + ': saveMap', text: reason, type: 'warning'});
|
||||
@@ -232,7 +235,6 @@ define([
|
||||
|
||||
initSettingsSelectFields(mapInfoDialog);
|
||||
}else{
|
||||
|
||||
if( $(selectElementUser).data('select2') !== undefined ){
|
||||
$(selectElementUser).select2('destroy');
|
||||
}
|
||||
@@ -248,11 +250,14 @@ define([
|
||||
});
|
||||
|
||||
// show form messages -------------------------------------
|
||||
$('#' + config.dialogMessageContainerId).showMessage({type: 'info', title: 'Hint', text: 'Creating new maps or change settings may take a few seconds'});
|
||||
// get current active form(tab)
|
||||
var form = $('#' + config.newMapDialogId).find('form').filter(':visible');
|
||||
|
||||
form.showFormMessage([{type: 'info', message: 'Creating new maps or change settings may take a few seconds'}]);
|
||||
|
||||
if(mapData === false){
|
||||
// no map data found (probably new user
|
||||
$('#' + config.dialogMessageContainerId).showMessage({type: 'warning', title: 'No maps found', text: 'Create a new map before you can start'});
|
||||
form.showFormMessage([{type: 'warning', message: 'No maps found. Create a new map before you can start'}]);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ define([
|
||||
'app/init',
|
||||
'app/util',
|
||||
'app/render',
|
||||
'bootbox',
|
||||
'bootbox'
|
||||
], function($, Init, Util, Render, bootbox) {
|
||||
'use strict';
|
||||
|
||||
@@ -75,9 +75,9 @@ define([
|
||||
}
|
||||
|
||||
}).fail(function( jqXHR, status, error) {
|
||||
console.log('sharing fail')
|
||||
|
||||
|
||||
var reason = status + ' ' + error;
|
||||
Util.showNotify({title: jqXHR.status + ': shareSettings', text: reason, type: 'warning'});
|
||||
$(document).setProgramStatus('problem');
|
||||
});
|
||||
|
||||
return false;
|
||||
@@ -86,18 +86,23 @@ define([
|
||||
}
|
||||
});
|
||||
|
||||
// after modal is shown ---------------------------------------------------
|
||||
sharingSettingsDialog.on('shown.bs.modal', function(e) {
|
||||
|
||||
|
||||
$(this).find('input[type="checkbox"]').bootstrapToggle({
|
||||
on: '<i class="fa fa-fw fa-check"></i> Enable',
|
||||
off: 'Disable <i class="fa fa-fw fa-ban"></i>',
|
||||
onstyle: 'success',
|
||||
offstyle: 'warning',
|
||||
width: 90,
|
||||
height: 30
|
||||
});
|
||||
});
|
||||
});
|
||||
}else{
|
||||
Util.showNotify({title: 'No userData found', type: 'warning'});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ define([
|
||||
// check if system is dialed
|
||||
if(
|
||||
options.disabledOptions &&
|
||||
options.disabledOptions.indexOf(systemId) !== -1
|
||||
options.disabledOptions.indexOf(parseInt(systemId, 10)) !== -1
|
||||
){
|
||||
disabled = true;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@ define([
|
||||
// system info module
|
||||
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
|
||||
|
||||
// info table
|
||||
systemInfoTableClass: 'pf-system-info-table', // class for system info table
|
||||
systemInfoNameInfoClass: 'pf-system-info-name', // class for "name" information element
|
||||
@@ -260,7 +264,7 @@ define([
|
||||
}
|
||||
});
|
||||
|
||||
// on xEditable open
|
||||
// on xEditable open -------------------------------------------------------------------------
|
||||
descriptionTextareaElement.on('shown', function(e){
|
||||
// disable module update until description field is open
|
||||
disableModuleUpdate = true;
|
||||
@@ -269,7 +273,7 @@ define([
|
||||
tempModuleElement.find('.' + config.descriptionTextareaTooltipClass).tooltip('disable');
|
||||
});
|
||||
|
||||
// on xEditable close
|
||||
// on xEditable close ------------------------------------------------------------------------
|
||||
descriptionTextareaElement.on('hidden', function(e){
|
||||
var value = $(this).editable('getValue', true);
|
||||
|
||||
@@ -288,7 +292,7 @@ define([
|
||||
disableModuleUpdate = false;
|
||||
});
|
||||
|
||||
// enable xEditable field on Button click
|
||||
// enable xEditable field on Button click ----------------------------------------------------
|
||||
descriptionButton.on('click', function(e){
|
||||
e.stopPropagation();
|
||||
|
||||
@@ -302,11 +306,11 @@ define([
|
||||
});
|
||||
|
||||
|
||||
// init tooltips
|
||||
// init tooltips -----------------------------------------------------------------------------
|
||||
var tooltipElements = $('.' + config.systemInfoModuleClass + ' [data-toggle="tooltip"]');
|
||||
tooltipElements.tooltip();
|
||||
|
||||
// init system effect popover
|
||||
// init system effect popover ----------------------------------------------------------------
|
||||
var systemEffectData = Util.getSystemEffectData( systemData.security, systemData.effect);
|
||||
|
||||
if(systemEffectData !== false){
|
||||
@@ -326,6 +330,36 @@ define([
|
||||
});
|
||||
}
|
||||
|
||||
// constellation popover ---------------------------------------------------------------------
|
||||
tempModuleElement.find('a.popup-ajax').popover({
|
||||
html: true,
|
||||
trigger: 'hover',
|
||||
placement: 'top',
|
||||
delay: 200,
|
||||
container: 'body',
|
||||
content: function(){
|
||||
return details_in_popup(this);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function details_in_popup(popoverElement){
|
||||
popoverElement = $(popoverElement);
|
||||
var popover = popoverElement.data('bs.popover');
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: popoverElement.data('url'),
|
||||
success: function(data){
|
||||
var systemEffectTable = Util.getSystemsInfoTable( data.systemData );
|
||||
popover.options.content = systemEffectTable;
|
||||
// reopen popover (new content size)
|
||||
popover.show();
|
||||
}
|
||||
});
|
||||
return 'Loading...';
|
||||
}
|
||||
|
||||
showModule(moduleElement);
|
||||
}
|
||||
}
|
||||
@@ -358,7 +392,13 @@ define([
|
||||
descriptionButtonClass: config.addDescriptionButtonClass,
|
||||
moduleToolbarActionId: config.moduleToolbarActionId,
|
||||
descriptionTextareaClass: config.descriptionTextareaElementClass,
|
||||
descriptionTooltipClass: config.descriptionTextareaTooltipClass
|
||||
descriptionTooltipClass: config.descriptionTextareaTooltipClass,
|
||||
|
||||
ajaxConstellationInfoUrl: Init.path.getConstellationData,
|
||||
|
||||
systemConstellationLinkClass: config.constellationLinkClass,
|
||||
systemRegionLinkClass: config.regionLinkClass
|
||||
|
||||
};
|
||||
|
||||
Render.showModule(moduleConfig, moduleData);
|
||||
|
||||
@@ -43,13 +43,13 @@ define([
|
||||
return label;
|
||||
};
|
||||
|
||||
// show number of killmails
|
||||
var killMailCounterMax = 20;
|
||||
var killMailCounter = 0;
|
||||
|
||||
|
||||
var showKillmails = function(moduleElement, killboardData){
|
||||
|
||||
// show number of killMails
|
||||
var killMailCounterMax = 20;
|
||||
var killMailCounter = 0;
|
||||
|
||||
// change order (show right to left)
|
||||
killboardData.tableData.reverse();
|
||||
|
||||
|
||||
@@ -44,12 +44,14 @@ define([
|
||||
sigTableEditSigGroupSelect: 'pf-sig-table-edit-group-select', // class for editable fields (sig group)
|
||||
sigTableEditSigTypeSelect: 'pf-sig-table-edit-type-select', // class for editable fields (sig type)
|
||||
sigTableEditSigDescriptionTextarea: 'pf-sig-table-edit-desc-text', // class for editable fields (sig description)
|
||||
sigTableCounterClass: 'pf-sig-table-counter', // class for signature table counter
|
||||
sigTableCreatedCellClass: 'pf-sig-table-created', // class for "created" cells
|
||||
sigTableUpdatedCellClass: 'pf-sig-table-updated', // class for "updated" cells
|
||||
sigTableActionCellClass: 'pf-sig-table-action-cell', // class for "action" cells
|
||||
sigTableActionButtonClass: 'pf-sig-table-action-button', // class for row action button
|
||||
|
||||
sigTableCounterClass: 'pf-table-counter-cell', // class for "counter" cells
|
||||
sigTableActionCellClass: 'pf-table-action-cell', // class for "action" cells
|
||||
|
||||
|
||||
// animation
|
||||
animationPulseSuccessClass: 'pf-animation-pulse-success', // animation class
|
||||
animationPulseWarningClass: 'pf-animation-pulse-warning', // animation class
|
||||
@@ -931,7 +933,7 @@ define([
|
||||
openNextEditDialogOnSave(sigGroupFields);
|
||||
|
||||
// init signature counter ---------------------------------------------------------------
|
||||
tableElement.find('.' + config.sigTableCounterClass + '[data-counter!="init"]').initSignatureCounter();
|
||||
tableElement.find('.' + config.sigTableCounterClass + '[data-counter!="init"]').initTimestampCounter();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1064,7 +1066,7 @@ define([
|
||||
var moduleElement = $('.' + config.systemSigModuleClass);
|
||||
var data = rows.data();
|
||||
var signatureTableApi = signatureTable.api();
|
||||
var rowElements = rows.nodes().to$();0
|
||||
var rowElements = rows.nodes().to$();
|
||||
var signatureCount = data.length;
|
||||
|
||||
var signatureIds = [];
|
||||
@@ -1538,74 +1540,74 @@ define([
|
||||
var tempTableElement = this;
|
||||
var rowElement = $(cell).parents('tr');
|
||||
|
||||
switch(cellData.action){
|
||||
case 'add':
|
||||
// add new signature ---------------------------------------------------------------
|
||||
$(cell).on('click', function(e) {
|
||||
// submit all fields within a table row
|
||||
var formFields = rowElement.find('.editable');
|
||||
switch(cellData.action){
|
||||
case 'add':
|
||||
// add new signature ---------------------------------------------------------------
|
||||
$(cell).on('click', function(e) {
|
||||
// submit all fields within a table row
|
||||
var formFields = rowElement.find('.editable');
|
||||
|
||||
// submit all xEditable fields
|
||||
formFields.editable('submit', {
|
||||
url: Init.path.saveSignatureData,
|
||||
ajaxOptions: {
|
||||
dataType: 'json' //assuming json response
|
||||
},
|
||||
data: {
|
||||
systemId: systemData.id, // additional data to submit
|
||||
pk: 0 // new data no primary key
|
||||
},
|
||||
error: $.fn.editable.defaults.error, // user default xEditable error function
|
||||
success: function (data, editableConfig) {
|
||||
// submit all xEditable fields
|
||||
formFields.editable('submit', {
|
||||
url: Init.path.saveSignatureData,
|
||||
ajaxOptions: {
|
||||
dataType: 'json' //assuming json response
|
||||
},
|
||||
data: {
|
||||
systemId: systemData.id, // additional data to submit
|
||||
pk: 0 // new data no primary key
|
||||
},
|
||||
error: $.fn.editable.defaults.error, // user default xEditable error function
|
||||
success: function (data, editableConfig) {
|
||||
|
||||
var newRowElement = addSignatureRow(systemData, data.signatures[0], true);
|
||||
var newRowElement = addSignatureRow(systemData, data.signatures[0], true);
|
||||
|
||||
// highlight
|
||||
newRowElement.pulseTableRow('added');
|
||||
// highlight
|
||||
newRowElement.pulseTableRow('added');
|
||||
|
||||
// prepare "add signature" table for new entry -> reset --------------------------------------------
|
||||
var signatureData = formatSignatureData(systemData, [emptySignatureData], emptySignatureOptions);
|
||||
// prepare "add signature" table for new entry -> reset --------------------------------------------
|
||||
var signatureData = formatSignatureData(systemData, [emptySignatureData], emptySignatureOptions);
|
||||
|
||||
var dataSecondaryElement = $('.' + config.sigTableSecondaryClass);
|
||||
var dataTableSecondary = dataSecondaryElement.DataTable();
|
||||
var newAddRowElement = dataTableSecondary.clear().row.add(signatureData.shift()).draw().nodes();
|
||||
var dataSecondaryElement = $('.' + config.sigTableSecondaryClass);
|
||||
var dataTableSecondary = dataSecondaryElement.DataTable();
|
||||
var newAddRowElement = dataTableSecondary.clear().row.add(signatureData.shift()).draw().nodes();
|
||||
|
||||
newAddRowElement.to$().makeEditable(systemData);
|
||||
newAddRowElement.to$().makeEditable(systemData);
|
||||
|
||||
Util.showNotify({
|
||||
title: 'Signature added',
|
||||
text: 'Name: ' + data.name,
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'delete':
|
||||
// delete signature ----------------------------------------------------------------
|
||||
var confirmationSettings = {
|
||||
container: 'body',
|
||||
placement: 'left',
|
||||
btnCancelClass: 'btn btn-sm btn-default',
|
||||
btnCancelLabel: 'cancel',
|
||||
btnCancelIcon: 'fa fa-fw fa-ban',
|
||||
title: 'Delete signature',
|
||||
btnOkClass: 'btn btn-sm btn-danger',
|
||||
btnOkLabel: 'delete',
|
||||
btnOkIcon: 'fa fa-fw fa-close',
|
||||
onConfirm : function(e, target){
|
||||
var deleteRowElement = $(target).parents('tr');
|
||||
var row = tempTableElement.DataTable().rows(deleteRowElement);
|
||||
deleteSignatures(row);
|
||||
Util.showNotify({
|
||||
title: 'Signature added',
|
||||
text: 'Name: ' + data.name,
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'delete':
|
||||
// delete signature ----------------------------------------------------------------
|
||||
var confirmationSettings = {
|
||||
container: 'body',
|
||||
placement: 'left',
|
||||
btnCancelClass: 'btn btn-sm btn-default',
|
||||
btnCancelLabel: 'cancel',
|
||||
btnCancelIcon: 'fa fa-fw fa-ban',
|
||||
title: 'Delete signature',
|
||||
btnOkClass: 'btn btn-sm btn-danger',
|
||||
btnOkLabel: 'delete',
|
||||
btnOkIcon: 'fa fa-fw fa-close',
|
||||
onConfirm : function(e, target){
|
||||
var deleteRowElement = $(target).parents('tr');
|
||||
var row = tempTableElement.DataTable().rows(deleteRowElement);
|
||||
deleteSignatures(row);
|
||||
}
|
||||
};
|
||||
|
||||
// init confirmation dialog
|
||||
$(cell).confirmation(confirmationSettings);
|
||||
// init confirmation dialog
|
||||
$(cell).confirmation(confirmationSettings);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
123
js/app/util.js
123
js/app/util.js
@@ -14,7 +14,8 @@ define([
|
||||
'xEditable',
|
||||
'easyPieChart',
|
||||
'hoverIntent',
|
||||
'bootstrapConfirmation'
|
||||
'bootstrapConfirmation',
|
||||
'bootstrapToggle'
|
||||
], function($, Init, SystemEffect, SignatureType, bootbox) {
|
||||
|
||||
'use strict';
|
||||
@@ -27,13 +28,17 @@ define([
|
||||
formEditableFieldClass: 'pf-editable', // class for all xEditable fields
|
||||
formErrorContainerClass: 'pf-dialog-error-container', // class for "error" containers in dialogs
|
||||
formWarningContainerClass: 'pf-dialog-warning-container', // class for "warning" containers in dialogs
|
||||
formInfoContainerClass: 'pf-dialog-info-container', // class for "info" containers in dialogs
|
||||
|
||||
|
||||
settingsMessageVelocityOptions: {
|
||||
duration: 180
|
||||
},
|
||||
|
||||
// map module
|
||||
mapModuleId: 'pf-map-module', // main map module
|
||||
mapModuleId: 'pf-map-module', // id for main map module
|
||||
mapTabBarId: 'pf-map-tabs' // id for map tab bar
|
||||
|
||||
};
|
||||
|
||||
var stopTimerCache = {}; // cache for stopwatch timer
|
||||
@@ -62,7 +67,6 @@ define([
|
||||
iconSize = options.icon.size;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var overlay = $('<div>', {
|
||||
@@ -143,6 +147,7 @@ define([
|
||||
|
||||
var errorMessage = [];
|
||||
var warningMessage = [];
|
||||
var infoMessage = [];
|
||||
for(var i = 0; i < errors.length; i++){
|
||||
if(errors[i].type === 'error'){
|
||||
errorMessage.push( errors[i].message );
|
||||
@@ -155,19 +160,28 @@ define([
|
||||
|
||||
}else if(errors[i].type === 'warning'){
|
||||
warningMessage.push( errors[i].message );
|
||||
}else if(errors[i].type === 'info'){
|
||||
infoMessage.push( errors[i].message );
|
||||
}
|
||||
}
|
||||
|
||||
if(errorMessage.length > 0){
|
||||
formElement.hideFormMessage('error', function(element){
|
||||
$(element).find('small').text( errorMessage.join('<br>') );
|
||||
$(element).find('small').html( errorMessage.join('<br>') );
|
||||
$(element).velocity('transition.slideUpIn', config.settingsMessageVelocityOptions);
|
||||
});
|
||||
}
|
||||
|
||||
if(warningMessage.length > 0){
|
||||
formElement.hideFormMessage('warning', function(element){
|
||||
$(element).find('small').text( warningMessage.join('<br>') );
|
||||
$(element).find('small').html( warningMessage.join('<br>') );
|
||||
$(element).velocity('transition.slideUpIn', config.settingsMessageVelocityOptions);
|
||||
});
|
||||
}
|
||||
|
||||
if(infoMessage.length > 0){
|
||||
formElement.hideFormMessage('info', function(element){
|
||||
$(element).find('small').html( infoMessage.join('<br>') );
|
||||
$(element).velocity('transition.slideUpIn', config.settingsMessageVelocityOptions);
|
||||
});
|
||||
}
|
||||
@@ -192,28 +206,27 @@ define([
|
||||
settingsMessageVelocityOptions.display = 'block';
|
||||
}
|
||||
|
||||
if(type === 'error'){
|
||||
// find error container
|
||||
var errorMessageElement = formElement.find('.' + config.formErrorContainerClass);
|
||||
var messageElement = null;
|
||||
|
||||
// check if element is visible
|
||||
if(errorMessageElement.is(':visible')){
|
||||
errorMessageElement.velocity('transition.slideDownOut', settingsMessageVelocityOptions);
|
||||
}else if(callback){
|
||||
// skip hide animation
|
||||
callback(errorMessageElement);
|
||||
}
|
||||
switch(type){
|
||||
case 'error':
|
||||
// find error container
|
||||
messageElement = formElement.find('.' + config.formErrorContainerClass);
|
||||
break;
|
||||
case 'warning':
|
||||
messageElement = formElement.find('.' + config.formWarningContainerClass);
|
||||
break;
|
||||
case 'info':
|
||||
messageElement = formElement.find('.' + config.formInfoContainerClass);
|
||||
break;
|
||||
}
|
||||
|
||||
if(type === 'warning'){
|
||||
var warningMessageElement = formElement.find('.' + config.formWarningContainerClass);
|
||||
|
||||
// check if element is visible
|
||||
if(warningMessageElement.is(':visible')){
|
||||
warningMessageElement.velocity('transition.slideDownOut', settingsMessageVelocityOptions);
|
||||
if(messageElement){
|
||||
if(messageElement.is(':visible')){
|
||||
messageElement.velocity('transition.slideDownOut', settingsMessageVelocityOptions);
|
||||
}else if(callback){
|
||||
// skip hide animation
|
||||
callback(warningMessageElement);
|
||||
callback(messageElement);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -680,6 +693,29 @@ define([
|
||||
return !jqXHR.getAllResponseHeaders();
|
||||
};
|
||||
|
||||
/**
|
||||
* get all mapTabElements (<a> tags)
|
||||
* or search for a specific tabElement within the
|
||||
* mapModuleElement
|
||||
* @param mapId
|
||||
* @returns {JQuery|*|{}|T}
|
||||
*/
|
||||
$.fn.getMapTabElements = function(mapId){
|
||||
|
||||
var mapModuleElement = $(this);
|
||||
|
||||
var mapTabElements = mapModuleElement.find('#' + config.mapTabBarId).find('a');
|
||||
|
||||
if(mapId){
|
||||
// search for a specific tab element
|
||||
mapTabElements = mapTabElements.filter(function(i, el){
|
||||
return ( $(el).data('map-id') === mapId );
|
||||
});
|
||||
}
|
||||
|
||||
return mapTabElements;
|
||||
};
|
||||
|
||||
/**
|
||||
* get the map module object or create a new module
|
||||
* @returns {*|HTMLElement}
|
||||
@@ -955,6 +991,12 @@ define([
|
||||
return statusInfo;
|
||||
};
|
||||
|
||||
/**
|
||||
* get a HTML table with system effect information
|
||||
* e.g. for popover
|
||||
* @param data
|
||||
* @returns {string}
|
||||
*/
|
||||
var getSystemEffectTable = function(data){
|
||||
|
||||
var table = '';
|
||||
@@ -962,7 +1004,6 @@ define([
|
||||
if(data.length > 0){
|
||||
|
||||
table += '<table>';
|
||||
|
||||
for(var i = 0; i < data.length; i++){
|
||||
table += '<tr>';
|
||||
table += '<td>';
|
||||
@@ -973,10 +1014,43 @@ define([
|
||||
table += '</td>';
|
||||
table += '</tr>';
|
||||
}
|
||||
|
||||
table += '</table>';
|
||||
}
|
||||
|
||||
return table;
|
||||
};
|
||||
|
||||
/**
|
||||
* get a HTML table with information for multiple systems
|
||||
* e.g. for popover
|
||||
* @param data
|
||||
* @returns {string}
|
||||
*/
|
||||
var getSystemsInfoTable = function(data){
|
||||
var table = '';
|
||||
|
||||
if(data.length > 0){
|
||||
|
||||
table += '<table>';
|
||||
for(var i = 0; i < data.length; i++){
|
||||
|
||||
var trueSecClass = getTrueSecClassForSystem( data[i].trueSec );
|
||||
var securityClass = getSecurityClassForSystem( data[i].security );
|
||||
|
||||
table += '<tr>';
|
||||
table += '<td>';
|
||||
table += data[i].name;
|
||||
table += '</td>';
|
||||
table += '<td class="text-right ' + securityClass + '">';
|
||||
table += data[i].security;
|
||||
table += '</td>';
|
||||
table += '<td class="text-right ' + trueSecClass + '">';
|
||||
table += parseFloat( data[i].trueSec ).toFixed(1);
|
||||
table += '</td>';
|
||||
table += '</tr>';
|
||||
}
|
||||
table += '</table>';
|
||||
}
|
||||
|
||||
return table;
|
||||
};
|
||||
@@ -1402,6 +1476,7 @@ define([
|
||||
getEffectInfoForSystem: getEffectInfoForSystem,
|
||||
getSystemEffectData: getSystemEffectData,
|
||||
getSystemEffectTable: getSystemEffectTable,
|
||||
getSystemsInfoTable: getSystemsInfoTable,
|
||||
getStatusInfoForCharacter: getStatusInfoForCharacter,
|
||||
getSecurityClassForSystem: getSecurityClassForSystem,
|
||||
getTrueSecClassForSystem: getTrueSecClassForSystem,
|
||||
|
||||
9
js/lib/bootstrap2-toggle.min.js
vendored
Normal file
9
js/lib/bootstrap2-toggle.min.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/*! ========================================================================
|
||||
* Bootstrap Toggle: bootstrap2-toggle.js v2.2.0
|
||||
* http://www.bootstraptoggle.com
|
||||
* ========================================================================
|
||||
* Copyright 2014 Min Hur, The New York Times Company
|
||||
* Licensed under MIT
|
||||
* ======================================================================== */
|
||||
+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.toggle"),f="object"==typeof b&&b;e||d.data("bs.toggle",e=new c(this,f)),"string"==typeof b&&e[b]&&e[b]()})}var c=function(b,c){this.$element=a(b),this.options=a.extend({},this.defaults(),c),this.render()};c.VERSION="2.2.0",c.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"default",size:"normal",style:"",width:null,height:null},c.prototype.defaults=function(){return{on:this.$element.attr("data-on")||c.DEFAULTS.on,off:this.$element.attr("data-off")||c.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||c.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||c.DEFAULTS.offstyle,size:this.$element.attr("data-size")||c.DEFAULTS.size,style:this.$element.attr("data-style")||c.DEFAULTS.style,width:this.$element.attr("data-width")||c.DEFAULTS.width,height:this.$element.attr("data-height")||c.DEFAULTS.height}},c.prototype.render=function(){this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle;var b="large"===this.options.size?"btn-large":"small"===this.options.size?"btn-small":"mini"===this.options.size?"btn-mini":"",c=a('<label class="btn">').html(this.options.on).addClass(this._onstyle+" "+b),d=a('<label class="btn">').html(this.options.off).addClass(this._offstyle+" "+b+" active"),e=a('<span class="toggle-handle btn btn-default">').addClass(b),f=a('<div class="toggle-group">').append(c,d,e),g=a('<div class="toggle btn" data-toggle="toggle">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(b).addClass(this.options.style);this.$element.wrap(g),a.extend(this,{$toggle:this.$element.parent(),$toggleOn:c,$toggleOff:d,$toggleGroup:f}),this.$toggle.append(f);var h=this.options.width||Math.max(c.width(),d.width())+e.outerWidth()/2,i=this.options.height||Math.max(c.height(),d.height());c.addClass("toggle-on"),d.addClass("toggle-off"),this.$toggle.css({width:h,height:i}),this.options.height&&(c.css("line-height",c.height()+"px"),d.css("line-height",d.height()+"px")),this.update(!0),this.trigger(!0)},c.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},c.prototype.on=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),void(a||this.trigger()))},c.prototype.off=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),void(a||this.trigger()))},c.prototype.enable=function(){this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},c.prototype.disable=function(){this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},c.prototype.update=function(a){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(a):this.off(a)},c.prototype.trigger=function(b){this.$element.off("change.bs.toggle"),b||this.$element.change(),this.$element.on("change.bs.toggle",a.proxy(function(){this.update()},this))},c.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var d=a.fn.bootstrapToggle;a.fn.bootstrapToggle=b,a.fn.bootstrapToggle.Constructor=c,a.fn.toggle.noConflict=function(){return a.fn.bootstrapToggle=d,this},a(function(){a("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),a(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(b){var c=a(this).find("input[type=checkbox]");c.bootstrapToggle("toggle"),b.preventDefault()})}(jQuery);
|
||||
//# sourceMappingURL=bootstrap2-toggle.min.js.map
|
||||
1
js/lib/bootstrap2-toggle.min.js.map
Normal file
1
js/lib/bootstrap2-toggle.min.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bootstrap2-toggle.min.js","sources":["bootstrap2-toggle.js"],"names":["$","Plugin","option","this","each","$this","data","options","Toggle","element","$element","extend","defaults","render","VERSION","DEFAULTS","on","off","onstyle","offstyle","size","style","width","height","prototype","attr","_onstyle","_offstyle","$toggleOn","html","addClass","$toggleOff","$toggleHandle","$toggleGroup","append","$toggle","prop","wrap","parent","Math","max","outerWidth","css","update","trigger","toggle","silent","removeClass","enable","removeAttr","disable","change","proxy","destroy","remove","removeData","unwrap","old","fn","bootstrapToggle","Constructor","noConflict","document","e","$checkbox","find","preventDefault","jQuery"],"mappings":";;;;;;;CASE,SAAUA,GACV,YAoID,SAASC,GAAOC,GACf,MAAOC,MAAKC,KAAK,WAChB,GAAIC,GAAUL,EAAEG,MACZG,EAAUD,EAAMC,KAAK,aACrBC,EAA2B,gBAAVL,IAAsBA,CAEtCI,IAAMD,EAAMC,KAAK,YAAcA,EAAO,GAAIE,GAAOL,KAAMI,IACvC,gBAAVL,IAAsBI,EAAKJ,IAASI,EAAKJ,OAtItD,GAAIM,GAAS,SAAUC,EAASF,GAC/BJ,KAAKO,SAAYV,EAAES,GACnBN,KAAKI,QAAYP,EAAEW,UAAWR,KAAKS,WAAYL,GAC/CJ,KAAKU,SAGNL,GAAOM,QAAW,QAElBN,EAAOO,UACNC,GAAI,KACJC,IAAK,MACLC,QAAS,UACTC,SAAU,UACVC,KAAM,SACNC,MAAO,GACPC,MAAO,KACPC,OAAQ,MAGTf,EAAOgB,UAAUZ,SAAW,WAC3B,OACCI,GAAIb,KAAKO,SAASe,KAAK,YAAcjB,EAAOO,SAASC,GACrDC,IAAKd,KAAKO,SAASe,KAAK,aAAejB,EAAOO,SAASE,IACvDC,QAASf,KAAKO,SAASe,KAAK,iBAAmBjB,EAAOO,SAASG,QAC/DC,SAAUhB,KAAKO,SAASe,KAAK,kBAAoBjB,EAAOO,SAASI,SACjEC,KAAMjB,KAAKO,SAASe,KAAK,cAAgBjB,EAAOO,SAASK,KACzDC,MAAOlB,KAAKO,SAASe,KAAK,eAAiBjB,EAAOO,SAASM,MAC3DC,MAAOnB,KAAKO,SAASe,KAAK,eAAiBjB,EAAOO,SAASO,MAC3DC,OAAQpB,KAAKO,SAASe,KAAK,gBAAkBjB,EAAOO,SAASQ,SAI/Df,EAAOgB,UAAUX,OAAS,WACzBV,KAAKuB,SAAW,OAASvB,KAAKI,QAAQW,QACtCf,KAAKwB,UAAY,OAASxB,KAAKI,QAAQY,QACvC,IAAIC,GAA6B,UAAtBjB,KAAKI,QAAQa,KAAmB,YAClB,UAAtBjB,KAAKI,QAAQa,KAAmB,YACV,SAAtBjB,KAAKI,QAAQa,KAAkB,WAC/B,GACCQ,EAAY5B,EAAE,uBAAuB6B,KAAK1B,KAAKI,QAAQS,IACzDc,SAAS3B,KAAKuB,SAAW,IAAMN,GAC7BW,EAAa/B,EAAE,uBAAuB6B,KAAK1B,KAAKI,QAAQU,KAC1Da,SAAS3B,KAAKwB,UAAY,IAAMP,EAAO,WACrCY,EAAgBhC,EAAE,gDACpB8B,SAASV,GACPa,EAAejC,EAAE,8BACnBkC,OAAON,EAAWG,EAAYC,GAC5BG,EAAUnC,EAAE,iDACd8B,SAAU3B,KAAKO,SAAS0B,KAAK,WAAajC,KAAKuB,SAAWvB,KAAKwB,UAAU,QACzEG,SAASV,GAAMU,SAAS3B,KAAKI,QAAQc,MAEvClB,MAAKO,SAAS2B,KAAKF,GACnBnC,EAAEW,OAAOR,MACRgC,QAAShC,KAAKO,SAAS4B,SACvBV,UAAWA,EACXG,WAAYA,EACZE,aAAcA,IAEf9B,KAAKgC,QAAQD,OAAOD,EAEpB,IAAIX,GAAQnB,KAAKI,QAAQe,OAASiB,KAAKC,IAAIZ,EAAUN,QAASS,EAAWT,SAAUU,EAAcS,aAAa,EAC1GlB,EAASpB,KAAKI,QAAQgB,QAAUgB,KAAKC,IAAIZ,EAAUL,SAAUQ,EAAWR,SAC5EK,GAAUE,SAAS,aACnBC,EAAWD,SAAS,cACpB3B,KAAKgC,QAAQO,KAAMpB,MAAOA,EAAOC,OAAQA,IACrCpB,KAAKI,QAAQgB,SAChBK,EAAUc,IAAI,cAAed,EAAUL,SAAW,MAClDQ,EAAWW,IAAI,cAAeX,EAAWR,SAAW,OAErDpB,KAAKwC,QAAO,GACZxC,KAAKyC,SAAQ,IAGdpC,EAAOgB,UAAUqB,OAAS,WACrB1C,KAAKO,SAAS0B,KAAK,WAAYjC,KAAKc,MACnCd,KAAKa,MAGXR,EAAOgB,UAAUR,GAAK,SAAU8B,GAC/B,MAAI3C,MAAKO,SAAS0B,KAAK,aAAoB,GAC3CjC,KAAKgC,QAAQY,YAAY5C,KAAKwB,UAAY,QAAQG,SAAS3B,KAAKuB,UAChEvB,KAAKO,SAAS0B,KAAK,WAAW,QACzBU,GAAQ3C,KAAKyC,aAGnBpC,EAAOgB,UAAUP,IAAM,SAAU6B,GAChC,MAAI3C,MAAKO,SAAS0B,KAAK,aAAoB,GAC3CjC,KAAKgC,QAAQY,YAAY5C,KAAKuB,UAAUI,SAAS3B,KAAKwB,UAAY,QAClExB,KAAKO,SAAS0B,KAAK,WAAW,QACzBU,GAAQ3C,KAAKyC,aAGnBpC,EAAOgB,UAAUwB,OAAS,WACzB7C,KAAKgC,QAAQc,WAAW,YACxB9C,KAAKO,SAAS0B,KAAK,YAAY,IAGhC5B,EAAOgB,UAAU0B,QAAU,WAC1B/C,KAAKgC,QAAQV,KAAK,WAAY,YAC9BtB,KAAKO,SAAS0B,KAAK,YAAY,IAGhC5B,EAAOgB,UAAUmB,OAAS,SAAUG,GAC/B3C,KAAKO,SAAS0B,KAAK,YAAajC,KAAK+C,UACpC/C,KAAK6C,SACN7C,KAAKO,SAAS0B,KAAK,WAAYjC,KAAKa,GAAG8B,GACtC3C,KAAKc,IAAI6B,IAGftC,EAAOgB,UAAUoB,QAAU,SAAUE,GACpC3C,KAAKO,SAASO,IAAI,oBACb6B,GAAQ3C,KAAKO,SAASyC,SAC3BhD,KAAKO,SAASM,GAAG,mBAAoBhB,EAAEoD,MAAM,WAC5CjD,KAAKwC,UACHxC,QAGJK,EAAOgB,UAAU6B,QAAU,WAC1BlD,KAAKO,SAASO,IAAI,oBAClBd,KAAK8B,aAAaqB,SAClBnD,KAAKO,SAAS6C,WAAW,aACzBpD,KAAKO,SAAS8C,SAiBf,IAAIC,GAAMzD,EAAE0D,GAAGC,eAEf3D,GAAE0D,GAAGC,gBAA8B1D,EACnCD,EAAE0D,GAAGC,gBAAgBC,YAAcpD,EAKnCR,EAAE0D,GAAGb,OAAOgB,WAAa,WAExB,MADA7D,GAAE0D,GAAGC,gBAAkBF,EAChBtD,MAMRH,EAAE,WACDA,EAAE,6CAA6C2D,oBAGhD3D,EAAE8D,UAAU9C,GAAG,kBAAmB,2BAA4B,SAAS+C,GACtE,GAAIC,GAAYhE,EAAEG,MAAM8D,KAAK,uBAC7BD,GAAUL,gBAAgB,UAC1BI,EAAEG,oBAGFC"}
|
||||
10
js/lib/jquery.mCustomScrollbar.concat.min.js
vendored
10
js/lib/jquery.mCustomScrollbar.concat.min.js
vendored
File diff suppressed because one or more lines are too long
7
public/css/library/bootstrap-toggle/bootstrap2-toggle.css
vendored
Normal file
7
public/css/library/bootstrap-toggle/bootstrap2-toggle.css
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/*! ========================================================================
|
||||
* 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
@@ -19,14 +19,14 @@
|
||||
<div role="tabpanel" class="tab-pane fade {{#openTabEdit}}in active{{/openTabEdit}}" id="{{dialogMapEditContainerId}}"></div>
|
||||
<div role="tabpanel" class="tab-pane fade {{#openTabSettings}}in active{{/openTabSettings}}" id="{{dialogMapSettingsContainerId}}">
|
||||
<form role="form" class="form-horizontal">
|
||||
<h2><i class="fa fa-share-alt fa-fw"></i> Who has access</h2>
|
||||
<h2><i class="fa fa-share-alt fa-fw"></i> Share settings</h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-11">
|
||||
<blockquote>
|
||||
<p>
|
||||
Use this feature with caution! - Shared map entities have full access.
|
||||
They even can take over map control by removing other entities from this list.
|
||||
Use this feature with caution! - Shared map entities have full map access.
|
||||
They even can take over control by removing other entities from this list.
|
||||
</p>
|
||||
<small>Reduce this risk by creating a new map for joined OPs.
|
||||
</small>
|
||||
@@ -107,12 +107,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="{{dialogMessageContainerId}}"></div>
|
||||
<div class="{{formInfoContainerClass}} alert alert-info" style="display: none;">
|
||||
<span class="txt-color txt-color-information">Information</span>
|
||||
<small> (important non-critical information)</small>
|
||||
</div>
|
||||
|
||||
<div class="{{formWarningContainerClass}} alert alert-warning" style="display: none;">
|
||||
<span class="txt-color txt-color-warning">Warning</span>
|
||||
<small> (important non-critical information)</small>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="{{formWarningContainerClass}}" class="alert alert-warning" style="display: none;">
|
||||
<span class="txt-color txt-color-warning">Warning</span>
|
||||
<small> (important non-critical information)</small>
|
||||
</div>
|
||||
<div class="{{formErrorContainerClass}} alert alert-danger" style="display: none;">
|
||||
<span class="txt-color txt-color-danger">Error</span>
|
||||
<small> (important non-critical information)</small>
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,6 +66,17 @@
|
||||
There is no need for any save/edit buttons.
|
||||
</p>
|
||||
|
||||
<h4><i class="fa fa-location-arrow fa-fw"></i> Map tracking</h4>
|
||||
|
||||
<p>
|
||||
If "map tracking" is <span class="txt-color txt-color-greenLight">on</span>, new systems <small>(<i class="fa fa-sun-o fa-fw"></i><a href="#" data-target="#pf-manual-system">more</a>)</small>
|
||||
and connections <small>(<i class="fa fa-chain fa-fw"></i><a href="#" data-target="#pf-manual-connection">more</a>)</small>
|
||||
will be automatically added to the current map <small>(<i class="fa fa-code-fork fa-fw"></i><a href="#" data-target="#pf-manual-map">more</a>)</small>.
|
||||
This can only work if your current position is known by <em class="pf-brand">pathfinder</em>. You have to use the <em class="pf-brand">IGB</em> for this feature.<br>
|
||||
The connection scope <small>(<i class="fa fa-crosshairs fa-fw"></i><a href="#" data-target="#pf-manual-scrollspy-anchor-connection-scope">more</a>)</small> will be auto-detected and can be changed afterwards.
|
||||
This is achieved by calculating the jump distance between your current system and system you came from.
|
||||
</p>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<hr class="pf-manual-scroll-break">
|
||||
@@ -82,7 +93,7 @@
|
||||
<p>
|
||||
Any system in a map can be set as "active" by <kbd>click</kbd>. <br>
|
||||
Just one system per map can have an active state.
|
||||
The active system has a <span style="-webkit-box-shadow: #ffffbb 0px 0px 8px 0px;box-shadow: #ffffbb 0px 0px 8px 0px; display: inline-block; margin: 0 5px; padding: 0 3px;">light yellow</span> shaddow.
|
||||
The active system has a <span style="-webkit-box-shadow: #ffffbb 0px 0px 8px 0px;box-shadow: #ffffbb 0px 0px 8px 0px; display: inline-block; margin: 0 5px; padding: 0 3px;">light yellow</span> shadow.
|
||||
Additional system information is shown below the map.
|
||||
</p>
|
||||
<h4>Name / Alias</h4>
|
||||
@@ -151,7 +162,7 @@
|
||||
<li><i class="fa fa-plus fa-fw"></i> Adds a new system that connects to this system</li>
|
||||
<li><i class="fa fa-lock fa-fw"></i> Lock this system <small><a href="#" data-target="#pf-manual-scrollspy-anchor-system-locked">more</a></small></li>
|
||||
<li><i class="fa fa-users fa-fw"></i> Set "Rally Point" for this system <small><a href="#" data-target="#pf-manual-scrollspy-anchor-system-rally">more</a></small></li>
|
||||
<li><i class="fa fa-reply fa-rotate-180 fa-fw"></i> Changes the status of this system <small><a href="#" data-target="#pf-manual-scrollspy-anchor-system-status">more</a></small></li>
|
||||
<li><i class="fa fa-tags fa-fw"></i> Changes the status of this system <small><a href="#" data-target="#pf-manual-scrollspy-anchor-system-status">more</a></small></li>
|
||||
<li><i class="fa fa-eraser fa-fw"></i> Delete this system and all connections <small><a href="#" data-target="#pf-manual-scrollspy-anchor-system-delete">more</a></small></li>
|
||||
</ul>
|
||||
<h4 id="pf-manual-scrollspy-anchor-system-locked"><i class="fa fa-lock fa-fw"></i> Locked system</h4>
|
||||
@@ -228,8 +239,8 @@
|
||||
<ul class="list-unstyled well" style=" margin-left: 10px;">
|
||||
<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-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-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>
|
||||
@@ -386,7 +397,6 @@
|
||||
</p>
|
||||
<ul>
|
||||
<li>New Rally point</span> <small>(<i class="fa fa-users fa-fw"></i> <a href="#" data-target="#pf-manual-scrollspy-anchor-system-rally">more</a>)</small></li>
|
||||
<li>System found with logged of pilots</span><small> (<a href="#">coming soon™</a></small>)</li>
|
||||
</ul>
|
||||
|
||||
<hr class="pf-manual-scroll-break">
|
||||
|
||||
@@ -207,7 +207,6 @@
|
||||
and come back to this page.
|
||||
</small>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -246,6 +245,11 @@
|
||||
|
||||
</div>
|
||||
{{/userData.api}}
|
||||
|
||||
<div class="{{formWarningContainerClass}} alert alert-warning" style="display: none;">
|
||||
<span class="txt-color txt-color-warning">Warning</span>
|
||||
<small> (important non-critical information)</small>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -16,70 +16,59 @@
|
||||
|
||||
|
||||
{{#userData.character}}
|
||||
<h2><img src="{{ccpImageServer}}Character/{{id}}_32.jpg"> Private maps "<em class="pf-map-type-private">{{userData.name}}</em>"</h2>
|
||||
<h2 class="pf-dynamic-area"><img src="{{ccpImageServer}}Character/{{id}}_32.jpg"> Private maps "<em class="pf-map-type-private">{{userData.name}}</em>"</h2>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox col-sm-10">
|
||||
<label for="privateSharing">
|
||||
<input id="privateSharing" type="checkbox" name="privateSharing" data-toggle="toggle" value="1" {{#userData.sharing}}checked{{/userData.sharing}}>
|
||||
map invite for private maps
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#corporation}}
|
||||
<h2 class="pf-dynamic-area"><img src="{{ccpImageServer}}Corporation/{{id}}_32.png"> Corporation maps "<em class="pf-map-type-corporation">{{name}}</em>"</h2>
|
||||
|
||||
|
||||
<fieldset class="pf-dynamic-area">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="privateSharing" class="col-sm-10 control-label">Enable map invite for private maps</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="checkbox">
|
||||
<input id="privateSharing" type="checkbox" name="privateSharing" value="1" {{#userData.sharing}}checked{{/userData.sharing}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox col-sm-10">
|
||||
<label for="corporationSharing">
|
||||
<input id="corporationSharing" type="checkbox" name="corporationSharing" data-toggle="toggle" value="1" {{#sharing}}checked{{/sharing}}>
|
||||
map invite for corporation maps
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
{{#corporation}}
|
||||
<h2><img src="{{ccpImageServer}}Corporation/{{id}}_32.png"> Corporation maps "<em class="pf-map-type-corporation">{{name}}</em>"</h2>
|
||||
|
||||
<fieldset class="pf-dynamic-area">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="corporationSharing" class="col-sm-10 control-label">Enable map invite for corporation maps</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="checkbox">
|
||||
<input id="corporationSharing" type="checkbox" name="corporationSharing" value="1" {{#sharing}}checked{{/sharing}} >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{{/corporation}}
|
||||
|
||||
{{#alliance}}
|
||||
<h2><img src="{{ccpImageServer}}Alliance/{{id}}_32.png"> Alliance maps "<em class="pf-map-type-alliance">{{name}}</em>"</h2>
|
||||
|
||||
<fieldset class="pf-dynamic-area">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="allianceSharing" class="col-sm-10 control-label">Enable map invite for alliance maps</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="checkbox">
|
||||
<input id="allianceSharing" type="checkbox" name="allianceSharing" value="1" {{#sharing}}checked{{/sharing}}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<h2 class="pf-dynamic-area"><img src="{{ccpImageServer}}Alliance/{{id}}_32.png"> Alliance maps "<em class="pf-map-type-alliance">{{name}}</em>"</h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox col-sm-10">
|
||||
<label for="allianceSharing">
|
||||
<input id="allianceSharing" type="checkbox" name="allianceSharing" data-toggle="toggle" value="1" {{#sharing}}checked{{/sharing}}>
|
||||
map invite for alliance maps
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/alliance}}
|
||||
{{/userData.character}}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
<div class="col-sm-11">
|
||||
<blockquote>
|
||||
<p>
|
||||
Please choose your main character. These character is visible to other friendly pilots within a map.
|
||||
Please choose your main character. <em>Pathfinder</em> will take these character if you use the <em>OGB</em>.
|
||||
The <em>IGB</em> will autodetect your current character.
|
||||
</p>
|
||||
<small>You can also switch/edit/add characters later on.
|
||||
<small>You can also change your main characters later on.
|
||||
</small>
|
||||
</blockquote>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="form-group">
|
||||
<label for="icon" class="col-sm-4 control-label">Icon</label>
|
||||
<div class="col-sm-8">
|
||||
<select style="font-family: FontAwesome" name="icon" id="icon" class="form-control" title="Icon for map tab" data-placement="top">
|
||||
<select style="font-family: FontAwesome" name="icon" id="icon" class="form-control" title="Map icon for identification" data-placement="top">
|
||||
{{#icon}}
|
||||
<option value="{{class}}">{{{unicode}}}</option>
|
||||
{{/icon}}
|
||||
@@ -18,19 +18,18 @@
|
||||
<label for="name" class="col-sm-2 control-label">Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input name="name" type="text" class="form-control" id="name" value="" placeholder="Map name" data-error="Name required" required>
|
||||
<span class="help-block with-errors">Set unique map name</span>
|
||||
<span class="help-block with-errors">Choose a meaningful name</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="scope" class="col-sm-2 control-label">Scope</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="scopeId" id="scope" class="form-control">
|
||||
<select name="scopeId" id="scope" class="form-control" title="Default scope for new connections" data-placement="top">
|
||||
{{#scope}}
|
||||
<option value="{{id}}">{{label}}</option>
|
||||
{{/scope}}
|
||||
@@ -42,7 +41,7 @@
|
||||
<div class="form-group">
|
||||
<label for="type" class="col-sm-2 control-label">Type</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="typeId" id="type" class="form-control" title="Alliance/Corporation maps require character authorisation" data-placement="top">
|
||||
<select name="typeId" id="type" class="form-control" title="Alliance/Corporation maps require character authentication" data-placement="top">
|
||||
{{#type}}
|
||||
<option value="{{id}}">{{label}}</option>
|
||||
{{/type}}
|
||||
@@ -54,6 +53,17 @@
|
||||
|
||||
<input type="hidden" name="id" value="0" />
|
||||
|
||||
|
||||
<div class="{{formInfoContainerClass}} alert alert-info" style="display: none;">
|
||||
<span class="txt-color txt-color-information">Information</span>
|
||||
<small> (important non-critical information)</small>
|
||||
</div>
|
||||
|
||||
<div class="{{formWarningContainerClass}} alert alert-warning" style="display: none;">
|
||||
<span class="txt-color txt-color-warning">Warning</span>
|
||||
<small> (important non-critical information)</small>
|
||||
</div>
|
||||
|
||||
<div class="{{formErrorContainerClass}} alert alert-danger" style="display: none;">
|
||||
<span class="txt-color txt-color-danger">Error</span>
|
||||
<small> (important non-critical information)</small>
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
<i class="fa fa-fw fa-bolt"></i>
|
||||
<span>offline</span>
|
||||
</p>
|
||||
<p class="navbar-text" title="map tracking">
|
||||
<i class="fa fa-fw fa-location-arrow"></i>
|
||||
<input id="{{mapTrackingId}}" type="checkbox" data-toggle="toggle" value="1" >
|
||||
</p>
|
||||
<a class="navbar-brand pf-head-map" href="#">
|
||||
Map <i class="fa fa-code-fork fa-lg fa-fw"></i>
|
||||
</a>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
{{/system.locked}}
|
||||
<i class="fa fa-fw fa-angle-double-right"></i>
|
||||
</h5>
|
||||
<h5 style="display: inline-block"><a href="{{system.constellation.id}}" data-toggle="tooltip" data-placement="top" data-container="body" title="constellation">{{system.constellation.name}}</a> <i class="fa fa-fw fa-angle-double-right"></i></h5>
|
||||
<h5 style="display: inline-block"><a href="{{system.region.id}}" data-toggle="tooltip" data-placement="top" data-container="body" title="region">{{system.region.name}}</a> <i class="fa fa-fw fa-angle-double-right"></i></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> <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> <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>
|
||||
|
||||
<a href="http://evemaps.dotlan.net/system/{{system.name}}" target="_blank">
|
||||
|
||||
@@ -1284,9 +1284,9 @@ input[type="email"]{
|
||||
//@include box-shadow(0 1px 3px 0 rgba(red($black), green($black), blue($black), 0.12), 0 1px 2px 0 rgba(red($black), green($black), blue($black), 0.24));
|
||||
}
|
||||
.btn:active {
|
||||
position:relative;
|
||||
//top:1px;
|
||||
//left:1px;
|
||||
//position: relative; conflict with bootstrap-toggle plugin
|
||||
//top:1px;
|
||||
//left:1px;
|
||||
}
|
||||
|
||||
.btn.btn-ribbon {
|
||||
|
||||
@@ -6,10 +6,6 @@ $bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")
|
||||
// Variables
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//== Scaffolding
|
||||
//
|
||||
// ## Settings for some of the most global styles.
|
||||
|
||||
@@ -95,12 +95,12 @@
|
||||
}
|
||||
|
||||
// show add button only on last row
|
||||
.pf-dialog-api-row:not(:nth-last-child(1)) .pf-dialog-clone-button{
|
||||
.pf-dialog-api-row:not(:nth-last-child(2)) .pf-dialog-clone-button{
|
||||
display: none;
|
||||
}
|
||||
|
||||
// hide delete button if there is just a single api row
|
||||
.pf-dialog-api-row:nth-child(2):nth-last-child(1) .pf-dialog-delete-button{
|
||||
.pf-dialog-api-row:nth-child(2):nth-last-child(2) .pf-dialog-delete-button{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,5 +19,15 @@ input, select{
|
||||
-webkit-text-fill-color: $gray-lighter;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// fix for bootstrap-toggle plugin
|
||||
.toggle{
|
||||
&.btn:active{
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.toggle-group .btn{
|
||||
padding: 0px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,7 +699,7 @@ select:active, select:hover {
|
||||
table{
|
||||
color: $gray-lighter;
|
||||
font-family: $font-family-bold;
|
||||
line-height: 18px;
|
||||
line-height: 16px;
|
||||
font-size: 11px;
|
||||
|
||||
td{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -84,36 +84,40 @@
|
||||
max-height: 50px;
|
||||
}
|
||||
|
||||
.pf-sig-table-action-cell{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pf-sig-table-edit-name-input{
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// signature timer/date counter head
|
||||
th.pf-sig-table-counter{
|
||||
padding-right: 20px !important;
|
||||
// global datatable styles
|
||||
.dataTable{
|
||||
.pf-table-action-cell{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
// signature timer/date counter head
|
||||
th.pf-table-counter-cell{
|
||||
padding-right: 20px !important;
|
||||
}
|
||||
|
||||
// signature timer/date counter
|
||||
.pf-table-counter-cell{
|
||||
text-align: right;
|
||||
|
||||
.pf-digit-counter-small{
|
||||
width: 20px;
|
||||
display: inline-block;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
// signature timer/date counter
|
||||
.pf-sig-table-counter{
|
||||
text-align: right;
|
||||
|
||||
.pf-digit-counter-small{
|
||||
width: 20px;
|
||||
display: inline-block;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.pf-digit-counter-large{
|
||||
width: 26px;
|
||||
display: inline-block;
|
||||
font-size: 10px;
|
||||
}
|
||||
.pf-digit-counter-large{
|
||||
width: 26px;
|
||||
display: inline-block;
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// system graph module =====================================================
|
||||
|
||||
85
sass/library/bootstrap-toggle/_bootstrap2-toggle.scss
Normal file
85
sass/library/bootstrap-toggle/_bootstrap2-toggle.scss
Normal file
@@ -0,0 +1,85 @@
|
||||
/*! ========================================================================
|
||||
* 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; }
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
// add a icon to all "disabled" options
|
||||
.pf-select-item-anchor:before{
|
||||
content: "\f023";
|
||||
content: "\f05e";
|
||||
font-family: FontAwesome;
|
||||
font-size: 9px;
|
||||
position: absolute;
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
@import "library/select2/_core"; // Select2 4.0.0
|
||||
@import "library/blue-imp-gallery/_blueimp-gallery"; // Blue Imp Gallery
|
||||
@import "library/blue-imp-gallery/_bootstrap-image-gallery"; // Blue Imp Gallery Bootstrap
|
||||
|
||||
@import "library/blue-imp-gallery/_bootstrap-image-gallery"; // Blue Imp Gallery Bootstrap
|
||||
@import "library/bootstrap-toggle/_bootstrap2-toggle"; // Bootstrap Toggle v2.2.0
|
||||
|
||||
// Main THEME (Imports by order - do not change order)
|
||||
@import "main";
|
||||
|
||||
Reference in New Issue
Block a user