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
1ad174fb
Commit
1ad174fb
authored
May 22, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve edit page UI/UX
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
9f80ab8e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
app/assets/stylesheets/sections/diff.scss
app/assets/stylesheets/sections/diff.scss
+5
-0
app/views/projects/edit_tree/preview.html.haml
app/views/projects/edit_tree/preview.html.haml
+1
-1
app/views/projects/edit_tree/show.html.haml
app/views/projects/edit_tree/show.html.haml
+13
-10
No files found.
app/assets/stylesheets/sections/diff.scss
View file @
1ad174fb
...
@@ -330,3 +330,8 @@
...
@@ -330,3 +330,8 @@
}
}
}
}
}
}
.file-content
.diff-file
{
margin
:
0
;
border
:
none
;
}
app/views/projects/edit_tree/preview.html.haml
View file @
1ad174fb
...
@@ -23,4 +23,4 @@
...
@@ -23,4 +23,4 @@
%td
.new_line
=
link_to
raw
(
type
==
"old"
?
" "
:
line_new
)
,
"#
#{
line_code
}
"
,
id:
line_code
%td
.new_line
=
link_to
raw
(
type
==
"old"
?
" "
:
line_new
)
,
"#
#{
line_code
}
"
,
id:
line_code
%td
.line_content
{
class:
"noteable_line #{type} #{line_code}"
,
"line_code"
=>
line_code
}=
raw
diff_line_content
(
line
)
%td
.line_content
{
class:
"noteable_line #{type} #{line_code}"
,
"line_code"
=>
line_code
}=
raw
diff_line_content
(
line
)
-
else
-
else
%p
.nothing_here_message
No changes.
.nothing-here-block
No changes.
app/views/projects/edit_tree/show.html.haml
View file @
1ad174fb
%h3
.page-title
Edit mode
.file-editor
.file-editor
%ul
.nav.nav-tabs.js-edit-mode
%li
.active
=
link_to
'Edit'
,
'#editor'
%li
=
link_to
editing_preview_title
(
@blob
.
name
),
'#preview'
,
'data-preview-url'
=>
preview_project_edit_tree_path
(
@project
,
@id
)
=
form_tag
(
project_edit_tree_path
(
@project
,
@id
),
method: :put
,
class:
"form-horizontal"
)
do
=
form_tag
(
project_edit_tree_path
(
@project
,
@id
),
method: :put
,
class:
"form-horizontal"
)
do
.file-holder.file
.file-holder.file
.file-title
.file-title
.btn-group.js-edit-mode.left-options
=
link_to
'Edit'
,
'#editor'
,
class:
'active hover btn btn-tiny'
=
link_to
editing_preview_title
(
@blob
.
name
),
'#preview'
,
class:
'btn btn-tiny'
,
'data-preview-url'
=>
preview_project_edit_tree_path
(
@project
,
@id
)
%i
.icon-file
%i
.icon-file
%span
.file_name
%span
.file_name
%span
.monospace.light
#{
@ref
}
:
=
@path
=
@path
%small
on
%strong
=
@ref
%span
.options
%span
.options
.btn-group.tree-btn-group
.btn-group.tree-btn-group
=
link_to
"Cancel"
,
@after_edit_path
,
class:
"btn btn-tiny btn-cancel"
,
data:
{
confirm:
leave_edit_message
}
=
link_to
"Cancel"
,
@after_edit_path
,
class:
"btn btn-tiny btn-cancel"
,
data:
{
confirm:
leave_edit_message
}
.file-content.code
.file-content.code
%pre
.js-edit-mode-pane
#editor
=
@blob
.
data
%pre
.js-edit-mode-pane
#editor
=
@blob
.
data
.js-edit-mode-pane
#preview
.hide
.js-edit-mode-pane
#preview
.hide
%center
%h2
%i
.icon-spinner.icon-spin
.form-group.commit_message-group
.form-group.commit_message-group
=
label_tag
'commit_message'
,
class:
"control-label"
do
=
label_tag
'commit_message'
,
class:
"control-label"
do
...
@@ -61,14 +64,14 @@
...
@@ -61,14 +64,14 @@
paneId
=
currentLink
.
attr
(
'
href
'
),
paneId
=
currentLink
.
attr
(
'
href
'
),
currentPane
=
editModePanes
.
filter
(
paneId
);
currentPane
=
editModePanes
.
filter
(
paneId
);
editModeLinks
.
removeClass
(
'
active hover
'
);
editModeLinks
.
parent
().
removeClass
(
'
active hover
'
);
currentLink
.
addClass
(
'
active hover
'
);
currentLink
.
parent
().
addClass
(
'
active hover
'
);
editModePanes
.
hide
();
editModePanes
.
hide
();
if
(
paneId
==
'
#preview
'
)
{
if
(
paneId
==
'
#preview
'
)
{
currentPane
.
fadeIn
(
200
);
$
.
post
(
currentLink
.
data
(
'
preview-url
'
),
{
content
:
editor
.
getValue
()
},
function
(
response
)
{
$
.
post
(
currentLink
.
data
(
'
preview-url
'
),
{
content
:
editor
.
getValue
()
},
function
(
response
)
{
currentPane
.
empty
().
append
(
response
);
currentPane
.
empty
().
append
(
response
);
currentPane
.
fadeIn
(
200
);
})
})
}
else
{
}
else
{
currentPane
.
fadeIn
(
200
);
currentPane
.
fadeIn
(
200
);
...
...
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