Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
98b3e98c
Commit
98b3e98c
authored
Nov 16, 2019
by
Utkarsh Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use const instead of let
parent
4b0b1dc4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
app/assets/javascripts/profile/gl_crop.js
app/assets/javascripts/profile/gl_crop.js
+7
-7
No files found.
app/assets/javascripts/profile/gl_crop.js
View file @
98b3e98c
/* eslint-disable no-useless-escape, no-underscore-dangle, func-names, no-return-assign,
one-var,
consistent-return, class-methods-use-this */
/* eslint-disable no-useless-escape, no-underscore-dangle, func-names, no-return-assign, consistent-return, class-methods-use-this */
import
$
from
'
jquery
'
;
import
'
cropper
'
;
...
...
@@ -59,7 +59,7 @@ import _ from 'underscore';
}
bindEvents
()
{
le
t
_this
=
this
;
cons
t
_this
=
this
;
this
.
fileInput
.
on
(
'
change
'
,
function
(
e
)
{
_this
.
onFileInputChange
(
e
,
this
);
this
.
value
=
null
;
...
...
@@ -69,7 +69,7 @@ import _ from 'underscore';
this
.
modalCrop
.
on
(
'
hidden.bs.modal
'
,
this
.
onModalHide
);
this
.
uploadImageBtn
.
on
(
'
click
'
,
this
.
onUploadImageBtnClick
);
this
.
cropActionsBtn
.
on
(
'
click
'
,
function
()
{
le
t
btn
=
this
;
cons
t
btn
=
this
;
return
_this
.
onActionBtnClick
(
btn
);
});
return
(
this
.
croppedImageBlob
=
null
);
...
...
@@ -80,7 +80,7 @@ import _ from 'underscore';
}
onModalShow
()
{
le
t
_this
=
this
;
cons
t
_this
=
this
;
return
this
.
modalCropImg
.
cropper
({
viewMode
:
1
,
center
:
false
,
...
...
@@ -136,7 +136,7 @@ import _ from 'underscore';
}
readFile
(
input
)
{
le
t
_this
=
this
;
cons
t
_this
=
this
;
const
reader
=
new
FileReader
();
reader
.
onload
=
()
=>
{
_this
.
modalCropImg
.
attr
(
'
src
'
,
reader
.
result
);
...
...
@@ -148,8 +148,8 @@ import _ from 'underscore';
dataURLtoBlob
(
dataURL
)
{
let
i
=
0
;
let
len
=
0
;
le
t
binary
=
atob
(
dataURL
.
split
(
'
,
'
)[
1
]);
le
t
array
=
[];
cons
t
binary
=
atob
(
dataURL
.
split
(
'
,
'
)[
1
]);
cons
t
array
=
[];
for
(
i
=
0
,
len
=
binary
.
length
;
i
<
len
;
i
+=
1
)
{
array
.
push
(
binary
.
charCodeAt
(
i
));
...
...
Write
Preview
Markdown
is supported
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