1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 01:41:39 +00:00

[pdfjs] improved pdf view with pdfjs

This commit is contained in:
llj
2013-02-27 21:37:38 +08:00
parent db185f10df
commit 788e6376d3
3 changed files with 8 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by
RequestContext. RequestContext.
""" """
from settings import SEAFILE_VERSION, SITE_TITLE, SITE_NAME, SITE_BASE, \ from settings import SEAFILE_VERSION, SITE_TITLE, SITE_NAME, SITE_BASE, \
ENABLE_SIGNUP, MAX_FILE_NAME, USE_PDFJS ENABLE_SIGNUP, MAX_FILE_NAME
try: try:
from settings import BUSINESS_MODE from settings import BUSINESS_MODE
except ImportError: except ImportError:
@@ -37,6 +37,5 @@ def base(request):
'site_name': SITE_NAME, 'site_name': SITE_NAME,
'enable_signup': ENABLE_SIGNUP, 'enable_signup': ENABLE_SIGNUP,
'max_file_name': MAX_FILE_NAME, 'max_file_name': MAX_FILE_NAME,
'use_pdfjs': USE_PDFJS,
} }

View File

@@ -1590,6 +1590,9 @@ textarea:-moz-placeholder {/* for FF */
border-radius:3px; border-radius:3px;
-moz-border-radius:3px; -moz-border-radius:3px;
} }
#pdf-view {
max-width:950px;
}
#op-after-edit { #op-after-edit {
margin-top:.9em; margin-top:.9em;
} }

View File

@@ -1390,6 +1390,7 @@ def repo_view_file(request, repo_id):
'file_encoding_list':file_encoding_list, 'file_encoding_list':file_encoding_list,
'swf_exists': swf_exists, 'swf_exists': swf_exists,
'DOCUMENT_CONVERTOR_ROOT': DOCUMENT_CONVERTOR_ROOT, 'DOCUMENT_CONVERTOR_ROOT': DOCUMENT_CONVERTOR_ROOT,
'use_pdfjs':USE_PDFJS,
'page_from': page_from, 'page_from': page_from,
'basedir': basedir, 'basedir': basedir,
'days': days, 'days': days,
@@ -1474,6 +1475,7 @@ def repo_view_file(request, repo_id):
'comment_open':comment_open, 'comment_open':comment_open,
'swf_exists': swf_exists, 'swf_exists': swf_exists,
'DOCUMENT_CONVERTOR_ROOT': DOCUMENT_CONVERTOR_ROOT, 'DOCUMENT_CONVERTOR_ROOT': DOCUMENT_CONVERTOR_ROOT,
'use_pdfjs':USE_PDFJS,
'contributors': contributors, 'contributors': contributors,
'latest_contributor': latest_contributor, 'latest_contributor': latest_contributor,
'last_modified': last_modified, 'last_modified': last_modified,
@@ -2682,6 +2684,7 @@ def view_shared_file(request, token):
'file_encoding_list':file_encoding_list, 'file_encoding_list':file_encoding_list,
'swf_exists': swf_exists, 'swf_exists': swf_exists,
'DOCUMENT_CONVERTOR_ROOT': DOCUMENT_CONVERTOR_ROOT, 'DOCUMENT_CONVERTOR_ROOT': DOCUMENT_CONVERTOR_ROOT,
'use_pdfjs':USE_PDFJS,
}, context_instance=RequestContext(request)) }, context_instance=RequestContext(request))
def view_shared_dir(request, token): def view_shared_dir(request, token):
@@ -2789,6 +2792,7 @@ def view_file_via_shared_dir(request, token):
'file_encoding_list':file_encoding_list, 'file_encoding_list':file_encoding_list,
'swf_exists': swf_exists, 'swf_exists': swf_exists,
'DOCUMENT_CONVERTOR_ROOT': DOCUMENT_CONVERTOR_ROOT, 'DOCUMENT_CONVERTOR_ROOT': DOCUMENT_CONVERTOR_ROOT,
'use_pdfjs':USE_PDFJS,
'zipped': zipped, 'zipped': zipped,
'token': token, 'token': token,
}, context_instance=RequestContext(request)) }, context_instance=RequestContext(request))