aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2014-11-11 17:12:17 +0100
committerJan-Christoph Borchardt <hey@jancborchardt.net>2014-11-11 17:12:17 +0100
commit3ecb3f16bf51bf2b691292212e72081c6353a3d4 (patch)
tree705354dbe9a92baa0a606489d41838becfbd88b7 /core
parent0de9368ab24cb35d159e00ae10b0ff1c256b2d76 (diff)
parent32de664c03572c0791af357fbecad38af0137aae (diff)
downloadnextcloud-server-3ecb3f16bf51bf2b691292212e72081c6353a3d4.tar.gz
nextcloud-server-3ecb3f16bf51bf2b691292212e72081c6353a3d4.zip
Merge pull request #11929 from owncloud/fix-db-center
fixes not centered database chooser on setup page
Diffstat (limited to 'core')
-rw-r--r--core/js/setup.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/js/setup.js b/core/js/setup.js
index 1eceb8ced70..e65b795646e 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);
+ }
});