Commit 1f3a0d52 authored by Douwe Maan's avatar Douwe Maan

Use `gl` namespace and explicitly check that string is empty

parent 64d45a87
......@@ -126,12 +126,12 @@
new NotificationsDropdown();
break;
case 'groups:group_members:index':
new MemberExpirationDate();
new gl.MemberExpirationDate();
new GroupMembers();
new UsersSelect();
break;
case 'projects:project_members:index':
new MemberExpirationDate();
new gl.MemberExpirationDate();
new ProjectMembers();
new UsersSelect();
break;
......@@ -173,7 +173,7 @@
new BuildArtifacts();
break;
case 'projects:group_links:index':
new MemberExpirationDate();
new gl.MemberExpirationDate();
new GroupsSelect();
break;
case 'search:show':
......
......@@ -4,14 +4,14 @@
// `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.
//
this.MemberExpirationDate = function() {
gl.MemberExpirationDate = function() {
$('.js-access-expiration-date').each(function(i, element) {
var expirationDateInput = $(element);
if (expirationDateInput.hasClass('hasDatepicker')) { return; }
function toggleClearInput() {
expirationDateInput.parent().toggleClass('has-value', !!expirationDateInput.val());
expirationDateInput.closest('.clearable-input').toggleClass('has-value', expirationDateInput.val() !== '');
}
expirationDateInput.datepicker({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment