#49 WIP "user interaction" dialog
This commit is contained in:
@@ -2742,19 +2742,6 @@ define([
|
||||
}
|
||||
var defaultSystemStatus = Init.systemStatus[ tempKeys[0] ].id;
|
||||
|
||||
// dialog data -------------------------------------------------------------------------------------------------
|
||||
var data = {
|
||||
id: config.systemDialogId,
|
||||
selectClass: config.systemDialogSelectClass
|
||||
};
|
||||
|
||||
// current character log data ----------------------------------------------------------------------------------
|
||||
var currentCharacterLog = Util.getCurrentCharacterLog();
|
||||
|
||||
if(currentCharacterLog !== false){
|
||||
// set current position as "default" system to add
|
||||
data.currentSystem = currentCharacterLog.system;
|
||||
}
|
||||
|
||||
// get current map data -> disable systems that are already on it ----------------------------------------------
|
||||
var mapData = mapContainer.getMapDataFromClient({forceData: true});
|
||||
@@ -2764,6 +2751,25 @@ define([
|
||||
mapSystemIds.push( mapSystems[i].systemId );
|
||||
}
|
||||
|
||||
// dialog data -------------------------------------------------------------------------------------------------
|
||||
var data = {
|
||||
id: config.systemDialogId,
|
||||
selectClass: config.systemDialogSelectClass
|
||||
};
|
||||
|
||||
// set current position as "default" system to add -------------------------------------------------------------
|
||||
var currentCharacterLog = Util.getCurrentCharacterLog();
|
||||
|
||||
if(
|
||||
currentCharacterLog !== false &&
|
||||
mapSystemIds.indexOf( currentCharacterLog.system.id ) === -1
|
||||
){
|
||||
// current system is NOT already on this map
|
||||
// set current position as "default" system to add
|
||||
data.currentSystem = currentCharacterLog.system;
|
||||
}
|
||||
|
||||
|
||||
requirejs(['text!templates/dialog/system.html', 'mustache'], function(template, Mustache) {
|
||||
|
||||
var content = Mustache.render(template, data);
|
||||
|
||||
Reference in New Issue
Block a user