Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo
Commits
a45d534a
Commit
a45d534a
authored
Nov 27, 2016
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🍶
#12224
parent
fcad963f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
src/main/webapp/admin-article.ftl
src/main/webapp/admin-article.ftl
+1
-1
src/main/webapp/css/default-admin.css
src/main/webapp/css/default-admin.css
+4
-0
src/main/webapp/js/admin/article.js
src/main/webapp/js/admin/article.js
+5
-2
No files found.
src/main/webapp/admin-article.ftl
View file @
a45d534a
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<div>
<div>
<label>${uploadFileLabel}</label>
<label>${uploadFileLabel}</label>
<form id="articleUpload" method="POST" enctype="multipart/form-data">
<form id="articleUpload" method="POST" enctype="multipart/form-data">
<input type="file" name="file" multiple=""/>
<input type="file" name="file" multiple=""/>
<span></span>
</form>
</form>
</div>
</div>
<div>
<div>
...
...
src/main/webapp/css/default-admin.css
View file @
a45d534a
...
@@ -716,6 +716,10 @@ a[class*=" icon-"]:hover {
...
@@ -716,6 +716,10 @@ a[class*=" icon-"]:hover {
/* end comments */
/* end comments */
/* start article */
/* start article */
#articleUpload
input
{
width
:
170px
;
}
button
#submitArticle
,
button
#submitArticle
,
#unSubmitArticle
{
#unSubmitArticle
{
background-color
:
#fa8564
;
background-color
:
#fa8564
;
...
...
src/main/webapp/js/admin/article.js
View file @
a45d534a
...
@@ -449,6 +449,8 @@ admin.article = {
...
@@ -449,6 +449,8 @@ admin.article = {
filename
=
data
.
files
[
0
].
name
;
filename
=
data
.
files
[
0
].
name
;
data
.
submit
();
data
.
submit
();
$
(
'
#articleUpload span
'
).
text
(
'
uploading...
'
);
},
},
formData
:
function
(
form
)
{
formData
:
function
(
form
)
{
var
data
=
form
.
serializeArray
();
var
data
=
form
.
serializeArray
();
...
@@ -460,6 +462,7 @@ admin.article = {
...
@@ -460,6 +462,7 @@ admin.article = {
return
data
;
return
data
;
},
},
done
:
function
(
e
,
data
)
{
done
:
function
(
e
,
data
)
{
$
(
'
#articleUpload span
'
).
text
(
''
);
var
qiniuKey
=
data
.
result
.
key
;
var
qiniuKey
=
data
.
result
.
key
;
if
(
!
qiniuKey
)
{
if
(
!
qiniuKey
)
{
alert
(
"
Upload error, please check Qiniu configurations
"
);
alert
(
"
Upload error, please check Qiniu configurations
"
);
...
@@ -467,11 +470,11 @@ admin.article = {
...
@@ -467,11 +470,11 @@ admin.article = {
return
;
return
;
}
}
$
(
'
#articleUpload
'
).
after
(
'
<div
id="uploadContent">.
after
(
'
<div
>![
'
+
data
.
files
[
0
].
name
+
'
](http://
'
+
qiniu
.
qiniuDomain
+
qiniuKey
+
'
)</div>
'
);
+
qiniu
.
qiniuDomain
+
qiniuKey
+
'
)</div>
'
);
},
},
fail
:
function
(
e
,
data
)
{
fail
:
function
(
e
,
data
)
{
aler
t
(
"
Upload error, please check Qiniu configurations [
"
+
data
.
errorThrown
+
"
]
"
);
$
(
'
#articleUpload span
'
).
tex
t
(
"
Upload error, please check Qiniu configurations [
"
+
data
.
errorThrown
+
"
]
"
);
}
}
}).
on
(
'
fileuploadprocessalways
'
,
function
(
e
,
data
)
{
}).
on
(
'
fileuploadprocessalways
'
,
function
(
e
,
data
)
{
var
currentFile
=
data
.
files
[
data
.
index
];
var
currentFile
=
data
.
files
[
data
.
index
];
...
...
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