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
Loading
@@ -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;
Loading
Loading
@@ -173,7 +173,7 @@
new BuildArtifacts();
break;
case 'projects:group_links:index':
new MemberExpirationDate();
new gl.MemberExpirationDate();
new GroupsSelect();
break;
case 'search:show':
Loading
Loading
Loading
Loading
@@ -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({
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