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
$
from
'
jquery
'
;
import
'
cropper
'
;
import
'
cropper
'
;
...
@@ -59,7 +59,7 @@ import _ from 'underscore';
...
@@ -59,7 +59,7 @@ import _ from 'underscore';
}
}
bindEvents
()
{
bindEvents
()
{
le
t
_this
=
this
;
cons
t
_this
=
this
;
this
.
fileInput
.
on
(
'
change
'
,
function
(
e
)
{
this
.
fileInput
.
on
(
'
change
'
,
function
(
e
)
{
_this
.
onFileInputChange
(
e
,
this
);
_this
.
onFileInputChange
(
e
,
this
);
this
.
value
=
null
;
this
.
value
=
null
;
...
@@ -69,7 +69,7 @@ import _ from 'underscore';
...
@@ -69,7 +69,7 @@ import _ from 'underscore';
this
.
modalCrop
.
on
(
'
hidden.bs.modal
'
,
this
.
onModalHide
);
this
.
modalCrop
.
on
(
'
hidden.bs.modal
'
,
this
.
onModalHide
);
this
.
uploadImageBtn
.
on
(
'
click
'
,
this
.
onUploadImageBtnClick
);
this
.
uploadImageBtn
.
on
(
'
click
'
,
this
.
onUploadImageBtnClick
);
this
.
cropActionsBtn
.
on
(
'
click
'
,
function
()
{
this
.
cropActionsBtn
.
on
(
'
click
'
,
function
()
{
le
t
btn
=
this
;
cons
t
btn
=
this
;
return
_this
.
onActionBtnClick
(
btn
);
return
_this
.
onActionBtnClick
(
btn
);
});
});
return
(
this
.
croppedImageBlob
=
null
);
return
(
this
.
croppedImageBlob
=
null
);
...
@@ -80,7 +80,7 @@ import _ from 'underscore';
...
@@ -80,7 +80,7 @@ import _ from 'underscore';
}
}
onModalShow
()
{
onModalShow
()
{
le
t
_this
=
this
;
cons
t
_this
=
this
;
return
this
.
modalCropImg
.
cropper
({
return
this
.
modalCropImg
.
cropper
({
viewMode
:
1
,
viewMode
:
1
,
center
:
false
,
center
:
false
,
...
@@ -136,7 +136,7 @@ import _ from 'underscore';
...
@@ -136,7 +136,7 @@ import _ from 'underscore';
}
}
readFile
(
input
)
{
readFile
(
input
)
{
le
t
_this
=
this
;
cons
t
_this
=
this
;
const
reader
=
new
FileReader
();
const
reader
=
new
FileReader
();
reader
.
onload
=
()
=>
{
reader
.
onload
=
()
=>
{
_this
.
modalCropImg
.
attr
(
'
src
'
,
reader
.
result
);
_this
.
modalCropImg
.
attr
(
'
src
'
,
reader
.
result
);
...
@@ -148,8 +148,8 @@ import _ from 'underscore';
...
@@ -148,8 +148,8 @@ import _ from 'underscore';
dataURLtoBlob
(
dataURL
)
{
dataURLtoBlob
(
dataURL
)
{
let
i
=
0
;
let
i
=
0
;
let
len
=
0
;
let
len
=
0
;
le
t
binary
=
atob
(
dataURL
.
split
(
'
,
'
)[
1
]);
cons
t
binary
=
atob
(
dataURL
.
split
(
'
,
'
)[
1
]);
le
t
array
=
[];
cons
t
array
=
[];
for
(
i
=
0
,
len
=
binary
.
length
;
i
<
len
;
i
+=
1
)
{
for
(
i
=
0
,
len
=
binary
.
length
;
i
<
len
;
i
+=
1
)
{
array
.
push
(
binary
.
charCodeAt
(
i
));
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