diff --git a/js/app/map/map.js b/js/app/map/map.js index c7886ada..d1f8b621 100644 --- a/js/app/map/map.js +++ b/js/app/map/map.js @@ -1639,8 +1639,10 @@ define([ id: id ? id : 0, source: parseInt( source.data('id') ), sourceName: source.data('name'), + sourceAlias: source.getSystemInfo(['alias']), target: parseInt( target.data('id') ), targetName: target.data('name'), + targetAlias: target.getSystemInfo(['alias']), scope: connection.scope, type: connectionTypes, updated: updated ? updated : 0 diff --git a/js/app/ui/form_element.js b/js/app/ui/form_element.js index ce858c08..0d8b5908 100644 --- a/js/app/ui/form_element.js +++ b/js/app/ui/form_element.js @@ -145,10 +145,18 @@ define([ } }).on('change', function(e){ // 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 + if($(this).val() !== null){ + $(this).val('').trigger('change'); + } }) - ).done(function(){ - // open select - selectElement.select2('open'); + ).done(function(a,b){ + // open select if not already pre-selected + if($(this).val() === null){ + selectElement.select2('open'); + } }); }; diff --git a/js/app/ui/system_signature.js b/js/app/ui/system_signature.js index 04efa984..66ae8d80 100644 --- a/js/app/ui/system_signature.js +++ b/js/app/ui/system_signature.js @@ -1478,13 +1478,13 @@ define([ // take target... connectionOptions.push({ value: connectionData.id, - text: connectionData.targetName + text: connectionData.targetAlias }); }else if(systemData.id !== connectionData.source){ // take source... connectionOptions.push({ value: connectionData.id, - text: connectionData.sourceName + text: connectionData.sourceAlias }); } } diff --git a/public/js/v1.2.2/app/map/map.js b/public/js/v1.2.2/app/map/map.js index c7886ada..d1f8b621 100644 --- a/public/js/v1.2.2/app/map/map.js +++ b/public/js/v1.2.2/app/map/map.js @@ -1639,8 +1639,10 @@ define([ id: id ? id : 0, source: parseInt( source.data('id') ), sourceName: source.data('name'), + sourceAlias: source.getSystemInfo(['alias']), target: parseInt( target.data('id') ), targetName: target.data('name'), + targetAlias: target.getSystemInfo(['alias']), scope: connection.scope, type: connectionTypes, updated: updated ? updated : 0 diff --git a/public/js/v1.2.2/app/ui/form_element.js b/public/js/v1.2.2/app/ui/form_element.js index ce858c08..0d8b5908 100644 --- a/public/js/v1.2.2/app/ui/form_element.js +++ b/public/js/v1.2.2/app/ui/form_element.js @@ -145,10 +145,18 @@ define([ } }).on('change', function(e){ // 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 + if($(this).val() !== null){ + $(this).val('').trigger('change'); + } }) - ).done(function(){ - // open select - selectElement.select2('open'); + ).done(function(a,b){ + // open select if not already pre-selected + if($(this).val() === null){ + selectElement.select2('open'); + } }); }; diff --git a/public/js/v1.2.2/app/ui/system_signature.js b/public/js/v1.2.2/app/ui/system_signature.js index 04efa984..66ae8d80 100644 --- a/public/js/v1.2.2/app/ui/system_signature.js +++ b/public/js/v1.2.2/app/ui/system_signature.js @@ -1478,13 +1478,13 @@ define([ // take target... connectionOptions.push({ value: connectionData.id, - text: connectionData.targetName + text: connectionData.targetAlias }); }else if(systemData.id !== connectionData.source){ // take source... connectionOptions.push({ value: connectionData.id, - text: connectionData.sourceName + text: connectionData.sourceAlias }); } }