From 008559267023f16ff5061ae03fecf8cf80e6b662 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Wed, 5 Apr 2017 18:46:53 +0100 Subject: Move CommentTypeToggle use from gl_form to notes --- app/assets/javascripts/gl_form.js | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'app/assets/javascripts/gl_form.js') diff --git a/app/assets/javascripts/gl_form.js b/app/assets/javascripts/gl_form.js index 06072faa472..e7c98e16581 100644 --- a/app/assets/javascripts/gl_form.js +++ b/app/assets/javascripts/gl_form.js @@ -3,8 +3,6 @@ /* global DropzoneInput */ /* global autosize */ -import CommentTypeToggle from './comment_type_toggle'; - window.gl = window.gl || {}; function GLForm(form) { @@ -43,20 +41,6 @@ GLForm.prototype.setupForm = function() { this.form.find('.js-note-discard').hide(); this.form.show(); if (this.isAutosizeable) this.setupAutosize(); - - this.initCommentTypeToggle(); -}; - -GLForm.prototype.initCommentTypeToggle = function () { - this.commentTypeToggle = new CommentTypeToggle( - this.form[0].querySelector('.js-comment-type-dropdown .dropdown-toggle'), - this.form[0].querySelector('.js-comment-type-dropdown .dropdown-menu'), - document.getElementById('note_type'), - this.form[0].querySelector('.js-comment-type-dropdown .js-comment-submit-button'), - document.querySelector('.js-note-target-close'), - ); - - this.commentTypeToggle.initDroplab(); }; GLForm.prototype.setupAutosize = function () { -- cgit v1.2.1