aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2016-11-25 16:42:53 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2016-11-25 16:44:51 +0100
commit9528045178b53fbf3b97d344dda1fd448b4989cf (patch)
tree9d7907c9ade19f793d1608e66b2a31d33648dc18
parent47646794b9426f40c12719d78c5a92a71570b4b2 (diff)
downloadnextcloud-server-9528045178b53fbf3b97d344dda1fd448b4989cf.tar.gz
nextcloud-server-9528045178b53fbf3b97d344dda1fd448b4989cf.zip
Add jquery ui fixes js file
+ fix autocomplete width (fix #2324) Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r--core/css/styles.css1
-rw-r--r--core/js/jquery-ui-fixes.js8
-rw-r--r--lib/private/legacy/template.php1
3 files changed, 10 insertions, 0 deletions
diff --git a/core/css/styles.css b/core/css/styles.css
index 21583d6198c..3ba617cb7a0 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -628,6 +628,7 @@ label.infield {
.avatardiv,
.avatardiv img {
border-radius: 50%;
+ flex-shrink: 0;
}
td.avatar {
border-radius: 0;
diff --git a/core/js/jquery-ui-fixes.js b/core/js/jquery-ui-fixes.js
new file mode 100644
index 00000000000..9ccaa38cc47
--- /dev/null
+++ b/core/js/jquery-ui-fixes.js
@@ -0,0 +1,8 @@
+// Various jquery fixes
+
+// Set autocomplete width the same as the related input
+// See http://stackoverflow.com/a/11845718
+jQuery.ui.autocomplete.prototype._resizeMenu = function () {
+ var ul = this.menu.element;
+ ul.outerWidth(this.element.outerWidth());
+}
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index 7c0b58db0c0..a07bf214f34 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -147,6 +147,7 @@ class OC_Template extends \OC\Template\Base {
OC_Util::addScript("js", null, true);
OC_Util::addScript("oc-dialogs", null, true);
OC_Util::addScript("jquery.ocdialog", null, true);
+ OC_Util::addScript("jquery-ui-fixes");
OC_Util::addStyle("jquery.ocdialog");
OC_Util::addScript('files/fileinfo');
OC_Util::addScript('files/client');