summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-05-09 17:38:05 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-05-09 17:38:05 +0000
commitff5bd7a9e8bc4f6363794c1dbd2a71ba4ac99ac7 (patch)
tree592f18c8113aa0622c8a761f98d86590b9e70fc8 /app/assets/javascripts/notes.js
parent914a0bbd0ed27909324339470cdbde9756b1e893 (diff)
parentf6d214e17e134e0cb868eb9cff021d8cfc1e88bf (diff)
downloadgitlab-ce-ff5bd7a9e8bc4f6363794c1dbd2a71ba4ac99ac7.tar.gz
Merge branch 'remove-needless-bind-polyfills' into 'master'
Remove needless bind and indexOf polyfills See merge request !11187
Diffstat (limited to 'app/assets/javascripts/notes.js')
-rw-r--r--app/assets/javascripts/notes.js38
1 files changed, 18 insertions, 20 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 194c29f4710..f6fe6d9f0fd 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -22,8 +22,6 @@ const normalizeNewlines = function(str) {
};
(function() {
- var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; };
-
this.Notes = (function() {
const MAX_VISIBLE_COMMIT_LIST_COUNT = 3;
const REGEX_SLASH_COMMANDS = /\/\w+/g;
@@ -31,24 +29,24 @@ const normalizeNewlines = function(str) {
Notes.interval = null;
function Notes(notes_url, note_ids, last_fetched_at, view) {
- this.updateTargetButtons = bind(this.updateTargetButtons, this);
- this.updateComment = bind(this.updateComment, this);
- this.visibilityChange = bind(this.visibilityChange, this);
- this.cancelDiscussionForm = bind(this.cancelDiscussionForm, this);
- this.addDiffNote = bind(this.addDiffNote, this);
- this.setupDiscussionNoteForm = bind(this.setupDiscussionNoteForm, this);
- this.replyToDiscussionNote = bind(this.replyToDiscussionNote, this);
- this.removeNote = bind(this.removeNote, this);
- this.cancelEdit = bind(this.cancelEdit, this);
- this.updateNote = bind(this.updateNote, this);
- this.addDiscussionNote = bind(this.addDiscussionNote, this);
- this.addNoteError = bind(this.addNoteError, this);
- this.addNote = bind(this.addNote, this);
- this.resetMainTargetForm = bind(this.resetMainTargetForm, this);
- this.refresh = bind(this.refresh, this);
- this.keydownNoteText = bind(this.keydownNoteText, this);
- this.toggleCommitList = bind(this.toggleCommitList, this);
- this.postComment = bind(this.postComment, this);
+ this.updateTargetButtons = this.updateTargetButtons.bind(this);
+ this.updateComment = this.updateComment.bind(this);
+ this.visibilityChange = this.visibilityChange.bind(this);
+ this.cancelDiscussionForm = this.cancelDiscussionForm.bind(this);
+ this.addDiffNote = this.addDiffNote.bind(this);
+ this.setupDiscussionNoteForm = this.setupDiscussionNoteForm.bind(this);
+ this.replyToDiscussionNote = this.replyToDiscussionNote.bind(this);
+ this.removeNote = this.removeNote.bind(this);
+ this.cancelEdit = this.cancelEdit.bind(this);
+ this.updateNote = this.updateNote.bind(this);
+ this.addDiscussionNote = this.addDiscussionNote.bind(this);
+ this.addNoteError = this.addNoteError.bind(this);
+ this.addNote = this.addNote.bind(this);
+ this.resetMainTargetForm = this.resetMainTargetForm.bind(this);
+ this.refresh = this.refresh.bind(this);
+ this.keydownNoteText = this.keydownNoteText.bind(this);
+ this.toggleCommitList = this.toggleCommitList.bind(this);
+ this.postComment = this.postComment.bind(this);
this.notes_url = notes_url;
this.note_ids = note_ids;