Simplify login with single database

If there's only one database it will be displayed in a read only textbox, and if
more databases are available it will display a dropdown with all the databases
that are selectable.

issue5660
review28331002
This commit is contained in:
Xavier Codinas
2016-06-28 10:59:27 +02:00
parent 742a5ed995
commit df5af34323
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -1,3 +1,4 @@
* Simplify login with single database
* Show records names in relate window title
* Add support for count on Action Window Domains
* Manage custom login process
+4 -1
View File
@@ -166,7 +166,9 @@
jQuery.when(Sao.DB.list()).then(function(databases) {
var el;
if (jQuery.isEmptyObject(databases)) {
databases = databases || [];
if (databases.length <= 1 ) {
database = databases[0];
el = dialog.database_input;
} else {
el = dialog.database_select;
@@ -177,6 +179,7 @@
}));
});
}
el.prop('readonly', databases.length == 1);
el.show();
el.val(database || '');
empty_field().first().focus();