diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2016-12-27 20:24:28 +0300 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-01-03 19:52:14 +0300 |
commit | 99c263ad10c5265f59586dbd33f3af6b3a2347f5 (patch) | |
tree | 89fb0eba98716d669c752d1a6877af35a1a7c448 /app/assets/javascripts/member_expiration_date.js | |
parent | cfd8f635b391c9389aa122db4e0c9031adef6b5a (diff) |
Updated some tests descriptions to represent the correct settings path
Updated the js from the member_expiration_date to es6
Diffstat (limited to 'app/assets/javascripts/member_expiration_date.js')
-rw-r--r-- | app/assets/javascripts/member_expiration_date.js | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/app/assets/javascripts/member_expiration_date.js b/app/assets/javascripts/member_expiration_date.js deleted file mode 100644 index fded0881343..00000000000 --- a/app/assets/javascripts/member_expiration_date.js +++ /dev/null @@ -1,41 +0,0 @@ -/* eslint-disable func-names, space-before-function-paren, vars-on-top, no-var, object-shorthand, comma-dangle, max-len */ -(function() { - // Add datepickers to all `js-access-expiration-date` elements. If those elements are - // children of an element with the `clearable-input` class, and have a sibling - // `js-clear-input` element, then show that element when there is a value in the - // datepicker, and make clicking on that element clear the field. - // - gl.MemberExpirationDate = function(newSelector) { - function toggleClearInput() { - $(this).closest('.clearable-input').toggleClass('has-value', $(this).val() !== ''); - } - - var selector = '.js-access-expiration-date'; - if (typeof newSelector !== 'undefined' && newSelector !== '') { - selector = newSelector; - } - var inputs = $(selector); - - inputs.datepicker({ - dateFormat: 'yy-mm-dd', - minDate: 1, - onSelect: function () { - $(this).trigger('change'); - toggleClearInput.call(this); - } - }); - - inputs.next('.js-clear-input').on('click', function(event) { - event.preventDefault(); - - var input = $(this).closest('.clearable-input').find(selector); - input.datepicker('setDate', null) - .trigger('change'); - toggleClearInput.call(input); - }); - - inputs.on('blur', toggleClearInput); - - inputs.each(toggleClearInput); - }; -}).call(this); |