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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
080449f8
Commit
080449f8
authored
Feb 13, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure Markdown previews always use the same styling as the eventual destination.
parent
529188e4
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
16 additions
and
15 deletions
+16
-15
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/notes.js.coffee
app/assets/javascripts/notes.js.coffee
+4
-4
app/views/projects/_issuable_form.html.haml
app/views/projects/_issuable_form.html.haml
+1
-1
app/views/projects/_md_preview.html.haml
app/views/projects/_md_preview.html.haml
+1
-1
app/views/projects/merge_requests/_new_submit.html.haml
app/views/projects/merge_requests/_new_submit.html.haml
+1
-1
app/views/projects/milestones/_form.html.haml
app/views/projects/milestones/_form.html.haml
+1
-1
app/views/projects/notes/_edit_form.html.haml
app/views/projects/notes/_edit_form.html.haml
+1
-1
app/views/projects/notes/_form.html.haml
app/views/projects/notes/_form.html.haml
+1
-1
app/views/projects/wikis/_form.html.haml
app/views/projects/wikis/_form.html.haml
+1
-1
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+2
-2
features/steps/shared/note.rb
features/steps/shared/note.rb
+1
-1
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+1
-1
No files found.
CHANGELOG
View file @
080449f8
...
@@ -50,6 +50,7 @@ v 7.8.0 (unreleased)
...
@@ -50,6 +50,7 @@ v 7.8.0 (unreleased)
- Prevent losing unsaved comments by automatically restoring them when comment page is loaded again.
- Prevent losing unsaved comments by automatically restoring them when comment page is loaded again.
- Don't allow page to be scaled on mobile.
- Don't allow page to be scaled on mobile.
- Clean the username acquired from OAuth/LDAP so it doesn't fail username validation and block signing up.
- Clean the username acquired from OAuth/LDAP so it doesn't fail username validation and block signing up.
- Make sure Markdown previews always use the same styling as the eventual destination.
v 7.7.2
v 7.7.2
- Update GitLab Shell to version 2.4.2 that fixes a bug when developers can push to protected branch
- Update GitLab Shell to version 2.4.2 that fixes a bug when developers can push to protected branch
...
...
app/assets/javascripts/notes.js.coffee
View file @
080449f8
...
@@ -272,7 +272,7 @@ class @Notes
...
@@ -272,7 +272,7 @@ class @Notes
note_li
=
$
(
".note-row-"
+
note
.
id
)
note_li
=
$
(
".note-row-"
+
note
.
id
)
note_li
.
replaceWith
(
note
.
html
)
note_li
.
replaceWith
(
note
.
html
)
note_li
.
find
(
'.note-edit-form'
).
hide
()
note_li
.
find
(
'.note-edit-form'
).
hide
()
note_li
.
find
(
'.note-text'
).
show
()
note_li
.
find
(
'.note-
body > .note-
text'
).
show
()
###
###
Called in response to clicking the edit note link
Called in response to clicking the edit note link
...
@@ -284,7 +284,7 @@ class @Notes
...
@@ -284,7 +284,7 @@ class @Notes
showEditForm
:
(
e
)
->
showEditForm
:
(
e
)
->
e
.
preventDefault
()
e
.
preventDefault
()
note
=
$
(
this
).
closest
(
".note"
)
note
=
$
(
this
).
closest
(
".note"
)
note
.
find
(
".note-text"
).
hide
()
note
.
find
(
".note-
body > .note-
text"
).
hide
()
note
.
find
(
".note-header"
).
hide
()
note
.
find
(
".note-header"
).
hide
()
base_form
=
note
.
find
(
".note-edit-form"
)
base_form
=
note
.
find
(
".note-edit-form"
)
form
=
base_form
.
clone
().
insertAfter
(
base_form
)
form
=
base_form
.
clone
().
insertAfter
(
base_form
)
...
@@ -311,7 +311,7 @@ class @Notes
...
@@ -311,7 +311,7 @@ class @Notes
cancelEdit
:
(
e
)
->
cancelEdit
:
(
e
)
->
e
.
preventDefault
()
e
.
preventDefault
()
note
=
$
(
this
).
closest
(
".note"
)
note
=
$
(
this
).
closest
(
".note"
)
note
.
find
(
".note-text"
).
show
()
note
.
find
(
".note-
body > .note-
text"
).
show
()
note
.
find
(
".note-header"
).
show
()
note
.
find
(
".note-header"
).
show
()
note
.
find
(
".current-note-edit-form"
).
remove
()
note
.
find
(
".current-note-edit-form"
).
remove
()
...
@@ -345,7 +345,7 @@ class @Notes
...
@@ -345,7 +345,7 @@ class @Notes
removeAttachment
:
->
removeAttachment
:
->
note
=
$
(
this
).
closest
(
".note"
)
note
=
$
(
this
).
closest
(
".note"
)
note
.
find
(
".note-attachment"
).
remove
()
note
.
find
(
".note-attachment"
).
remove
()
note
.
find
(
".note-text"
).
show
()
note
.
find
(
".note-
body > .note-
text"
).
show
()
note
.
find
(
".js-note-attachment-delete"
).
hide
()
note
.
find
(
".js-note-attachment-delete"
).
hide
()
note
.
find
(
".note-edit-form"
).
hide
()
note
.
find
(
".note-edit-form"
).
hide
()
...
...
app/views/projects/_issuable_form.html.haml
View file @
080449f8
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
=
f
.
label
:description
,
'Description'
,
class:
'control-label'
=
f
.
label
:description
,
'Description'
,
class:
'control-label'
.col-sm-10
.col-sm-10
=
render
layout:
'projects/md_preview'
do
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"wiki"
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
classes:
'description form-control'
classes:
'description form-control'
.col-sm-12.hint
.col-sm-12.hint
...
...
app/views/projects/_md_preview.html.haml
View file @
080449f8
...
@@ -10,4 +10,4 @@
...
@@ -10,4 +10,4 @@
.md-write-holder
.md-write-holder
=
yield
=
yield
.md-preview-holder.hide
.md-preview-holder.hide
.js-md-preview
.js-md-preview
{
class:
(
preview_class
if
defined?
(
preview_class
))}
app/views/projects/merge_requests/_new_submit.html.haml
View file @
080449f8
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
.form-group.issuable-description
.form-group.issuable-description
=
f
.
label
:description
,
'Description'
,
class:
'control-label'
=
f
.
label
:description
,
'Description'
,
class:
'control-label'
.col-sm-10
.col-sm-10
=
render
layout:
'projects/md_preview'
do
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"wiki"
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
classes:
'description form-control'
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
classes:
'description form-control'
.col-sm-12-hint
.col-sm-12-hint
...
...
app/views/projects/milestones/_form.html.haml
View file @
080449f8
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
.form-group.milestone-description
.form-group.milestone-description
=
f
.
label
:description
,
"Description"
,
class:
"control-label"
=
f
.
label
:description
,
"Description"
,
class:
"control-label"
.col-sm-10
.col-sm-10
=
render
layout:
'projects/md_preview'
do
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"wiki"
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
classes:
'description form-control'
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
classes:
'description form-control'
.hint
.hint
.pull-left
Milestones are parsed with
#{
link_to
"GitLab Flavored Markdown"
,
help_page_path
(
"markdown"
,
"markdown"
),
target:
'_blank'
}
.
.pull-left
Milestones are parsed with
#{
link_to
"GitLab Flavored Markdown"
,
help_page_path
(
"markdown"
,
"markdown"
),
target:
'_blank'
}
.
...
...
app/views/projects/notes/_edit_form.html.haml
View file @
080449f8
.note-edit-form
.note-edit-form
=
form_for
note
,
url:
project_note_path
(
@project
,
note
),
method: :put
,
remote:
true
,
authenticity_token:
true
do
|
f
|
=
form_for
note
,
url:
project_note_path
(
@project
,
note
),
method: :put
,
remote:
true
,
authenticity_token:
true
do
|
f
|
=
render
layout:
'projects/md_preview'
do
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"note-text"
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :note
,
=
render
'projects/zen'
,
f:
f
,
attr: :note
,
classes:
'note_text js-note-text'
classes:
'note_text js-note-text'
...
...
app/views/projects/notes/_form.html.haml
View file @
080449f8
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
=
f
.
hidden_field
:noteable_id
=
f
.
hidden_field
:noteable_id
=
f
.
hidden_field
:noteable_type
=
f
.
hidden_field
:noteable_type
=
render
layout:
'projects/md_preview'
do
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"note-text"
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :note
,
=
render
'projects/zen'
,
f:
f
,
attr: :note
,
classes:
'note_text js-note-text'
classes:
'note_text js-note-text'
...
...
app/views/projects/wikis/_form.html.haml
View file @
080449f8
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
.form-group.wiki-content
.form-group.wiki-content
=
f
.
label
:content
,
class:
'control-label'
=
f
.
label
:content
,
class:
'control-label'
.col-sm-10
.col-sm-10
=
render
layout:
'projects/md_preview'
do
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"wiki"
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :content
,
classes:
'description form-control'
=
render
'projects/zen'
,
f:
f
,
attr: :content
,
classes:
'description form-control'
.col-sm-12.hint
.col-sm-12.hint
.pull-left
Wiki content is parsed with
#{
link_to
"GitLab Flavored Markdown"
,
help_page_path
(
"markdown"
,
"markdown"
),
target:
'_blank'
}
.pull-left
Wiki content is parsed with
#{
link_to
"GitLab Flavored Markdown"
,
help_page_path
(
"markdown"
,
"markdown"
),
target:
'_blank'
}
...
...
features/steps/project/merge_requests.rb
View file @
080449f8
...
@@ -253,7 +253,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
...
@@ -253,7 +253,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
step
'I should still see a comment like "Line is correct" in the first file'
do
step
'I should still see a comment like "Line is correct" in the first file'
do
within
'.files [id^=diff]:nth-child(1) .note-text'
do
within
'.files [id^=diff]:nth-child(1) .note-
body > .note-
text'
do
page
.
should
have_visible_content
"Line is correct"
page
.
should
have_visible_content
"Line is correct"
end
end
end
end
...
@@ -271,7 +271,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
...
@@ -271,7 +271,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
step
'I should see comments on the side-by-side diff page'
do
step
'I should see comments on the side-by-side diff page'
do
within
'.files [id^=diff]:nth-child(1) .parallel .note-text'
do
within
'.files [id^=diff]:nth-child(1) .parallel .note-
body > .note-
text'
do
page
.
should
have_visible_content
"Line is correct"
page
.
should
have_visible_content
"Line is correct"
end
end
end
end
...
...
features/steps/shared/note.rb
View file @
080449f8
...
@@ -116,7 +116,7 @@ module SharedNote
...
@@ -116,7 +116,7 @@ module SharedNote
end
end
step
'The comment with the header should not have an ID'
do
step
'The comment with the header should not have an ID'
do
within
(
".note-text"
)
do
within
(
".note-
body > .note-
text"
)
do
page
.
should
have_content
(
"Comment with a header"
)
page
.
should
have_content
(
"Comment with a header"
)
page
.
should_not
have_css
(
"#comment-with-a-header"
)
page
.
should_not
have_css
(
"#comment-with-a-header"
)
end
end
...
...
spec/features/notes_on_merge_requests_spec.rb
View file @
080449f8
...
@@ -81,7 +81,7 @@ describe 'Comments' do
...
@@ -81,7 +81,7 @@ describe 'Comments' do
within
(
"#note_
#{
note
.
id
}
"
)
do
within
(
"#note_
#{
note
.
id
}
"
)
do
expect
(
find
(
'.current-note-edit-form'
,
visible:
true
)).
to
be_visible
expect
(
find
(
'.current-note-edit-form'
,
visible:
true
)).
to
be_visible
expect
(
find
(
'.note-edit-form'
,
visible:
true
)).
to
be_visible
expect
(
find
(
'.note-edit-form'
,
visible:
true
)).
to
be_visible
expect
(
find
(
:css
,
'.note-text'
,
visible:
false
)).
not_to
be_visible
expect
(
find
(
:css
,
'.note-
body > .note-
text'
,
visible:
false
)).
not_to
be_visible
end
end
end
end
...
...
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