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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
028c6113
Commit
028c6113
authored
Aug 01, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix eslint offenses
parent
3b431cc0
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
16 deletions
+17
-16
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+1
-1
app/assets/javascripts/repo/index.js
app/assets/javascripts/repo/index.js
+4
-6
app/assets/javascripts/repo/repo_binary_viewer.vue
app/assets/javascripts/repo/repo_binary_viewer.vue
+1
-1
app/assets/javascripts/repo/repo_commit_section.vue
app/assets/javascripts/repo/repo_commit_section.vue
+0
-1
app/assets/javascripts/repo/repo_editor.vue
app/assets/javascripts/repo/repo_editor.vue
+5
-2
app/assets/javascripts/repo/repo_store.js
app/assets/javascripts/repo/repo_store.js
+3
-4
spec/javascripts/repo/repo_commit_section_spec.js
spec/javascripts/repo/repo_commit_section_spec.js
+3
-1
No files found.
app/assets/javascripts/gl_dropdown.js
View file @
028c6113
/* eslint-disable func-names, space-before-function-paren, no-var, one-var, one-var-declaration-per-line, prefer-rest-params, max-len, vars-on-top, wrap-iife, no-unused-vars, quotes, no-shadow, no-cond-assign, prefer-arrow-callback, no-return-assign, no-else-return, camelcase, comma-dangle, no-lonely-if, guard-for-in, no-restricted-syntax, consistent-return, prefer-template, no-param-reassign, no-loop-func, no-mixed-operators */
/* eslint-disable func-names,
no-underscore-dangle,
space-before-function-paren, no-var, one-var, one-var-declaration-per-line, prefer-rest-params, max-len, vars-on-top, wrap-iife, no-unused-vars, quotes, no-shadow, no-cond-assign, prefer-arrow-callback, no-return-assign, no-else-return, camelcase, comma-dangle, no-lonely-if, guard-for-in, no-restricted-syntax, consistent-return, prefer-template, no-param-reassign, no-loop-func, no-mixed-operators */
/* global fuzzaldrinPlus */
/* global fuzzaldrinPlus */
import
{
isObject
}
from
'
./lib/utils/type_utility
'
;
import
{
isObject
}
from
'
./lib/utils/type_utility
'
;
...
...
app/assets/javascripts/repo/index.js
View file @
028c6113
...
@@ -37,14 +37,12 @@ function addEventsForNonVueEls() {
...
@@ -37,14 +37,12 @@ function addEventsForNonVueEls() {
Store
.
targetBranch
=
$
(
'
.project-refs-target-form input[name="ref"]
'
).
val
();
Store
.
targetBranch
=
$
(
'
.project-refs-target-form input[name="ref"]
'
).
val
();
});
});
window
.
onbeforeunload
=
function
(
e
)
{
window
.
onbeforeunload
=
function
confirmUnload
(
e
)
{
const
hasChanged
=
Store
.
openedFiles
const
hasChanged
=
Store
.
openedFiles
.
some
(
file
=>
file
.
changed
);
.
some
(
file
=>
file
.
changed
);
if
(
!
hasChanged
)
return
;
if
(
!
hasChanged
)
return
undefined
;
e
=
e
||
window
.
event
;
const
event
=
e
||
window
.
event
;
if
(
e
)
{
if
(
event
)
event
.
returnValue
=
'
Are you sure you want to lose unsaved changes?
'
;
e
.
returnValue
=
'
Are you sure you want to lose unsaved changes?
'
;
}
// For Safari
// For Safari
return
'
Are you sure you want to lose unsaved changes?
'
;
return
'
Are you sure you want to lose unsaved changes?
'
;
};
};
...
...
app/assets/javascripts/repo/repo_binary_viewer.vue
View file @
028c6113
...
@@ -31,7 +31,7 @@ const RepoBinaryViewer = {
...
@@ -31,7 +31,7 @@ const RepoBinaryViewer = {
},
},
getBinaryType
()
{
getBinaryType
()
{
if
(
this
.
binaryTypes
.
hasOwnProperty
(
this
.
activeFile
.
extension
))
{
if
(
Object
.
hasOwnProperty
.
call
(
this
.
binaryTypes
,
this
.
activeFile
.
extension
))
{
return
this
.
activeFile
.
extension
;
return
this
.
activeFile
.
extension
;
}
}
return
'
unknown
'
;
return
'
unknown
'
;
...
...
app/assets/javascripts/repo/repo_commit_section.vue
View file @
028c6113
...
@@ -27,7 +27,6 @@ const RepoCommitSection = {
...
@@ -27,7 +27,6 @@ const RepoCommitSection = {
const
branch
=
Helper
.
getBranch
();
const
branch
=
Helper
.
getBranch
();
const
commitMessage
=
this
.
commitMessage
;
const
commitMessage
=
this
.
commitMessage
;
const
actions
=
this
.
changedFiles
.
map
((
f
)
=>
{
const
actions
=
this
.
changedFiles
.
map
((
f
)
=>
{
const
filePath
=
Helper
.
getFilePathFromFullPath
(
f
.
url
,
branch
);
return
{
return
{
action
:
'
update
'
,
action
:
'
update
'
,
file_path
:
Helper
.
getFilePathFromFullPath
(
f
.
url
,
branch
),
file_path
:
Helper
.
getFilePathFromFullPath
(
f
.
url
,
branch
),
...
...
app/assets/javascripts/repo/repo_editor.vue
View file @
028c6113
...
@@ -89,13 +89,16 @@ const RepoEditor = {
...
@@ -89,13 +89,16 @@ const RepoEditor = {
dialog
:
{
dialog
:
{
handler
(
obj
)
{
handler
(
obj
)
{
if
(
obj
.
status
)
{
if
(
obj
.
status
)
{
obj
.
status
=
false
;
obj
.
status
=
false
;
// eslint-disable-line no-param-reassign
this
.
openedFiles
.
map
((
f
)
=>
{
this
.
openedFiles
.
map
((
file
)
=>
{
const
f
=
file
;
if
(
f
.
active
)
{
if
(
f
.
active
)
{
this
.
blobRaw
=
f
.
plain
;
this
.
blobRaw
=
f
.
plain
;
}
}
f
.
changed
=
false
;
f
.
changed
=
false
;
delete
f
.
newContent
;
delete
f
.
newContent
;
return
f
;
});
});
this
.
editMode
=
false
;
this
.
editMode
=
false
;
}
}
...
...
app/assets/javascripts/repo/repo_store.js
View file @
028c6113
...
@@ -59,10 +59,9 @@ const RepoStore = {
...
@@ -59,10 +59,9 @@ const RepoStore = {
readOnly
:
true
,
readOnly
:
true
,
resetBinaryTypes
()
{
resetBinaryTypes
()
{
let
s
=
''
;
Object
.
keys
(
RepoStore
.
binaryTypes
).
forEach
((
key
)
=>
{
for
(
s
in
RepoStore
.
binaryTypes
)
{
RepoStore
.
binaryTypes
[
key
]
=
false
;
RepoStore
.
binaryTypes
[
s
]
=
false
;
});
}
},
},
// mutations
// mutations
...
...
spec/javascripts/repo/repo_commit_section_spec.js
View file @
028c6113
...
@@ -42,7 +42,9 @@ describe('RepoCommitSection', () => {
...
@@ -42,7 +42,9 @@ describe('RepoCommitSection', () => {
expect
(
changedFiles
.
length
).
toEqual
(
2
);
expect
(
changedFiles
.
length
).
toEqual
(
2
);
changedFiles
.
forEach
((
changedFile
,
i
)
=>
{
changedFiles
.
forEach
((
changedFile
,
i
)
=>
{
expect
(
changedFile
.
textContent
).
toEqual
(
RepoHelper
.
getFilePathFromFullPath
(
openedFiles
[
i
].
url
,
branch
));
const
filePath
=
RepoHelper
.
getFilePathFromFullPath
(
openedFiles
[
i
].
url
,
branch
);
expect
(
changedFile
.
textContent
).
toEqual
(
filePath
);
});
});
expect
(
commitMessage
.
tagName
).
toEqual
(
'
TEXTAREA
'
);
expect
(
commitMessage
.
tagName
).
toEqual
(
'
TEXTAREA
'
);
...
...
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