Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
ops
coco
Commits
62007ba0
Commit
62007ba0
authored
Sep 29, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改背景色
parent
278a4200
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
14 deletions
+9
-14
sftp.py
coco/httpd/elfinder/volumes/sftp.py
+1
-12
theme-gray.css
coco/httpd/static/plugins/elfinder/css/theme-gray.css
+7
-1
elfinder.zh_CN.js
coco/httpd/static/plugins/elfinder/i18n/elfinder.zh_CN.js
+1
-1
No files found.
coco/httpd/elfinder/volumes/sftp.py
View file @
62007ba0
import
stat
import
threading
import
tempfile
from
flask
import
send_file
import
requests
...
...
@@ -231,17 +230,7 @@ class SFTPVolume(BaseVolume):
return
target
def
upload_as_url
(
self
,
url
,
parent
):
added
=
[]
parent_path
=
self
.
_path
(
parent
)
path
=
self
.
_join
(
parent_path
,
self
.
_base_name
(
url
))
remote_path
=
self
.
_remote_path
(
path
)
r
=
requests
.
get
(
url
,
stream
=
True
)
with
self
.
sftp
.
open
(
remote_path
,
'w'
)
as
rf
:
for
chunk
in
r
.
iter_content
(
chunk_size
=
1024
):
if
chunk
:
# filter out keep-alive new chunks
rf
.
write
(
chunk
)
added
.
append
(
self
.
_info
(
path
))
return
{
'added'
:
added
}
raise
PermissionError
(
"Not support upload from url"
)
def
upload
(
self
,
files
,
parent
):
""" For now, this uses a very naive way of storing files - the entire
...
...
coco/httpd/static/plugins/elfinder/css/theme-gray.css
View file @
62007ba0
...
...
@@ -1528,9 +1528,15 @@ a.ui-button:active .ui-icon,
.std42-dialog
.ui-dialog-titlebar
.elfinder-titlebar-minimize
:hover
.ui-icon
{
background-color
:
#ff9800
;
}
.elfinder-dialog-title
{
.elfinder-dialog-title
{
color
:
#f1f1f1
;
}
.ui-dialog-buttonpane
{
background
:
#fff
;
}
.std42-dialog
.ui-dialog-content
{
background
:
#fff
;
}
...
...
coco/httpd/static/plugins/elfinder/i18n/elfinder.zh_CN.js
View file @
62007ba0
...
...
@@ -375,7 +375,7 @@
'pass'
:
'密码'
,
// added 18.04.2012
'confirmUnmount'
:
'确实要卸载 $1?'
,
// from v2.1 added 30.04.2012
'dropFilesBrowser'
:
'从浏览器中拖放或粘贴文件'
,
// from v2.1 added 30.05.2012
'dropPasteFiles'
:
'拖放文件,
粘贴网址或
剪贴板图像'
,
// from v2.1 added 07.04.2014
'dropPasteFiles'
:
'拖放文件,
或粘贴
剪贴板图像'
,
// from v2.1 added 07.04.2014
'encoding'
:
'编码'
,
// from v2.1 added 19.12.2014
'locale'
:
'语言环境'
,
// from v2.1 added 19.12.2014
'searchTarget'
:
'目标: $1'
,
// from v2.1 added 22.5.2015
...
...
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