diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-11-03 22:01:32 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-11-03 22:01:32 +0100 |
commit | 32de664c03572c0791af357fbecad38af0137aae (patch) | |
tree | 41f08fa1a871476fc91d4aa6cc934ca0273a8784 /core/js/setup.js | |
parent | d2276215a475062c781f57d80f912f421f4b69fe (diff) | |
download | nextcloud-server-32de664c03572c0791af357fbecad38af0137aae.tar.gz nextcloud-server-32de664c03572c0791af357fbecad38af0137aae.zip |
fixes not centered database chooser on setup page
* fixes #11927
Diffstat (limited to 'core/js/setup.js')
-rw-r--r-- | core/js/setup.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/js/setup.js b/core/js/setup.js index 253a12d9e6f..80901a94fd0 100644 --- a/core/js/setup.js +++ b/core/js/setup.js @@ -103,4 +103,18 @@ $(document).ready(function() { t('core', 'Strong password') ] }); + + // centers the database chooser if it is too wide + if($('#databaseBackend').width() > 300) { + // this somehow needs to wait 250 milliseconds + // otherwise it gets overwritten + setTimeout(function(){ + // calculate negative left margin + // half of the difference of width and default bix width of 300 + // add 10 to clear left side padding of button group + var leftMargin = (($('#databaseBackend').width() - 300) / 2 + 10 ) * -1; + + $('#databaseBackend').css('margin-left', Math.floor(leftMargin) + 'px'); + }, 250); + } }); |