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
5ea4942a
Commit
5ea4942a
authored
Jul 29, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disabled and show dropdowns at the right times.
parent
aad39a7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
app/assets/javascripts/repo/index.js
app/assets/javascripts/repo/index.js
+6
-0
app/assets/javascripts/repo/repo_editor.vue
app/assets/javascripts/repo/repo_editor.vue
+10
-0
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+5
-0
No files found.
app/assets/javascripts/repo/index.js
View file @
5ea4942a
...
@@ -24,6 +24,11 @@ function repoEditorLoader() {
...
@@ -24,6 +24,11 @@ function repoEditorLoader() {
});
});
}
}
function
initDropdowns
()
{
$
(
'
.project-refs-target-form
'
).
hide
();
$
(
'
.fa-long-arrow-right
'
).
hide
();
}
function
addEventsForNonVueEls
()
{
function
addEventsForNonVueEls
()
{
$
(
document
).
on
(
'
change
'
,
'
.dropdown
'
,
()
=>
{
$
(
document
).
on
(
'
change
'
,
'
.dropdown
'
,
()
=>
{
Store
.
targetBranch
=
$
(
'
.project-refs-target-form input[name="ref"]
'
).
val
();
Store
.
targetBranch
=
$
(
'
.project-refs-target-form input[name="ref"]
'
).
val
();
...
@@ -56,6 +61,7 @@ function initRepo() {
...
@@ -56,6 +61,7 @@ function initRepo() {
Store
.
currentBranch
=
$
(
'
button.dropdown-menu-toggle
'
).
attr
(
'
data-ref
'
);
Store
.
currentBranch
=
$
(
'
button.dropdown-menu-toggle
'
).
attr
(
'
data-ref
'
);
Store
.
checkIsCommitable
();
Store
.
checkIsCommitable
();
addEventsForNonVueEls
();
addEventsForNonVueEls
();
initDropdowns
();
this
.
vm
=
new
Vue
({
this
.
vm
=
new
Vue
({
el
:
repo
,
el
:
repo
,
...
...
app/assets/javascripts/repo/repo_editor.vue
View file @
5ea4942a
...
@@ -70,6 +70,16 @@ const RepoEditor = {
...
@@ -70,6 +70,16 @@ const RepoEditor = {
this
.
monacoInstance
.
updateOptions
({
this
.
monacoInstance
.
updateOptions
({
readOnly
,
readOnly
,
});
});
if
(
this
.
editMode
){
$
(
'
.project-refs-form
'
).
addClass
(
'
disabled
'
);
$
(
'
.fa-long-arrow-right
'
).
show
();
$
(
'
.project-refs-target-form
'
).
show
();
}
else
{
$
(
'
.project-refs-form
'
).
removeClass
(
'
disabled
'
);
$
(
'
.fa-long-arrow-right
'
).
hide
();
$
(
'
.project-refs-target-form
'
).
hide
();
}
},
},
activeFileLabel
()
{
activeFileLabel
()
{
...
...
app/assets/stylesheets/pages/repo.scss
View file @
5ea4942a
...
@@ -21,6 +21,11 @@
...
@@ -21,6 +21,11 @@
.project-refs-form
,
.project-refs-target-form
{
.project-refs-form
,
.project-refs-target-form
{
display
:
inline-block
;
display
:
inline-block
;
&
.disabled
{
opacity
:
0
.5
;
pointer-events
:
none
;
}
}
}
.fade-enter
,
.fade-enter
,
...
...
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