- Use "system alias" instead of "system name" as select options for signatures

- improved usability in "system" select dialog (e.g. "add new system" dialog)
This commit is contained in:
Exodus4D
2017-04-12 15:44:24 +02:00
parent 75da842849
commit f8b3da4e9b
6 changed files with 30 additions and 10 deletions

View File

@@ -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

View File

@@ -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');
}
});
};

View File

@@ -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
});
}
}

View File

@@ -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

View File

@@ -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');
}
});
};

View File

@@ -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
});
}
}