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
65e88f1e
Commit
65e88f1e
authored
9 years ago
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed few tests and improved css style
parent
8ecf7d32
No related merge requests found
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
9 deletions
+16
-9
app/assets/javascripts/blob/edit_blob.js.coffee
app/assets/javascripts/blob/edit_blob.js.coffee
+4
-0
app/assets/javascripts/blob/new_blob.js.coffee
app/assets/javascripts/blob/new_blob.js.coffee
+4
-0
app/assets/stylesheets/sections/editor.scss
app/assets/stylesheets/sections/editor.scss
+4
-4
app/views/projects/blob/edit.html.haml
app/views/projects/blob/edit.html.haml
+1
-1
app/views/projects/blob/new.html.haml
app/views/projects/blob/new.html.haml
+1
-1
features/steps/project/source/browse_files.rb
features/steps/project/source/browse_files.rb
+2
-3
No files found.
app/assets/javascripts/blob/edit_blob.js.coffee
View file @
65e88f1e
...
@@ -6,6 +6,7 @@ class @EditBlob
...
@@ -6,6 +6,7 @@ class @EditBlob
ace_mode
=
mode
ace_mode
=
mode
editor
=
ace
.
edit
(
"editor"
)
editor
=
ace
.
edit
(
"editor"
)
editor
.
focus
()
editor
.
focus
()
@
editor
=
editor
if
ace_mode
if
ace_mode
editor
.
getSession
().
setMode
"ace/mode/"
+
ace_mode
editor
.
getSession
().
setMode
"ace/mode/"
+
ace_mode
...
@@ -38,3 +39,6 @@ class @EditBlob
...
@@ -38,3 +39,6 @@ class @EditBlob
currentPane
.
fadeIn
200
currentPane
.
fadeIn
200
editor
.
focus
()
editor
.
focus
()
return
return
editor
:
->
return
@
editor
This diff is collapsed.
Click to expand it.
app/assets/javascripts/blob/new_blob.js.coffee
View file @
65e88f1e
...
@@ -6,6 +6,7 @@ class @NewBlob
...
@@ -6,6 +6,7 @@ class @NewBlob
ace_mode
=
mode
ace_mode
=
mode
editor
=
ace
.
edit
(
"editor"
)
editor
=
ace
.
edit
(
"editor"
)
editor
.
focus
()
editor
.
focus
()
@
editor
=
editor
if
ace_mode
if
ace_mode
editor
.
getSession
().
setMode
"ace/mode/"
+
ace_mode
editor
.
getSession
().
setMode
"ace/mode/"
+
ace_mode
...
@@ -15,3 +16,6 @@ class @NewBlob
...
@@ -15,3 +16,6 @@ class @NewBlob
$
(
"#file-content"
).
val
editor
.
getValue
()
$
(
"#file-content"
).
val
editor
.
getValue
()
$
(
".file-editor form"
).
submit
()
$
(
".file-editor form"
).
submit
()
return
return
editor
:
->
return
@
editor
This diff is collapsed.
Click to expand it.
app/assets/stylesheets/sections/editor.scss
View file @
65e88f1e
...
@@ -35,15 +35,15 @@
...
@@ -35,15 +35,15 @@
.file-title
{
.file-title
{
@extend
.monospace
;
@extend
.monospace
;
font-size
:
14px
;
font-size
:
14px
;
padding
:
5px
;
}
}
.editor-ref
{
.editor-ref
{
background
:
#fafafa
;
background
:
#f5f5f5
;
padding
:
18px
15px
;
padding
:
11px
15px
;
padding-left
:
25px
;
border-right
:
1px
solid
#CCC
;
border-right
:
1px
solid
#CCC
;
display
:
inline-block
;
display
:
inline-block
;
margin
:
-
10px
-1
5px
;
margin
:
-
5px
-
5px
;
margin-right
:
10px
;
margin-right
:
10px
;
}
}
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/blob/edit.html.haml
View file @
65e88f1e
...
@@ -21,4 +21,4 @@
...
@@ -21,4 +21,4 @@
cancel_path:
@after_edit_path
cancel_path:
@after_edit_path
:javascript
:javascript
new
EditBlob
(
gon
.
relative_url_root
+
"
#{
Gitlab
::
Application
.
config
.
assets
.
prefix
}
"
,
"
#{
@blob
.
language
.
try
(
:ace_mode
)
}
"
)
blob
=
new
EditBlob
(
gon
.
relative_url_root
+
"
#{
Gitlab
::
Application
.
config
.
assets
.
prefix
}
"
,
"
#{
@blob
.
language
.
try
(
:ace_mode
)
}
"
)
This diff is collapsed.
Click to expand it.
app/views/projects/blob/new.html.haml
View file @
65e88f1e
...
@@ -9,4 +9,4 @@
...
@@ -9,4 +9,4 @@
cancel_path:
project_tree_path
(
@project
,
@id
)
cancel_path:
project_tree_path
(
@project
,
@id
)
:javascript
:javascript
new
NewBlob
(
gon
.
relative_url_root
+
"
#{
Gitlab
::
Application
.
config
.
assets
.
prefix
}
"
,
null
)
blob
=
new
NewBlob
(
gon
.
relative_url_root
+
"
#{
Gitlab
::
Application
.
config
.
assets
.
prefix
}
"
,
null
)
This diff is collapsed.
Click to expand it.
features/steps/project/source/browse_files.rb
View file @
65e88f1e
...
@@ -58,7 +58,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
...
@@ -58,7 +58,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
step
'I can edit code'
do
step
'I can edit code'
do
set_new_content
set_new_content
evaluate_script
(
'editor.getValue()'
).
should
==
new_gitignore_content
evaluate_script
(
'
blob.
editor.getValue()'
).
should
==
new_gitignore_content
end
end
step
'I edit code'
do
step
'I edit code'
do
...
@@ -103,7 +103,6 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
...
@@ -103,7 +103,6 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
step
'I can see new file page'
do
step
'I can see new file page'
do
page
.
should
have_content
"New file"
page
.
should
have_content
"New file"
page
.
should
have_content
"File name"
page
.
should
have_content
"Commit message"
page
.
should
have_content
"Commit message"
end
end
...
@@ -170,7 +169,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
...
@@ -170,7 +169,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
private
private
def
set_new_content
def
set_new_content
execute_script
(
"editor.setValue('
#{
new_gitignore_content
}
')"
)
execute_script
(
"
blob.
editor.setValue('
#{
new_gitignore_content
}
')"
)
end
end
# Content of the gitignore file on the seed repository.
# Content of the gitignore file on the seed repository.
...
...
This diff is collapsed.
Click to expand it.
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