Skip to content

Commit

Permalink
Move jquery.textcomplete to git submodule in vendor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Happy0 committed Sep 27, 2016
1 parent 03c75d3 commit bcea586
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1,486 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@
path = public/vendor/Sunsetter8
url = https://github.com/niklasf/Sunsetter8
branch = js
[submodule "public/vendor/jquery-textcomplete"]
path = public/vendor/jquery-textcomplete
url = https://github.com/yuku-t/jquery-textcomplete
5 changes: 2 additions & 3 deletions public/javascripts/forum-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $(function () {
form.find('textarea').height(message.height());
});

lichess.loadScript('/assets/javascripts/vendor/jquery.textcomplete.js').then(function() {
lichess.loadScript('/assets/vendor/jquery-textcomplete/dist/jquery.textcomplete.js').then(function() {

var getTopicId = function () {
return $('.post-text-area').attr('data-topic');
Expand All @@ -28,8 +28,7 @@ $(function () {
};

var searchCandidates = function(term, candidateUsers) {
return $.map(candidateUsers,
function (user) {
return candidateUsers.map(function (user) {
return user.indexOf(term) === 0 ? user : null;
});
};
Expand Down
Loading

0 comments on commit bcea586

Please sign in to comment.