Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
e89d68598551
Commit
e89d6859
authored
Oct 19, 2017
by
Filipa Lacerda
Browse files
Remove dropzoneInput from global namespace
parent
a26814434202
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/blob/blob_file_dropzone.js
View file @
e89d6859
/* eslint-disable func-names, object-shorthand, prefer-arrow-callback */
/* global Dropzone */
import
Dropzone
from
'
dropzone
'
;
import
'
../lib/utils/url_utility
'
;
import
{
HIDDEN_CLASS
}
from
'
../lib/utils/constants
'
;
import
csrf
from
'
../lib/utils/csrf
'
;
...
...
app/assets/javascripts/dropzone_input.js
View file @
e89d6859
This diff is collapsed.
Click to expand it.
app/assets/javascripts/gl_form.js
View file @
e89d6859
/* global DropzoneInput */
/* global autosize */
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
...
...
@@ -2,6 +1,7 @@
/* global autosize */
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
dropzoneInput
from
'
./dropzone_input
'
;
export
default
class
GLForm
{
constructor
(
form
,
enableGFM
=
false
)
{
...
...
@@ -41,7 +41,7 @@
mergeRequests
:
this
.
enableGFM
,
labels
:
this
.
enableGFM
,
});
new
D
ropzoneInput
(
this
.
form
);
// eslint-disable-line no-new
d
ropzoneInput
(
this
.
form
);
autosize
(
this
.
textarea
);
}
// form and textarea event listeners
...
...
app/assets/javascripts/notes.js
View file @
e89d6859
...
...
@@ -13,7 +13,6 @@
import
_
from
'
underscore
'
;
import
Cookies
from
'
js-cookie
'
;
import
autosize
from
'
vendor/autosize
'
;
import
Dropzone
from
'
dropzone
'
;
import
'
vendor/jquery.caret
'
;
// required by jquery.atwho
import
'
vendor/jquery.atwho
'
;
import
AjaxCache
from
'
~/lib/utils/ajax_cache
'
;
...
...
@@ -22,9 +21,8 @@
import
GLForm
from
'
./gl_form
'
;
import
loadAwardsHandler
from
'
./awards_handler
'
;
import
'
./autosave
'
;
import
'
./dropzone_input
'
;
import
TaskList
from
'
./task_list
'
;
import
{
ajaxPost
,
isInViewport
,
getPagePath
,
scrollToElement
,
isMetaKey
}
from
'
./lib/utils/common_utils
'
;
import
imageDiffHelper
from
'
./image_diff/helpers/index
'
;
window
.
autosize
=
autosize
;
...
...
@@ -26,9 +24,8 @@
import
TaskList
from
'
./task_list
'
;
import
{
ajaxPost
,
isInViewport
,
getPagePath
,
scrollToElement
,
isMetaKey
}
from
'
./lib/utils/common_utils
'
;
import
imageDiffHelper
from
'
./image_diff/helpers/index
'
;
window
.
autosize
=
autosize
;
window
.
Dropzone
=
Dropzone
;
function
normalizeNewlines
(
str
)
{
return
str
.
replace
(
/
\r\n
/g
,
'
\n
'
);
...
...
app/assets/javascripts/zen_mode.js
View file @
e89d6859
...
...
@@ -11,8 +11,6 @@
import
'
mousetrap
'
;
import
'
mousetrap/plugins/pause/mousetrap-pause
'
;
window
.
Dropzone
=
Dropzone
;
//
// ### Events
//
...
...
spec/javascripts/blob/blob_file_dropzone_spec.js
View file @
e89d6859
import
'
dropzone
'
;
import
BlobFileDropzone
from
'
~/blob/blob_file_dropzone
'
;
describe
(
'
BlobFileDropzone
'
,
()
=>
{
...
...
spec/javascripts/zen_mode_spec.js
View file @
e89d6859
/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, object-shorthand, comma-dangle, no-return-assign, new-cap, max-len */
/* global Dropzone */
/* global Mousetrap */
...
...
@@ -3,5 +2,5 @@
/* global Mousetrap */
import
Dropzone
from
'
dropzone
'
;
import
ZenMode
from
'
~/zen_mode
'
;
(
function
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment