Fixed dialog "overlapping" if main character ID not found
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[PATHFINDER]
|
||||
NAME = "PATHFINDER"
|
||||
; installed version (used for CSS/JS cache busting)
|
||||
VERSION = "v0.0.13"
|
||||
VERSION = "v0.0.14"
|
||||
; contact information (DO NOT CHANGE)
|
||||
CONTACT = "https://github.com/exodus4d"
|
||||
; source code (DO NOT CHANGE)
|
||||
|
||||
@@ -219,7 +219,7 @@ define([
|
||||
if(userData.character === undefined){
|
||||
// no active character found -> show settings dialog
|
||||
|
||||
Util.showNotify({title: 'Main character missing', text: 'Check API and set a main character', type: 'error'});
|
||||
Util.showNotify({title: 'Main character not set', text: 'Check your API data and set a main character', type: 'error'});
|
||||
|
||||
$(document).triggerMenuEvent('ShowSettingsDialog');
|
||||
}
|
||||
|
||||
@@ -110,16 +110,14 @@ define([
|
||||
*/
|
||||
$.fn.showSettingsDialog = function(options){
|
||||
|
||||
// check if there is already a settings dialog open
|
||||
var settingsDialog = $('#' + config.settingsDialogId);
|
||||
|
||||
if(settingsDialog.length > 0){
|
||||
// check if there are other dialogs open
|
||||
var openDialogs = Util.getOpenDialogs();
|
||||
if(openDialogs.length > 0){
|
||||
return false;
|
||||
}
|
||||
|
||||
var reroutePath = '';
|
||||
|
||||
|
||||
// check navigation buttons and show/hide them
|
||||
var checkNavigationButton = function(dialog){
|
||||
var navigationBarElement = $(dialog).find('.' + config.dialogWizardNavigationClass);
|
||||
|
||||
@@ -7,7 +7,7 @@ define([
|
||||
'app/init',
|
||||
'app/util',
|
||||
'app/render',
|
||||
'bootbox',
|
||||
'bootbox'
|
||||
], function($, Init, Util, Render, bootbox) {
|
||||
'use strict';
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ define([
|
||||
duration: 180
|
||||
},
|
||||
|
||||
// dialogs
|
||||
dialogClass: 'modal-dialog', // class for all dialogs (bootstrap)
|
||||
|
||||
// map module
|
||||
mapModuleId: 'pf-map-module', // id for main map module
|
||||
mapTabBarId: 'pf-map-tabs' // id for map tab bar
|
||||
@@ -1499,6 +1502,15 @@ define([
|
||||
return Init.currentSystemData;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* get all "open" dialog elements
|
||||
* @returns {*|jQuery}
|
||||
*/
|
||||
var getOpenDialogs = function(){
|
||||
return $('.' + config.dialogClass).filter(':visible');
|
||||
};
|
||||
|
||||
/**
|
||||
* formats a price string into an ISK Price
|
||||
* @param price
|
||||
@@ -1623,6 +1635,7 @@ define([
|
||||
getCurrentUserInfo: getCurrentUserInfo,
|
||||
getCurrentCharacterLog: getCurrentCharacterLog,
|
||||
convertDateToString: convertDateToString,
|
||||
getOpenDialogs: getOpenDialogs,
|
||||
formatPrice: formatPrice,
|
||||
redirect: redirect,
|
||||
logout: logout
|
||||
|
||||
Reference in New Issue
Block a user