Skip to content
Snippets Groups Projects
Commit 1f3a0d52 authored by Douwe Maan's avatar Douwe Maan
Browse files

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

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