Browse Source
Default state to collapsed and fixed code styling
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pull/10176/head
John Molakvoæ (skjnldsv)
7 years ago
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
3 changed files with
6 additions and
11 deletions
-
apps/files/lib/Controller/ApiController.php
-
apps/files/lib/Controller/ViewController.php
-
apps/files/templates/appnavigation.php
|
|
|
@ -313,7 +313,7 @@ class ApiController extends Controller { |
|
|
|
*/ |
|
|
|
public function getShowQuickAccess() { |
|
|
|
|
|
|
|
return $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_Quick_Access', 1); |
|
|
|
return $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_Quick_Access', 0); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
@ -202,16 +202,11 @@ class ViewController extends Controller { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$defaultExpandedState = 'true'; |
|
|
|
if (!$this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_Quick_Access', 1)) { |
|
|
|
$defaultExpandedState = 'false'; |
|
|
|
} |
|
|
|
// show_Quick_Access stored as string
|
|
|
|
$defaultExpandedState = $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_Quick_Access', '0') === '1'; |
|
|
|
|
|
|
|
$quickAccessDraggable = 'false'; |
|
|
|
//See Javascript navigation.js for possible sorting strategies
|
|
|
|
if($this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'quickaccess_sorting_strategy', 'alphabet')=='customorder'){ |
|
|
|
$quickAccessDraggable = 'true'; |
|
|
|
} |
|
|
|
// see Javascript navigation.js for possible sorting strategies
|
|
|
|
$quickAccessDraggable = $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'quickaccess_sorting_strategy', 'alphabet') === 'customorder'; |
|
|
|
|
|
|
|
|
|
|
|
\OCA\Files\App::getNavigationManager()->add( |
|
|
|
|
|
|
|
@ -68,7 +68,7 @@ function NavigationListElements($item, $l, $pinned) { |
|
|
|
?>
|
|
|
|
<li <?php if (isset($item['sublist'])){ ?>id="button-collapse-parent-<?php p($item['id']); ?>"<?php } ?>
|
|
|
|
data-id="<?php p(isset($item['href']) ? $item['href'] : $item['id']) ?> " |
|
|
|
class="nav-<?php p($item['id']) ?> <?php p($item['classes']) ?> <?php p($pinned === 1 ? 'first-pinned' : '') ?> <?php if ($item['defaultExpandedState'] === 'true') { ?> open<?php } ?>" |
|
|
|
class="nav-<?php p($item['id']) ?> <?php p($item['classes']) ?> <?php p($pinned === 1 ? 'first-pinned' : '') ?> <?php if ($item['defaultExpandedState']) { ?> open<?php } ?>" |
|
|
|
<?php if (isset($item['folderPosition'])) { ?> folderposition="<?php p($item['folderPosition']); ?>" <?php } ?>>
|
|
|
|
|
|
|
|
<a href="<?php p(isset($item['href']) ? $item['href'] : '#') ?>" |
|
|
|
|