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
3de09d14
Commit
3de09d14
authored
Apr 05, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated all GFM forms to use new GLForm class
parent
d67c3e35
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
37 deletions
+20
-37
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+3
-3
app/assets/stylesheets/framework/gfm.scss
app/assets/stylesheets/framework/gfm.scss
+0
-18
app/views/projects/_zen.html.haml
app/views/projects/_zen.html.haml
+2
-2
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/releases/edit.html.haml
app/views/projects/releases/edit.html.haml
+6
-6
app/views/projects/tags/new.html.haml
app/views/projects/tags/new.html.haml
+3
-3
app/views/projects/wikis/_form.html.haml
app/views/projects/wikis/_form.html.haml
+2
-2
app/views/shared/issuable/_form.html.haml
app/views/shared/issuable/_form.html.haml
+2
-1
No files found.
app/assets/javascripts/dispatcher.js.coffee
View file @
3de09d14
...
...
@@ -44,10 +44,10 @@ class Dispatcher
new
IssuableForm
(
$
(
'.merge-request-form'
))
when
'projects:tags:new'
new
ZenMode
()
new
DropzoneInput
(
$
(
'.tag-form'
))
new
GLForm
(
$
(
'.tag-form'
))
when
'projects:releases:edit'
new
ZenMode
()
new
DropzoneInput
(
$
(
'.release-form'
))
new
GLForm
(
$
(
'.release-form'
))
when
'projects:merge_requests:show'
new
Diff
()
shortcut_handler
=
new
ShortcutsIssuable
(
true
)
...
...
@@ -137,7 +137,7 @@ class Dispatcher
new
Wikis
()
shortcut_handler
=
new
ShortcutsNavigation
()
new
ZenMode
()
new
DropzoneInput
(
$
(
'.wiki-form'
))
new
GLForm
(
$
(
'.wiki-form'
))
when
'snippets'
shortcut_handler
=
new
ShortcutsNavigation
()
new
ZenMode
()
if
path
[
2
]
==
'show'
...
...
app/assets/stylesheets/framework/gfm.scss
View file @
3de09d14
/**
* Styles that apply to all GFM related forms.
*/
.issue-form
,
.merge-request-form
,
.wiki-form
{
.description
{
height
:
16em
;
border-top-left-radius
:
0
;
}
}
.wiki-form
{
.description
{
height
:
26em
;
}
}
.milestone-form
{
.description
{
height
:
14em
;
}
}
.gfm-commit
,
.gfm-commit_range
{
font-family
:
$monospace_font
;
...
...
app/views/projects/_zen.html.haml
View file @
3de09d14
.zen-backdrop
-
classes
<<
' js-gfm-input js-autosize markdown-area'
-
if
defined?
(
f
)
&&
f
=
f
.
text_area
attr
,
class:
classes
,
placeholder:
"Write a comment or drag your files here..."
=
f
.
text_area
attr
,
class:
classes
,
placeholder:
placeholder
-
else
=
text_area_tag
attr
,
nil
,
class:
classes
,
placeholder:
"Write a comment or drag your files here..."
=
text_area_tag
attr
,
nil
,
class:
classes
,
placeholder:
placeholder
%a
.zen-cotrol.zen-control-leave.js-zen-leave
{
href:
"#"
}
=
icon
(
'compress'
)
app/views/projects/notes/_edit_form.html.haml
View file @
3de09d14
...
...
@@ -2,7 +2,7 @@
=
form_for
note
,
url:
namespace_project_note_path
(
@project
.
namespace
,
@project
,
note
),
method: :put
,
remote:
true
,
authenticity_token:
true
,
html:
{
class:
'edit-note common-note-form js-quick-submit'
}
do
|
f
|
=
note_target_fields
(
note
)
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
'md-preview'
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :note
,
classes:
'note-textarea js-note-text js-task-list-field'
=
render
'projects/zen'
,
f:
f
,
attr: :note
,
classes:
'note-textarea js-note-text js-task-list-field'
,
placeholder:
"Write a comment or drag your files here..."
=
render
'projects/notes/hints'
.note-form-actions.clearfix
...
...
app/views/projects/notes/_form.html.haml
View file @
3de09d14
...
...
@@ -8,7 +8,7 @@
=
f
.
hidden_field
:noteable_type
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"md-preview"
,
referenced_users:
true
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :note
,
classes:
'note-textarea js-note-text'
=
render
'projects/zen'
,
f:
f
,
attr: :note
,
classes:
'note-textarea js-note-text'
,
placeholder:
"Write a comment or drag your files here..."
=
render
'projects/notes/hints'
.error-alert
...
...
app/views/projects/releases/edit.html.haml
View file @
3de09d14
...
...
@@ -9,11 +9,11 @@
%strong
#{
@tag
.
name
}
.prepend-top-default
=
form_for
(
@release
,
method: :put
,
url:
namespace_project_tag_release_path
(
@project
.
namespace
,
@project
,
@tag
.
name
),
html:
{
class:
'form-horizontal
gfm
-form release-form js-quick-submit'
})
do
|
f
|
=
form_for
(
@release
,
method: :put
,
url:
namespace_project_tag_release_path
(
@project
.
namespace
,
@project
,
@tag
.
name
),
html:
{
class:
'form-horizontal
common-note
-form release-form js-quick-submit'
})
do
|
f
|
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"md-preview"
,
referenced_users:
true
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
classes:
'
description form-control'
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
classes:
'
note-textarea'
,
placeholder:
"Write your release notes or drag files here..."
=
render
'projects/notes/hints'
.error-alert
.form-actions.prepend-top-default
=
f
.
submit
'Save changes'
,
class:
'btn btn-save'
=
link_to
"Cancel"
,
namespace_project_tag_path
(
@project
.
namespace
,
@project
,
@tag
.
name
),
class:
"btn btn-default btn-cancel"
.error-alert
.form-actions.prepend-top-default
=
f
.
submit
'Save changes'
,
class:
'btn btn-save'
=
link_to
"Cancel"
,
namespace_project_tag_path
(
@project
.
namespace
,
@project
,
@tag
.
name
),
class:
"btn btn-default btn-cancel"
app/views/projects/tags/new.html.haml
View file @
3de09d14
...
...
@@ -10,7 +10,7 @@
New Tag
%hr
=
form_tag
namespace_project_tags_path
,
method: :post
,
id:
"new-tag-form"
,
class:
"form-horizontal
gfm
-form tag-form js-quick-submit js-requires-input"
do
=
form_tag
namespace_project_tags_path
,
method: :post
,
id:
"new-tag-form"
,
class:
"form-horizontal
common-note
-form tag-form js-quick-submit js-requires-input"
do
.form-group
=
label_tag
:tag_name
,
nil
,
class:
'control-label'
.col-sm-10
...
...
@@ -30,9 +30,9 @@
=
label_tag
:release_description
,
'Release notes'
,
class:
'control-label'
.col-sm-10
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"md-preview"
,
referenced_users:
true
}
do
=
render
'projects/zen'
,
attr: :release_description
,
classes:
'
description form-control'
=
render
'projects/zen'
,
attr: :release_description
,
classes:
'
note-textarea'
,
placeholder:
"Write your release notes or drag files here..."
=
render
'projects/notes/hints'
.help-block
Optionally, add release notes to the tag. They will be stored in the GitLab database and displayed on the tags page.
.help-block
Optionally, add release notes to the tag. They will be stored in the GitLab database and displayed on the tags page.
.form-actions
=
button_tag
'Create tag'
,
class:
'btn btn-create'
,
tabindex:
3
=
link_to
'Cancel'
,
namespace_project_tags_path
(
@project
.
namespace
,
@project
),
class:
'btn btn-cancel'
...
...
app/views/projects/wikis/_form.html.haml
View file @
3de09d14
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@page
],
method:
@page
.
persisted?
?
:put
:
:post
,
html:
{
class:
'form-horizontal wiki-form
gfm
-form prepend-top-default js-quick-submit'
}
do
|
f
|
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@page
],
method:
@page
.
persisted?
?
:put
:
:post
,
html:
{
class:
'form-horizontal wiki-form
common-note
-form prepend-top-default js-quick-submit'
}
do
|
f
|
=
form_errors
(
@page
)
=
f
.
hidden_field
:title
,
value:
@page
.
title
...
...
@@ -11,7 +11,7 @@
=
f
.
label
:content
,
class:
'control-label'
.col-sm-10
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"md-preview"
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :content
,
classes:
'
description form-control
'
=
render
'projects/zen'
,
f:
f
,
attr: :content
,
classes:
'
note-textarea'
,
placeholder:
'Write your content or drag files here...
'
=
render
'projects/notes/hints'
.clearfix
...
...
app/views/shared/issuable/_form.html.haml
View file @
3de09d14
...
...
@@ -29,7 +29,8 @@
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"md-preview"
,
referenced_users:
true
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
classes:
'note-textarea'
classes:
'note-textarea'
,
placeholder:
"Write a comment or drag your files here..."
=
render
'projects/notes/hints'
.clearfix
.error-alert
...
...
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