Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
ea3035aa
Unverified
Commit
ea3035aa
authored
8 years ago
by
Roeland Jago Douma
Browse files
Options
Downloads
Patches
Plain Diff
Move JS inclusion to Controller
* This way we can easier load files conditionally
parent
3e00edff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/files_sharing/lib/Controllers/ShareController.php
+23
-0
23 additions, 0 deletions
apps/files_sharing/lib/Controllers/ShareController.php
apps/files_sharing/templates/public.php
+0
-20
0 additions, 20 deletions
apps/files_sharing/templates/public.php
with
23 additions
and
20 deletions
apps/files_sharing/lib/Controllers/ShareController.php
+
23
−
0
View file @
ea3035aa
...
...
@@ -353,6 +353,29 @@ class ShareController extends Controller {
$shareTmpl
[
'previewMaxX'
]
=
$this
->
config
->
getSystemValue
(
'preview_max_x'
,
1024
);
$shareTmpl
[
'previewMaxY'
]
=
$this
->
config
->
getSystemValue
(
'preview_max_y'
,
1024
);
// Load files we need
OCP\Util
::
addScript
(
'files'
,
'file-upload'
);
OCP\Util
::
addStyle
(
'files_sharing'
,
'public'
);
OCP\Util
::
addStyle
(
'files_sharing'
,
'mobile'
);
OCP\Util
::
addScript
(
'files_sharing'
,
'public'
);
OCP\Util
::
addScript
(
'files'
,
'fileactions'
);
OCP\Util
::
addScript
(
'files'
,
'fileactionsmenu'
);
OCP\Util
::
addScript
(
'files'
,
'jquery.fileupload'
);
OCP\Util
::
addScript
(
'files_sharing'
,
'files_drop'
);
if
(
isset
(
$shareTmpl
[
'folder'
]))
{
// JS required for folders
OCP\Util
::
addStyle
(
'files'
,
'files'
);
OCP\Util
::
addStyle
(
'files'
,
'upload'
);
OCP\Util
::
addScript
(
'files'
,
'filesummary'
);
OCP\Util
::
addScript
(
'files'
,
'breadcrumb'
);
OCP\Util
::
addScript
(
'files'
,
'fileinfomodel'
);
OCP\Util
::
addScript
(
'files'
,
'newfilemenu'
);
OCP\Util
::
addScript
(
'files'
,
'files'
);
OCP\Util
::
addScript
(
'files'
,
'filelist'
);
OCP\Util
::
addscript
(
'files'
,
'keyboardshortcuts'
);
}
$csp
=
new
OCP\AppFramework\Http\ContentSecurityPolicy
();
$csp
->
addAllowedFrameDomain
(
'\'self\''
);
$response
=
new
TemplateResponse
(
$this
->
appName
,
'public'
,
$shareTmpl
,
'base'
);
...
...
This diff is collapsed.
Click to expand it.
apps/files_sharing/templates/public.php
+
0
−
20
View file @
ea3035aa
<?php
/** @var $l OC_L10N */
/** @var $_ array */
OCP\Util
::
addScript
(
'files'
,
'file-upload'
);
OCP\Util
::
addStyle
(
'files_sharing'
,
'public'
);
OCP\Util
::
addStyle
(
'files_sharing'
,
'mobile'
);
OCP\Util
::
addScript
(
'files_sharing'
,
'public'
);
OCP\Util
::
addScript
(
'files'
,
'fileactions'
);
OCP\Util
::
addScript
(
'files'
,
'fileactionsmenu'
);
OCP\Util
::
addScript
(
'files'
,
'jquery.fileupload'
);
OCP\Util
::
addScript
(
'files_sharing'
,
'files_drop'
);
// JS required for folders
OCP\Util
::
addStyle
(
'files'
,
'files'
);
OCP\Util
::
addStyle
(
'files'
,
'upload'
);
OCP\Util
::
addScript
(
'files'
,
'filesummary'
);
OCP\Util
::
addScript
(
'files'
,
'breadcrumb'
);
OCP\Util
::
addScript
(
'files'
,
'fileinfomodel'
);
OCP\Util
::
addScript
(
'files'
,
'newfilemenu'
);
OCP\Util
::
addScript
(
'files'
,
'files'
);
OCP\Util
::
addScript
(
'files'
,
'filelist'
);
OCP\Util
::
addscript
(
'files'
,
'keyboardshortcuts'
);
?>
<?php
if
(
$_
[
'previewSupported'
])
:
/* This enables preview images for links (e.g. on Facebook, Google+, ...)*/
?>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment