- improved "current location" in nav-bar, closed #371
- fixed minor signature sync bug
This commit is contained in:
@@ -2713,6 +2713,7 @@ define([
|
||||
mapElement = $(mapElement);
|
||||
|
||||
// get current character log data
|
||||
var characterLogExists = false;
|
||||
var currentCharacterLog = Util.getCurrentCharacterLog();
|
||||
|
||||
// check if map is frozen
|
||||
@@ -2726,6 +2727,14 @@ define([
|
||||
userCount: 0 // active user in a map
|
||||
};
|
||||
|
||||
if(
|
||||
currentCharacterLog &&
|
||||
currentCharacterLog.system
|
||||
){
|
||||
characterLogExists = true;
|
||||
headerUpdateData.currentSystemName = currentCharacterLog.system.name;
|
||||
}
|
||||
|
||||
// check if current user was found on the map
|
||||
var currentUserOnMap = false;
|
||||
|
||||
@@ -2763,20 +2772,17 @@ define([
|
||||
}
|
||||
|
||||
// the current user can only be in a single system ------------------------------------------
|
||||
if( !currentUserOnMap){
|
||||
if(
|
||||
characterLogExists &&
|
||||
!currentUserOnMap &&
|
||||
currentCharacterLog.system.id === systemId
|
||||
){
|
||||
currentUserIsHere = true;
|
||||
currentUserOnMap = true;
|
||||
|
||||
if(
|
||||
currentCharacterLog &&
|
||||
currentCharacterLog.system &&
|
||||
currentCharacterLog.system.id === systemId
|
||||
){
|
||||
currentUserIsHere = true;
|
||||
currentUserOnMap = true;
|
||||
|
||||
// set current location data for header update
|
||||
headerUpdateData.currentSystemId = $(system).data('id');
|
||||
headerUpdateData.currentSystemName = currentCharacterLog.system.name;
|
||||
}
|
||||
// set current location data for header update
|
||||
headerUpdateData.currentSystemId = $(system).data('id');
|
||||
//headerUpdateData.currentSystemName = currentCharacterLog.system.name;
|
||||
}
|
||||
|
||||
system.updateSystemUserData(map, tempUserData, currentUserIsHere);
|
||||
|
||||
@@ -877,25 +877,18 @@ define([
|
||||
var linkElement = currentLocationElement.find('a');
|
||||
var textElement = linkElement.find('span');
|
||||
|
||||
if( linkElement.data('systemName') !== locationData.currentSystemName ){
|
||||
var tempSystemName = locationData.currentSystemName;
|
||||
var tempSystemId = locationData.currentSystemId;
|
||||
|
||||
if(
|
||||
tempSystemName === undefined ||
|
||||
tempSystemId === undefined
|
||||
){
|
||||
tempSystemName = false;
|
||||
tempSystemId = false;
|
||||
}
|
||||
var tempSystemName = (locationData.currentSystemName) ? locationData.currentSystemName : false;
|
||||
var tempSystemId = (locationData.currentSystemId) ? locationData.currentSystemId : 0;
|
||||
|
||||
if(
|
||||
linkElement.data('systemName') !== tempSystemName ||
|
||||
linkElement.data('systemId') !== tempSystemId
|
||||
){
|
||||
linkElement.data('systemName', tempSystemName);
|
||||
linkElement.data('systemId', tempSystemId);
|
||||
linkElement.toggleClass('disabled', !tempSystemId);
|
||||
|
||||
if(
|
||||
tempSystemName !== false &&
|
||||
tempSystemId !== false
|
||||
){
|
||||
if(tempSystemName !== false){
|
||||
textElement.text(locationData.currentSystemName);
|
||||
currentLocationElement.velocity('fadeIn', {duration: Init.animationSpeed.headerLink});
|
||||
}else{
|
||||
|
||||
@@ -106,13 +106,10 @@ define([
|
||||
* @returns {Array}
|
||||
*/
|
||||
var getSignatureTableData = function(){
|
||||
|
||||
var signatureTableApi = signatureTable.api();
|
||||
|
||||
var tableData = [];
|
||||
|
||||
signatureTableApi.rows().eq(0).each(function(idx){
|
||||
|
||||
var row = signatureTableApi.row(idx);
|
||||
// default row data
|
||||
var defaultRowData = row.data();
|
||||
@@ -125,22 +122,23 @@ define([
|
||||
if(editableFields.length > 0){
|
||||
var values = $(editableFields).editable('getValue');
|
||||
|
||||
// convert to lower for better compare options
|
||||
values.name = values.name.toLowerCase();
|
||||
if(values.name){
|
||||
// convert to lower for better compare options
|
||||
values.name = values.name.toLowerCase();
|
||||
|
||||
// add pk for this row
|
||||
values.id = defaultRowData.id;
|
||||
// add pk for this row
|
||||
values.id = defaultRowData.id;
|
||||
|
||||
// add updated for this row
|
||||
values.updated = defaultRowData.updated;
|
||||
// add updated for this row
|
||||
values.updated = defaultRowData.updated;
|
||||
|
||||
// add row index
|
||||
values.index = idx;
|
||||
// add row index
|
||||
values.index = idx;
|
||||
|
||||
tableData.push( values );
|
||||
tableData.push( values );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return tableData;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2713,6 +2713,7 @@ define([
|
||||
mapElement = $(mapElement);
|
||||
|
||||
// get current character log data
|
||||
var characterLogExists = false;
|
||||
var currentCharacterLog = Util.getCurrentCharacterLog();
|
||||
|
||||
// check if map is frozen
|
||||
@@ -2726,6 +2727,14 @@ define([
|
||||
userCount: 0 // active user in a map
|
||||
};
|
||||
|
||||
if(
|
||||
currentCharacterLog &&
|
||||
currentCharacterLog.system
|
||||
){
|
||||
characterLogExists = true;
|
||||
headerUpdateData.currentSystemName = currentCharacterLog.system.name;
|
||||
}
|
||||
|
||||
// check if current user was found on the map
|
||||
var currentUserOnMap = false;
|
||||
|
||||
@@ -2763,20 +2772,17 @@ define([
|
||||
}
|
||||
|
||||
// the current user can only be in a single system ------------------------------------------
|
||||
if( !currentUserOnMap){
|
||||
if(
|
||||
characterLogExists &&
|
||||
!currentUserOnMap &&
|
||||
currentCharacterLog.system.id === systemId
|
||||
){
|
||||
currentUserIsHere = true;
|
||||
currentUserOnMap = true;
|
||||
|
||||
if(
|
||||
currentCharacterLog &&
|
||||
currentCharacterLog.system &&
|
||||
currentCharacterLog.system.id === systemId
|
||||
){
|
||||
currentUserIsHere = true;
|
||||
currentUserOnMap = true;
|
||||
|
||||
// set current location data for header update
|
||||
headerUpdateData.currentSystemId = $(system).data('id');
|
||||
headerUpdateData.currentSystemName = currentCharacterLog.system.name;
|
||||
}
|
||||
// set current location data for header update
|
||||
headerUpdateData.currentSystemId = $(system).data('id');
|
||||
//headerUpdateData.currentSystemName = currentCharacterLog.system.name;
|
||||
}
|
||||
|
||||
system.updateSystemUserData(map, tempUserData, currentUserIsHere);
|
||||
|
||||
@@ -877,25 +877,18 @@ define([
|
||||
var linkElement = currentLocationElement.find('a');
|
||||
var textElement = linkElement.find('span');
|
||||
|
||||
if( linkElement.data('systemName') !== locationData.currentSystemName ){
|
||||
var tempSystemName = locationData.currentSystemName;
|
||||
var tempSystemId = locationData.currentSystemId;
|
||||
|
||||
if(
|
||||
tempSystemName === undefined ||
|
||||
tempSystemId === undefined
|
||||
){
|
||||
tempSystemName = false;
|
||||
tempSystemId = false;
|
||||
}
|
||||
var tempSystemName = (locationData.currentSystemName) ? locationData.currentSystemName : false;
|
||||
var tempSystemId = (locationData.currentSystemId) ? locationData.currentSystemId : 0;
|
||||
|
||||
if(
|
||||
linkElement.data('systemName') !== tempSystemName ||
|
||||
linkElement.data('systemId') !== tempSystemId
|
||||
){
|
||||
linkElement.data('systemName', tempSystemName);
|
||||
linkElement.data('systemId', tempSystemId);
|
||||
linkElement.toggleClass('disabled', !tempSystemId);
|
||||
|
||||
if(
|
||||
tempSystemName !== false &&
|
||||
tempSystemId !== false
|
||||
){
|
||||
if(tempSystemName !== false){
|
||||
textElement.text(locationData.currentSystemName);
|
||||
currentLocationElement.velocity('fadeIn', {duration: Init.animationSpeed.headerLink});
|
||||
}else{
|
||||
|
||||
@@ -106,13 +106,10 @@ define([
|
||||
* @returns {Array}
|
||||
*/
|
||||
var getSignatureTableData = function(){
|
||||
|
||||
var signatureTableApi = signatureTable.api();
|
||||
|
||||
var tableData = [];
|
||||
|
||||
signatureTableApi.rows().eq(0).each(function(idx){
|
||||
|
||||
var row = signatureTableApi.row(idx);
|
||||
// default row data
|
||||
var defaultRowData = row.data();
|
||||
@@ -125,22 +122,23 @@ define([
|
||||
if(editableFields.length > 0){
|
||||
var values = $(editableFields).editable('getValue');
|
||||
|
||||
// convert to lower for better compare options
|
||||
values.name = values.name.toLowerCase();
|
||||
if(values.name){
|
||||
// convert to lower for better compare options
|
||||
values.name = values.name.toLowerCase();
|
||||
|
||||
// add pk for this row
|
||||
values.id = defaultRowData.id;
|
||||
// add pk for this row
|
||||
values.id = defaultRowData.id;
|
||||
|
||||
// add updated for this row
|
||||
values.updated = defaultRowData.updated;
|
||||
// add updated for this row
|
||||
values.updated = defaultRowData.updated;
|
||||
|
||||
// add row index
|
||||
values.index = idx;
|
||||
// add row index
|
||||
values.index = idx;
|
||||
|
||||
tableData.push( values );
|
||||
tableData.push( values );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return tableData;
|
||||
|
||||
@@ -126,6 +126,15 @@ em{
|
||||
|
||||
}
|
||||
|
||||
// links ==========================================================================================
|
||||
a{
|
||||
&.disabled{
|
||||
color: $navbar-default-link-color;
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
// alert messages =================================================================================
|
||||
.alert{
|
||||
will-change: opacity, transform;
|
||||
|
||||
Reference in New Issue
Block a user