diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-05-23 17:03:04 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-10-29 12:56:00 +0100 |
commit | fd90af50d910e659aa8df0d380424383c6c09620 (patch) | |
tree | 76d8ddcc7cf44ba6852f31b0a2323d23d6b1c258 /core/src | |
parent | ea6f423e2c8e50cf1357a0e2182dc4c9a9bf981e (diff) | |
download | nextcloud-server-fd90af50d910e659aa8df0d380424383c6c09620.tar.gz nextcloud-server-fd90af50d910e659aa8df0d380424383c6c09620.zip |
Add OCA.Files.Sidebar
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/Polyfill/closest.js | 19 | ||||
-rw-r--r-- | core/src/Polyfill/index.js | 3 | ||||
-rw-r--r-- | core/src/main.js | 4 | ||||
-rw-r--r-- | core/src/views/Login.vue | 2 |
4 files changed, 24 insertions, 4 deletions
diff --git a/core/src/Polyfill/closest.js b/core/src/Polyfill/closest.js new file mode 100644 index 00000000000..1c608646127 --- /dev/null +++ b/core/src/Polyfill/closest.js @@ -0,0 +1,19 @@ +// https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill + +if (!Element.prototype.matches) { + Element.prototype.matches + = Element.prototype.msMatchesSelector + || Element.prototype.webkitMatchesSelector +} + +if (!Element.prototype.closest) { + Element.prototype.closest = function(s) { + var el = this + + do { + if (el.matches(s)) return el + el = el.parentElement || el.parentNode + } while (el !== null && el.nodeType === 1) + return null + } +} diff --git a/core/src/Polyfill/index.js b/core/src/Polyfill/index.js index 055ab6343a4..306c72a0777 100644 --- a/core/src/Polyfill/index.js +++ b/core/src/Polyfill/index.js @@ -1,4 +1,4 @@ -/* +/** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> @@ -20,4 +20,5 @@ */ import './console' +import './closest' import './windows-phone' diff --git a/core/src/main.js b/core/src/main.js index 29c657f5db3..3f0e82df95f 100644 --- a/core/src/main.js +++ b/core/src/main.js @@ -1,4 +1,4 @@ -/* +/** * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author 2018 Christoph Wurst <christoph@winzerhof-wurst.at> @@ -20,8 +20,8 @@ */ import $ from 'jquery' -import '@babel/polyfill' import './Polyfill/index' +import '@babel/polyfill' // If you remove the line below, tests won't pass // eslint-disable-next-line no-unused-vars diff --git a/core/src/views/Login.vue b/core/src/views/Login.vue index 08538ec2fe9..c7958aac15b 100644 --- a/core/src/views/Login.vue +++ b/core/src/views/Login.vue @@ -27,7 +27,7 @@ <LoginForm :username.sync="user" :redirect-url="redirectUrl" - :directLogin="directLogin" + :direct-login="directLogin" :messages="messages" :errors="errors" :throttle-delay="throttleDelay" |