-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jonathan Hunt
committed
Apr 20, 2023
1 parent
af9751c
commit 237652d
Showing
12 changed files
with
523 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
docroot/sites/all/modules/contrib/entityreference/js/entityreference.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(function ($) { | ||
'use strict'; | ||
Drupal.behaviors.ACChangeEnterBehavior = { | ||
attach: function (context, settings) { | ||
$('input.form-autocomplete', context).once('ac-change-enter-behavior', function() { | ||
$(this).keypress(function(e) { | ||
var ac = $('#autocomplete'); | ||
if (e.keyCode == 13 && typeof ac[0] != 'undefined') { | ||
e.preventDefault(); | ||
ac.each(function () { | ||
if(this.owner.selected == false){ | ||
this.owner.selectDown(); | ||
} | ||
this.owner.hidePopup(); | ||
}); | ||
$(this).trigger('change'); | ||
} | ||
}); | ||
}); | ||
} | ||
}; | ||
}(jQuery)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.