1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 08:16:07 +00:00

Preview edit file (#2369)

* Revert "update share link permission (#2328)"

This reverts commit 6313e54dd7.

* update share link related UI

Download link(s) to Share link(s)

* update file api

add 'can_preview' and 'can_edit' fields

* update view file page

'invalid extension' to 'File preview unsupported'

* update share popup

1. send file detail request to check if can preview/edit file
2. show or hide share link permission according to api response
3. add tests for can_preview/edit_file func

* use FILEEXT_TYPE_MAP to check if can preview file
This commit is contained in:
lian
2018-09-14 18:13:25 +08:00
committed by zheng xie
parent 122254905d
commit c1d8b9024b
15 changed files with 549 additions and 94 deletions

View File

@@ -372,11 +372,9 @@ define([
this.hideMobileMenu();
var dir = this.dir,
obj_name = this.model.get('obj_name'),
can_preview = this.model.get('can_preview'),
dirent_path = Common.pathJoin([dir.path, obj_name]);
var options = {
'can_preview': can_preview,
'is_repo_owner': dir.is_repo_owner,
'is_virtual': dir.is_virtual,
'user_perm': this.model.get('perm'),