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
Boxiang Sun
gitlab-ce
Commits
46f48166
Commit
46f48166
authored
Sep 02, 2018
by
Paul Slaughter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor uploads_path to form data in wikis/edit
parent
bac9a1dd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
8 deletions
+3
-8
app/assets/javascripts/dropzone_input.js
app/assets/javascripts/dropzone_input.js
+1
-1
app/views/projects/wikis/_form.html.haml
app/views/projects/wikis/_form.html.haml
+1
-1
app/views/projects/wikis/edit.html.haml
app/views/projects/wikis/edit.html.haml
+1
-6
No files found.
app/assets/javascripts/dropzone_input.js
View file @
46f48166
...
@@ -18,7 +18,7 @@ export default function dropzoneInput(form) {
...
@@ -18,7 +18,7 @@ export default function dropzoneInput(form) {
const
$uploadingErrorContainer
=
form
.
find
(
'
.uploading-error-container
'
);
const
$uploadingErrorContainer
=
form
.
find
(
'
.uploading-error-container
'
);
const
$uploadingErrorMessage
=
form
.
find
(
'
.uploading-error-message
'
);
const
$uploadingErrorMessage
=
form
.
find
(
'
.uploading-error-message
'
);
const
$uploadingProgressContainer
=
form
.
find
(
'
.uploading-progress-container
'
);
const
$uploadingProgressContainer
=
form
.
find
(
'
.uploading-progress-container
'
);
const
uploadsPath
=
window
.
uploads_path
||
null
;
const
uploadsPath
=
form
.
data
(
'
uploads-path
'
)
||
window
.
uploads_path
||
null
;
const
maxFileSize
=
gon
.
max_file_size
||
10
;
const
maxFileSize
=
gon
.
max_file_size
||
10
;
const
formTextarea
=
form
.
find
(
'
.js-gfm-input
'
);
const
formTextarea
=
form
.
find
(
'
.js-gfm-input
'
);
let
handlePaste
;
let
handlePaste
;
...
...
app/views/projects/wikis/_form.html.haml
View file @
46f48166
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@page
],
method:
@page
.
persisted?
?
:put
:
:post
,
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@page
],
method:
@page
.
persisted?
?
:put
:
:post
,
html:
{
class:
'wiki-form common-note-form prepend-top-default js-quick-submit'
},
html:
{
class:
'wiki-form common-note-form prepend-top-default js-quick-submit'
},
data:
{
markdown_version:
markdown_version
}
do
|
f
|
data:
{
markdown_version:
markdown_version
,
uploads_path:
uploads_path
}
do
|
f
|
=
form_errors
(
@page
)
=
form_errors
(
@page
)
-
if
@page
.
persisted?
-
if
@page
.
persisted?
...
...
app/views/projects/wikis/edit.html.haml
View file @
46f48166
...
@@ -36,13 +36,8 @@
...
@@ -36,13 +36,8 @@
type:
'button'
}
type:
'button'
}
=
_
(
'Delete'
)
=
_
(
'Delete'
)
=
render
'form'
=
render
'form'
,
uploads_path:
wiki_attachment_upload_url
=
render
'sidebar'
=
render
'sidebar'
#delete-wiki-modal
.modal.fade
#delete-wiki-modal
.modal.fade
-
content_for
:scripts_body
do
-# haml-lint:disable InlineJavaScript
:javascript
window
.
uploads_path
=
"
#{
wiki_attachment_upload_url
}
"
;
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