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
iv
gitlab-ce
Commits
65e88f1e
Commit
65e88f1e
authored
Jan 26, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed few tests and improved css style
parent
8ecf7d32
Changes
6
Hide 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
ace_mode
=
mode
editor
=
ace
.
edit
(
"editor"
)
editor
.
focus
()
@
editor
=
editor
if
ace_mode
editor
.
getSession
().
setMode
"ace/mode/"
+
ace_mode
...
...
@@ -38,3 +39,6 @@ class @EditBlob
currentPane
.
fadeIn
200
editor
.
focus
()
return
editor
:
->
return
@
editor
app/assets/javascripts/blob/new_blob.js.coffee
View file @
65e88f1e
...
...
@@ -6,6 +6,7 @@ class @NewBlob
ace_mode
=
mode
editor
=
ace
.
edit
(
"editor"
)
editor
.
focus
()
@
editor
=
editor
if
ace_mode
editor
.
getSession
().
setMode
"ace/mode/"
+
ace_mode
...
...
@@ -15,3 +16,6 @@ class @NewBlob
$
(
"#file-content"
).
val
editor
.
getValue
()
$
(
".file-editor form"
).
submit
()
return
editor
:
->
return
@
editor
app/assets/stylesheets/sections/editor.scss
View file @
65e88f1e
...
...
@@ -35,15 +35,15 @@
.file-title
{
@extend
.monospace
;
font-size
:
14px
;
padding
:
5px
;
}
.editor-ref
{
background
:
#fafafa
;
padding
:
18px
15px
;
padding-left
:
25px
;
background
:
#f5f5f5
;
padding
:
11px
15px
;
border-right
:
1px
solid
#CCC
;
display
:
inline-block
;
margin
:
-
10px
-1
5px
;
margin
:
-
5px
-
5px
;
margin-right
:
10px
;
}
...
...
app/views/projects/blob/edit.html.haml
View file @
65e88f1e
...
...
@@ -21,4 +21,4 @@
cancel_path:
@after_edit_path
: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
)
}
"
)
app/views/projects/blob/new.html.haml
View file @
65e88f1e
...
...
@@ -9,4 +9,4 @@
cancel_path:
project_tree_path
(
@project
,
@id
)
: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
)
features/steps/project/source/browse_files.rb
View file @
65e88f1e
...
...
@@ -58,7 +58,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
step
'I can edit code'
do
set_new_content
evaluate_script
(
'editor.getValue()'
).
should
==
new_gitignore_content
evaluate_script
(
'
blob.
editor.getValue()'
).
should
==
new_gitignore_content
end
step
'I edit code'
do
...
...
@@ -103,7 +103,6 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
step
'I can see new file page'
do
page
.
should
have_content
"New file"
page
.
should
have_content
"File name"
page
.
should
have_content
"Commit message"
end
...
...
@@ -170,7 +169,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
private
def
set_new_content
execute_script
(
"editor.setValue('
#{
new_gitignore_content
}
')"
)
execute_script
(
"
blob.
editor.setValue('
#{
new_gitignore_content
}
')"
)
end
# Content of the gitignore file on the seed repository.
...
...
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