- fixed "location tracking"

This commit is contained in:
Mark Friedrich
2018-06-08 12:47:04 +02:00
parent 09043bca53
commit 0443e2c06a
4 changed files with 24 additions and 15 deletions

View File

@@ -767,7 +767,16 @@ class CharacterModel extends BasicModel {
if( !empty($lookupUniverseIds) ){
// get "more" information for some Ids (e.g. name)
$universeData = self::getF3()->ccpClient->getUniverseNamesData($lookupUniverseIds, $additionalOptions);
if( !empty($universeData) ){
if( !empty($universeData) && !isset($universeData['error']) ){
// We expect max ONE system AND/OR station data, not an array of e.g. systems
if(!empty($universeData['system'])){
$universeData['system'] = reset($universeData['system']);
}
if(!empty($universeData['station'])){
$universeData['station'] = reset($universeData['station']);
}
$logData = array_replace_recursive($logData, $universeData);
}else{
// this is important! universe data is a MUST HAVE!

View File

@@ -40,7 +40,7 @@ define([
case 'alliance':
imagePath = Init.url.ccpImageServer + '/Alliance/' + data.id + '_32.png';
break;
case 'inventory_type':
case 'inventoryType':
imagePath = Init.url.ccpImageServer + '/Type/' + data.id + '_32.png';
break;
case 'render':
@@ -49,7 +49,7 @@ define([
case 'station':
iconName = 'fa-home';
break;
case 'solar_system':
case 'system':
iconName = 'fa-sun';
break;
}
@@ -202,7 +202,7 @@ define([
// select changed
}).on('select2:open', function(){
// clear selected system (e.g. default system)
// => improves usability (not necessary). There is a small "x" whe it could be cleared manually
// => improves usability (not necessary). There is a small "x" if field can be cleared manually
if(
options.maxSelectionLength === 1 &&
$(this).val() !== null
@@ -394,7 +394,7 @@ define([
// select changed
}).on('select2:open', function(){
// clear selected system (e.g. default system)
// => improves usability (not necessary). There is a small "x" whe it could be cleared manually
// => improves usability (not necessary). There is a small "x" if field can be cleared manually
if(
options.maxSelectionLength === 1 &&
$(this).val() !== null
@@ -441,7 +441,7 @@ define([
children: groupData.types.map(mapChildren, {
groupId: groupData.id,
categoryId: categoryData.id,
categoryType: 'inventory_type',
categoryType: 'inventoryType',
})
});
}
@@ -473,7 +473,7 @@ define([
}
}).on('select2:open', function(){
// clear selected system (e.g. default system)
// => improves usability (not necessary). There is a small "x" whe it could be cleared manually
// => improves usability (not necessary). There is a small "x" if field can be cleared manually
if(
options.maxSelectionLength === 1 &&
$(this).val() !== null

View File

@@ -40,7 +40,7 @@ define([
case 'alliance':
imagePath = Init.url.ccpImageServer + '/Alliance/' + data.id + '_32.png';
break;
case 'inventory_type':
case 'inventoryType':
imagePath = Init.url.ccpImageServer + '/Type/' + data.id + '_32.png';
break;
case 'render':
@@ -49,7 +49,7 @@ define([
case 'station':
iconName = 'fa-home';
break;
case 'solar_system':
case 'system':
iconName = 'fa-sun';
break;
}
@@ -202,7 +202,7 @@ define([
// select changed
}).on('select2:open', function(){
// clear selected system (e.g. default system)
// => improves usability (not necessary). There is a small "x" whe it could be cleared manually
// => improves usability (not necessary). There is a small "x" if field can be cleared manually
if(
options.maxSelectionLength === 1 &&
$(this).val() !== null
@@ -394,7 +394,7 @@ define([
// select changed
}).on('select2:open', function(){
// clear selected system (e.g. default system)
// => improves usability (not necessary). There is a small "x" whe it could be cleared manually
// => improves usability (not necessary). There is a small "x" if field can be cleared manually
if(
options.maxSelectionLength === 1 &&
$(this).val() !== null
@@ -441,7 +441,7 @@ define([
children: groupData.types.map(mapChildren, {
groupId: groupData.id,
categoryId: categoryData.id,
categoryType: 'inventory_type',
categoryType: 'inventoryType',
})
});
}
@@ -473,7 +473,7 @@ define([
}
}).on('select2:open', function(){
// clear selected system (e.g. default system)
// => improves usability (not necessary). There is a small "x" whe it could be cleared manually
// => improves usability (not necessary). There is a small "x" if field can be cleared manually
if(
options.maxSelectionLength === 1 &&
$(this).val() !== null

View File

@@ -16,8 +16,8 @@
{{/system.locked}}
<i class="fas fa-fw fa-angle-double-right"></i>
</h5>
<h5><a href="javascript:void(0);" data-url="{{ajaxConstellationInfoUrl}}/{{system.constellation.id}}" class="{{systemConstellationLinkClass}} popup-ajax" title="constellation">{{system.constellation.name}}</a>&nbsp;<i class="fas fa-fw fa-angle-double-right"></i></h5>
<h5><span class="{{systemRegionLinkClass}}" data-toggle="tooltip" data-placement="top" data-container="body" title="region">{{system.region.name}}</span>&nbsp;<i class="fas fa-fw fa-angle-double-right"></i></h5>
<h5><a href="javascript:void(0);" data-url="{{ajaxConstellationInfoUrl}}/{{system.constellation.id}}" class="{{systemConstellationLinkClass}} popup-ajax {{#systemNameClass}}{{system.security}}{{/systemNameClass}}" title="constellation">{{system.constellation.name}}</a>&nbsp;<i class="fas fa-fw fa-angle-double-right"></i></h5>
<h5><span class="{{systemRegionLinkClass}} {{#systemNameClass}}{{system.security}}{{/systemNameClass}}" data-toggle="tooltip" data-placement="top" data-container="body" title="region">{{system.region.name}}</span>&nbsp;<i class="fas fa-fw fa-angle-double-right"></i></h5>
<h5><span class="{{systemTypeLinkClass}}" data-toggle="tooltip" data-placement="top" data-container="body" title="type">{{systemTypeName}}</span></h5>
{{#systemIsWormhole}}