Public fixes, request & default to grid

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-10-23 08:43:02 +02:00
parent 8652ada561
commit e0dde083d0
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF
2 changed files with 7 additions and 3 deletions

View file

@ -599,9 +599,12 @@
*/
_onGridviewChange: function() {
var show = this.$showGridView.is(':checked');
$.post(OC.generateUrl('/apps/files/api/v1/showgridview'), {
show: show
});
// only save state if user is logged in
if (OC.currentUser) {
$.post(OC.generateUrl('/apps/files/api/v1/showgridview'), {
show: show
});
}
this.$showGridView.next('#view-toggle')
.removeClass('icon-toggle-filelist icon-toggle-pictures')
.addClass(show ? 'icon-toggle-filelist' : 'icon-toggle-pictures')

View file

@ -338,6 +338,7 @@ class ShareController extends AuthPublicShareController {
$folder->assign('isPublic', true);
$folder->assign('hideFileList', $hideFileList);
$folder->assign('publicUploadEnabled', 'no');
$folder->assign('showgridview', true);
$folder->assign('uploadMaxFilesize', $maxUploadFilesize);
$folder->assign('uploadMaxHumanFilesize', \OCP\Util::humanFileSize($maxUploadFilesize));
$folder->assign('freeSpace', $freeSpace);