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
Boxiang Sun
gitlab-ce
Commits
098093d4
Commit
098093d4
authored
Jul 27, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed Delete, Replace and New dir modals
parent
d8433217
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
14 deletions
+1
-14
app/assets/javascripts/repo/repo_file_buttons.vue
app/assets/javascripts/repo/repo_file_buttons.vue
+0
-4
app/views/projects/tree/_tree_content.html.haml
app/views/projects/tree/_tree_content.html.haml
+0
-4
spec/javascripts/repo/repo_file_buttons_spec.js
spec/javascripts/repo/repo_file_buttons_spec.js
+1
-6
No files found.
app/assets/javascripts/repo/repo_file_buttons.vue
View file @
098093d4
...
...
@@ -50,9 +50,5 @@ export default RepoFileButtons;
</div>
<a
href=
"#"
v-if=
"canPreview"
@
click.prevent=
"rawPreviewToggle"
class=
"btn btn-default preview"
>
{{
activeFileLabel
}}
</a>
<button
type=
"button"
class=
"btn btn-default replace"
data-target=
"#modal-upload-blob"
data-toggle=
"modal"
>
Replace
</button>
<a
href=
"#"
class=
"btn btn-danger delete"
>
Delete
</a>
</div>
</
template
>
app/views/projects/tree/_tree_content.html.haml
View file @
098093d4
#repo
{
data:
{
url:
repo_url
(
@project
),
'project-name'
=>
@project
.
name
,
refs_url:
refs_namespace_project_path
(
@project
.
namespace
,
@project
,
format:
"json"
),
project_url:
namespace_project_path
(
@project
.
namespace
,
@project
),
project_id:
@project
.
id
,
temp_token:
@current_user
.
private_token
}
}
-
if
can_edit_tree?
=
render
'projects/blob/upload'
,
title:
_
(
'Upload New File'
),
placeholder:
_
(
'Upload New File'
),
button_title:
_
(
'Upload file'
),
form_path:
project_create_blob_path
(
@project
,
@id
),
method: :post
=
render
'projects/blob/new_dir'
:javascript
// Load last commit log for each file in tree
$
(
'
#tree-slider
'
).
waitForImages
(
function
()
{
...
...
spec/javascripts/repo/repo_file_buttons_spec.js
View file @
098093d4
...
...
@@ -9,7 +9,7 @@ describe('RepoFileButtons', () => {
return
new
RepoFileButtons
().
$mount
();
}
it
(
'
renders Raw, Blame, History, Permalink, Lock
, Preview toggle, Replace and Delet
e
'
,
()
=>
{
it
(
'
renders Raw, Blame, History, Permalink, Lock
and Preview toggl
e
'
,
()
=>
{
const
activeFile
=
{
extension
:
'
md
'
,
url
:
'
url
'
,
...
...
@@ -24,7 +24,6 @@ describe('RepoFileButtons', () => {
const
raw
=
vm
.
$el
.
querySelector
(
'
.raw
'
);
const
blame
=
vm
.
$el
.
querySelector
(
'
.blame
'
);
const
history
=
vm
.
$el
.
querySelector
(
'
.history
'
);
const
replace
=
vm
.
$el
.
querySelector
(
'
.replace
'
);
expect
(
vm
.
$el
.
id
).
toEqual
(
'
repo-file-buttons
'
);
expect
(
vm
.
$el
.
style
.
borderBottom
).
toEqual
(
'
1px solid rgb(31, 120, 209)
'
);
...
...
@@ -37,10 +36,6 @@ describe('RepoFileButtons', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.permalink
'
).
textContent
).
toEqual
(
'
Permalink
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.lock
'
).
textContent
).
toEqual
(
'
Lock
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.preview
'
).
textContent
).
toEqual
(
activeFileLabel
);
expect
(
replace
.
dataset
.
target
).
toEqual
(
'
#modal-upload-blob
'
);
expect
(
replace
.
dataset
.
toggle
).
toEqual
(
'
modal
'
);
expect
(
replace
.
textContent
).
toEqual
(
'
Replace
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.delete
'
).
textContent
).
toEqual
(
'
Delete
'
);
});
it
(
'
renders a white border if not editMode
'
,
()
=>
{
...
...
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