]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add jquery ui fixes js file 2340/head
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Fri, 25 Nov 2016 15:42:53 +0000 (16:42 +0100)
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Fri, 25 Nov 2016 15:44:51 +0000 (16:44 +0100)
+ fix autocomplete width (fix #2324)

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
core/css/styles.css
core/js/jquery-ui-fixes.js [new file with mode: 0644]
lib/private/legacy/template.php

index 21583d6198cb2c219fae154fcad598f0c6a4af99..3ba617cb7a070439f1dda661348043e6fee09265 100644 (file)
@@ -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 (file)
index 0000000..9ccaa38
--- /dev/null
@@ -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());
+}
index 7c0b58db0c002d076afbad9b97404456a2cb9aea..a07bf214f343846dc305768975baa86b7b893f68 100644 (file)
@@ -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');