diff options
author | José Iván <jivanvlop@gmail.com> | 2016-09-06 06:28:59 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-11-04 07:00:21 +0300 |
commit | b1b51b774bffd64b9117296d46052b8bbc44f430 (patch) | |
tree | b9329ef12e5c26d9172b5f9a022547d1bc7ee040 /app/assets/javascripts/gl_form.js | |
parent | 3a8a7c1251cef4098ffbc54718ba21736c5e2800 (diff) |
Cleaned up global namespace JS
Moved most of the functions that contained "window.doSomething" that were located at:
- app/assets/javascripts/application.js
To the following file:
- app/assets/javascripts/lib/utils/common_utils.js
The functions listed here:
- window.ajaxGet
- window.split
- window.extractLast
- window.rstrip
- window.disableButtonIfEmptyField
- window.disableButtonIfAnyEmptyField
- window.sanitize
- window.unbindEvents
- window.shiftWindow
Now will be accessible from the "gl.utils" namespace
Diffstat (limited to 'app/assets/javascripts/gl_form.js')
-rw-r--r-- | app/assets/javascripts/gl_form.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/gl_form.js b/app/assets/javascripts/gl_form.js index 742807d93ad..ce54c34492d 100644 --- a/app/assets/javascripts/gl_form.js +++ b/app/assets/javascripts/gl_form.js @@ -24,8 +24,8 @@ if (isNewForm) { this.form.find('.div-dropzone').remove(); this.form.addClass('gfm-form'); - disableButtonIfEmptyField(this.form.find('.js-note-text'), this.form.find('.js-comment-button')); // remove notify commit author checkbox for non-commit notes + gl.utils.disableButtonIfEmptyField(this.form.find('.js-note-text'), this.form.find('.js-comment-button')); GitLab.GfmAutoComplete.setup(this.form.find('.js-gfm-input')); new DropzoneInput(this.form); autosize(this.textarea); |