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
Jérome Perrin
gitlab-ce
Commits
40d2daed
Commit
40d2daed
authored
Jan 25, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Highlight note code and edit preview
parent
0f2a9062
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
34 additions
and
64 deletions
+34
-64
app/assets/javascripts/blob/edit_blob.js.coffee
app/assets/javascripts/blob/edit_blob.js.coffee
+1
-0
app/assets/stylesheets/framework/common.scss
app/assets/stylesheets/framework/common.scss
+0
-8
app/assets/stylesheets/framework/highlight.scss
app/assets/stylesheets/framework/highlight.scss
+2
-16
app/assets/stylesheets/framework/tables.scss
app/assets/stylesheets/framework/tables.scss
+2
-2
app/assets/stylesheets/framework/typography.scss
app/assets/stylesheets/framework/typography.scss
+6
-12
app/assets/stylesheets/highlight/dark.scss
app/assets/stylesheets/highlight/dark.scss
+2
-2
app/assets/stylesheets/highlight/monokai.scss
app/assets/stylesheets/highlight/monokai.scss
+2
-2
app/assets/stylesheets/highlight/solarized_dark.scss
app/assets/stylesheets/highlight/solarized_dark.scss
+4
-4
app/assets/stylesheets/highlight/solarized_light.scss
app/assets/stylesheets/highlight/solarized_light.scss
+4
-4
app/assets/stylesheets/highlight/white.scss
app/assets/stylesheets/highlight/white.scss
+2
-2
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+1
-4
app/assets/stylesheets/pages/notes.scss
app/assets/stylesheets/pages/notes.scss
+1
-0
app/views/projects/blob/_text.html.haml
app/views/projects/blob/_text.html.haml
+4
-4
app/views/projects/blob/preview.html.haml
app/views/projects/blob/preview.html.haml
+1
-1
app/views/projects/notes/discussions/_diff.html.haml
app/views/projects/notes/discussions/_diff.html.haml
+1
-1
app/views/shared/snippets/_blob.html.haml
app/views/shared/snippets/_blob.html.haml
+1
-2
No files found.
app/assets/javascripts/blob/edit_blob.js.coffee
View file @
40d2daed
...
@@ -32,6 +32,7 @@ class @EditBlob
...
@@ -32,6 +32,7 @@ class @EditBlob
content
:
editor
.
getValue
()
content
:
editor
.
getValue
()
,
(
response
)
->
,
(
response
)
->
currentPane
.
empty
().
append
response
currentPane
.
empty
().
append
response
currentPane
.
syntaxHighlight
()
return
return
else
else
...
...
app/assets/stylesheets/framework/common.scss
View file @
40d2daed
...
@@ -311,14 +311,6 @@ table {
...
@@ -311,14 +311,6 @@ table {
}
}
}
}
.wiki
.highlight
,
.note-body
.highlight
{
margin
:
12px
0
12px
0
;
}
.wiki
.code
{
overflow-x
:
auto
;
}
.footer-links
{
.footer-links
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
a
{
a
{
...
...
app/assets/stylesheets/framework/highlight.scss
View file @
40d2daed
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
overflow-y
:
hidden
;
overflow-y
:
hidden
;
white-space
:
pre
;
white-space
:
pre
;
word-wrap
:
normal
;
word-wrap
:
normal
;
border-left
:
1px
solid
;
code
{
code
{
font-family
:
$monospace_font
;
font-family
:
$monospace_font
;
...
@@ -25,7 +26,7 @@
...
@@ -25,7 +26,7 @@
padding
:
0
;
padding
:
0
;
.line
{
.line
{
display
:
inline
;
display
:
inline
-block
;
}
}
}
}
}
}
...
@@ -53,18 +54,3 @@
...
@@ -53,18 +54,3 @@
}
}
}
}
}
}
.note-text
.code
{
border
:
none
;
box-shadow
:
none
;
background
:
$background-color
;
padding
:
1em
;
overflow-x
:
auto
;
code
{
font-family
:
$monospace_font
;
white-space
:
pre
;
word-wrap
:
normal
;
padding
:
0
;
}
}
app/assets/stylesheets/framework/tables.scss
View file @
40d2daed
...
@@ -33,11 +33,11 @@ table {
...
@@ -33,11 +33,11 @@ table {
background-color
:
$background-color
;
background-color
:
$background-color
;
font-weight
:
normal
;
font-weight
:
normal
;
font-size
:
15px
;
font-size
:
15px
;
border-bottom
:
1px
solid
$border-color
!
important
;
border-bottom
:
1px
solid
$border-color
;
}
}
td
{
td
{
border-color
:
$table-border-color
!
important
;
border-color
:
$table-border-color
;
border-bottom
:
1px
solid
;
border-bottom
:
1px
solid
;
}
}
}
}
...
...
app/assets/stylesheets/framework/typography.scss
View file @
40d2daed
...
@@ -87,8 +87,8 @@
...
@@ -87,8 +87,8 @@
}
}
p
{
p
{
color
:
#5c5d5e
;
color
:
#5c5d5e
;
margin
:
6px
0
0
0
;
margin
:
6px
0
0
0
;
}
}
table
{
table
{
...
@@ -102,11 +102,10 @@
...
@@ -102,11 +102,10 @@
}
}
pre
{
pre
{
margin
:
12px
0
12px
0
!
important
;
margin
:
12px
0
12px
0
;
background-color
:
#f8fafc
;
font-size
:
13px
;
font-size
:
13px
!
important
;
line-height
:
1
.6em
;
color
:
#5b6169
;
overflow-x
:
auto
;
line-height
:
1
.6em
!
important
;
@include
border-radius
(
2px
);
@include
border-radius
(
2px
);
}
}
...
@@ -204,11 +203,6 @@ h1, h2, h3, h4, h5, h6 {
...
@@ -204,11 +203,6 @@ h1, h2, h3, h4, h5, h6 {
pre
{
pre
{
font-family
:
$monospace_font
;
font-family
:
$monospace_font
;
&
.dark
{
background
:
#333
;
color
:
$background-color
;
}
&
.plain-readme
{
&
.plain-readme
{
background
:
none
;
background
:
none
;
border
:
none
;
border
:
none
;
...
...
app/assets/stylesheets/highlight/dark.scss
View file @
40d2daed
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
}
}
// Code itself
// Code itself
pre
.code
{
pre
.code
,
.diff-line-num
{
border-
left
:
1px
solid
#666
;
border-
color
:
#666
;
}
}
&
,
pre
.code
,
.line_holder
.line_content
{
&
,
pre
.code
,
.line_holder
.line_content
{
...
...
app/assets/stylesheets/highlight/monokai.scss
View file @
40d2daed
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
}
}
// Code itself
// Code itself
pre
.code
{
pre
.code
,
.diff-line-num
{
border-
left
:
1px
solid
#555
;
border-
color
:
#555
;
}
}
&
,
pre
.code
,
.line_holder
.line_content
{
&
,
pre
.code
,
.line_holder
.line_content
{
...
...
app/assets/stylesheets/highlight/solarized_dark.scss
View file @
40d2daed
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
}
}
// Code itself
// Code itself
pre
.code
{
pre
.code
,
.diff-line-num
{
border-
left
:
1px
solid
#113b46
;
border-
color
:
#113b46
;
}
}
&
,
pre
.code
,
.line_holder
.line_content
{
&
,
pre
.code
,
.line_holder
.line_content
{
...
@@ -22,11 +22,11 @@
...
@@ -22,11 +22,11 @@
// Diff line
// Diff line
.line_holder
{
.line_holder
{
.diff-line-num.new
,
.line_content.new
{
.diff-line-num.new
,
.line_content.new
{
@include
diff_background
(
rgba
(
133
,
153
,
0
,
0
.2
)
,
rgba
(
133
,
153
,
0
,
0
.3
)
,
#
808080
);
@include
diff_background
(
rgba
(
133
,
153
,
0
,
0
.2
)
,
rgba
(
133
,
153
,
0
,
0
.3
)
,
#
113b46
);
}
}
.diff-line-num.old
,
.line_content.old
{
.diff-line-num.old
,
.line_content.old
{
@include
diff_background
(
rgba
(
220
,
50
,
47
,
0
.3
)
,
rgba
(
220
,
50
,
47
,
0
.3
)
,
#
808080
);
@include
diff_background
(
rgba
(
220
,
50
,
47
,
0
.3
)
,
rgba
(
220
,
50
,
47
,
0
.3
)
,
#
113b46
);
}
}
.line_content.match
{
.line_content.match
{
...
...
app/assets/stylesheets/highlight/solarized_light.scss
View file @
40d2daed
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
}
}
// Code itself
// Code itself
pre
.code
{
pre
.code
,
.diff-line-num
{
border-
left
:
1px
solid
#c5d0d4
;
border-
color
:
#c5d0d4
;
}
}
&
,
pre
.code
,
.line_holder
.line_content
{
&
,
pre
.code
,
.line_holder
.line_content
{
...
@@ -22,11 +22,11 @@
...
@@ -22,11 +22,11 @@
// Diff line
// Diff line
.line_holder
{
.line_holder
{
.diff-line-num.new
,
.line_content.new
{
.diff-line-num.new
,
.line_content.new
{
@include
diff_background
(
rgba
(
133
,
153
,
0
,
0
.2
)
,
rgba
(
133
,
153
,
0
,
0
.3
)
,
#
FAF3DD
);
@include
diff_background
(
rgba
(
133
,
153
,
0
,
0
.2
)
,
rgba
(
133
,
153
,
0
,
0
.3
)
,
#
c5d0d4
);
}
}
.diff-line-num.old
,
.line_content.old
{
.diff-line-num.old
,
.line_content.old
{
@include
diff_background
(
rgba
(
220
,
50
,
47
,
0
.2
)
,
rgba
(
220
,
50
,
47
,
0
.3
)
,
#
FAF3DD
);
@include
diff_background
(
rgba
(
220
,
50
,
47
,
0
.2
)
,
rgba
(
220
,
50
,
47
,
0
.3
)
,
#
c5d0d4
);
}
}
.line_content.match
{
.line_content.match
{
...
...
app/assets/stylesheets/highlight/white.scss
View file @
40d2daed
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
}
}
// Code itself
// Code itself
pre
.code
{
pre
.code
,
.diff-line-num
{
border-
left
:
1px
solid
$border-color
;
border-
color
:
$border-color
;
}
}
&
,
pre
.code
,
.line_holder
.line_content
{
&
,
pre
.code
,
.line_holder
.line_content
{
...
...
app/assets/stylesheets/pages/diff.scss
View file @
40d2daed
...
@@ -79,10 +79,8 @@
...
@@ -79,10 +79,8 @@
margin
:
0px
;
margin
:
0px
;
padding
:
0px
;
padding
:
0px
;
border
:
none
;
border
:
none
;
background
:
$background-color
;
color
:
rgba
(
0
,
0
,
0
,
0
.3
);
padding
:
0px
5px
;
padding
:
0px
5px
;
border-right
:
1px
solid
$border-color
;
border-right
:
1px
solid
;
text-align
:
right
;
text-align
:
right
;
min-width
:
35px
;
min-width
:
35px
;
max-width
:
50px
;
max-width
:
50px
;
...
@@ -92,7 +90,6 @@
...
@@ -92,7 +90,6 @@
float
:
left
;
float
:
left
;
width
:
35px
;
width
:
35px
;
font-weight
:
normal
;
font-weight
:
normal
;
color
:
rgba
(
0
,
0
,
0
,
0
.3
);
&
:hover
{
&
:hover
{
text-decoration
:
underline
;
text-decoration
:
underline
;
}
}
...
...
app/assets/stylesheets/pages/notes.scss
View file @
40d2daed
...
@@ -154,6 +154,7 @@ ul.notes {
...
@@ -154,6 +154,7 @@ ul.notes {
text-align
:
center
;
text-align
:
center
;
padding
:
10px
0
;
padding
:
10px
0
;
background
:
#FFF
;
background
:
#FFF
;
color
:
$text-color
;
}
}
&
.notes_line2
{
&
.notes_line2
{
text-align
:
center
;
text-align
:
center
;
...
...
app/views/projects/blob/_text.html.haml
View file @
40d2daed
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
.file-content.wiki
.file-content.wiki
=
render_markup
(
blob
.
name
,
blob
.
data
)
=
render_markup
(
blob
.
name
,
blob
.
data
)
-
else
-
else
.file-content.code
-
unless
blob
.
empty?
-
unless
blob
.
empty?
=
render
'shared/file_highlight'
,
blob:
blob
=
render
'shared/file_highlight'
,
blob:
blob
-
else
-
els
e
.file-content.cod
e
.nothing-here-block
Empty file
.nothing-here-block
Empty file
app/views/projects/blob/preview.html.haml
View file @
40d2daed
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
.file-content.wiki
.file-content.wiki
=
raw
render_markup
(
@blob
.
name
,
@content
)
=
raw
render_markup
(
@blob
.
name
,
@content
)
-
else
-
else
.file-content.code
.file-content.code
.js-syntax-highlight
-
unless
@diff_lines
.
empty?
-
unless
@diff_lines
.
empty?
%table
.text-file
%table
.text-file
-
@diff_lines
.
each
do
|
line
|
-
@diff_lines
.
each
do
|
line
|
...
...
app/views/projects/notes/discussions/_diff.html.haml
View file @
40d2daed
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
=
diff
.
new_path
=
diff
.
new_path
-
if
diff
.
a_mode
&&
diff
.
b_mode
&&
diff
.
a_mode
!=
diff
.
b_mode
-
if
diff
.
a_mode
&&
diff
.
b_mode
&&
diff
.
a_mode
!=
diff
.
b_mode
%span
.file-mode
=
"
#{
diff
.
a_mode
}
→
#{
diff
.
b_mode
}
"
%span
.file-mode
=
"
#{
diff
.
a_mode
}
→
#{
diff
.
b_mode
}
"
.diff-content
.diff-content
.code.js-syntax-highlight
%table
%table
-
note
.
truncated_diff_lines
.
each
do
|
line
|
-
note
.
truncated_diff_lines
.
each
do
|
line
|
-
type
=
line
.
type
-
type
=
line
.
type
...
...
app/views/shared/snippets/_blob.html.haml
View file @
40d2daed
...
@@ -3,8 +3,7 @@
...
@@ -3,8 +3,7 @@
.file-content.wiki
.file-content.wiki
=
render_markup
(
@snippet
.
file_name
,
@snippet
.
data
)
=
render_markup
(
@snippet
.
file_name
,
@snippet
.
data
)
-
else
-
else
.file-content.code
=
render
'shared/file_highlight'
,
blob:
@snippet
=
render
'shared/file_highlight'
,
blob:
@snippet
-
else
-
else
.file-content.code
.file-content.code
.nothing-here-block
Empty file
.nothing-here-block
Empty file
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