diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2018-01-16 15:13:14 -0600 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2018-02-05 13:09:29 -0600 |
commit | 3be32027b6c543287b94b5be34bf53039d86f88c (patch) | |
tree | 6b883f46148f4f6a2f8c127cdefbb205acb2609b /app/assets/javascripts/commons | |
parent | 79570ce24fa93709db7a7bdd4fae2532a7235486 (diff) | |
download | gitlab-ce-3be32027b6c543287b94b5be34bf53039d86f88c.tar.gz |
Use dynamic variable list in scheduled pipelines and group/project CI secret variables
See https://gitlab.com/gitlab-org/gitlab-ce/issues/39118
Conflicts:
app/views/ci/variables/_form.html.haml
app/views/ci/variables/_table.html.haml
ee/app/views/ci/variables/_environment_scope.html.haml
spec/javascripts/ci_variable_list/ci_variable_list_ee_spec.js
spec/javascripts/fixtures/projects.rb
Diffstat (limited to 'app/assets/javascripts/commons')
-rw-r--r-- | app/assets/javascripts/commons/polyfills/element.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/assets/javascripts/commons/polyfills/element.js b/app/assets/javascripts/commons/polyfills/element.js index 9a1f73bf2ac..b593bde6aa2 100644 --- a/app/assets/javascripts/commons/polyfills/element.js +++ b/app/assets/javascripts/commons/polyfills/element.js @@ -18,3 +18,22 @@ Element.prototype.matches = Element.prototype.matches || while (i >= 0 && elms.item(i) !== this) { i -= 1; } return i > -1; }; + +// From the polyfill on MDN, https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove#Polyfill +((arr) => { + arr.forEach((item) => { + if (Object.prototype.hasOwnProperty.call(item, 'remove')) { + return; + } + Object.defineProperty(item, 'remove', { + configurable: true, + enumerable: true, + writable: true, + value: function remove() { + if (this.parentNode !== null) { + this.parentNode.removeChild(this); + } + }, + }); + }); +})([Element.prototype, CharacterData.prototype, DocumentType.prototype]); |