Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/files/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
// TODO: ideally these should be in a separate class / app (the embedded "all files" app)
this.fileList = new OCA.Files.FileList(
$('#app-content-files'), {
scrollContainer: $('#app-content'),
dragOptions: dragOptions,
folderDropOptions: folderDropOptions,
fileActions: fileActions,
Expand Down
1 change: 0 additions & 1 deletion apps/files/js/favoritesplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
return new OCA.Files.FavoritesFileList(
$el, {
fileActions: fileActions,
scrollContainer: $('#app-content')
}
);
},
Expand Down
1 change: 0 additions & 1 deletion apps/files/js/recentplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
return new OCA.Files.RecentFileList(
$el, {
fileActions: fileActions,
scrollContainer: $('#app-content')
}
);
},
Expand Down
63 changes: 63 additions & 0 deletions apps/files/tests/Controller/ViewControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,49 @@ public function testIndexWithRegularBrowser() {
'type' => 'link',
'classes' => 'pinned',
],
'shareoverview' => [
'id' => 'shareoverview',
'appname' => 'files_sharing',
'script' => 'list.php',
'order' => 18,
'name' => \OC::$server->getL10N('files_sharing')->t('Shares'),
'classes' => 'collapsible',
'sublist' => [
[
'id' => 'sharingout',
'appname' => 'files_sharing',
'script' => 'list.php',
'order' => 16,
'name' => \OC::$server->getL10N('files_sharing')->t('Shared with others'),
],
[
'id' => 'sharingin',
'appname' => 'files_sharing',
'script' => 'list.php',
'order' => 15,
'name' => \OC::$server->getL10N('files_sharing')->t('Shared with you'),
],
[
'id' => 'sharinglinks',
'appname' => 'files_sharing',
'script' => 'list.php',
'order' => 17,
'name' => \OC::$server->getL10N('files_sharing')->t('Shared by link', []),
],
[
'id' => 'deletedshares',
'appname' => 'files_sharing',
'script' => 'list.php',
'order' => 19,
'name' => \OC::$server->getL10N('files_sharing')->t('Deleted shares'),
],
],
'active' => false,
'icon' => '',
'type' => 'link',
'expandedState' => 'show_sharing_menu',
'defaultExpandedState' => false,
]
]);

$expected = new Http\TemplateResponse(
Expand Down Expand Up @@ -240,6 +283,26 @@ public function testIndexWithRegularBrowser() {
'id' => 'trashbin',
'content' => null,
],
'sharingout' => [
'id' => 'sharingout',
'content' => null,
],
'sharingin' => [
'id' => 'sharingin',
'content' => null,
],
'sharinglinks' => [
'id' => 'sharinglinks',
'content' => null,
],
'deletedshares' => [
'id' => 'deletedshares',
'content' => null,
],
'shareoverview' => [
'id' => 'shareoverview',
'content' => null,
],
],
'hiddenFields' => [],
]
Expand Down
1 change: 0 additions & 1 deletion apps/files_external/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ OCA.External.App = {
this.fileList = new OCA.External.FileList(
$el,
{
scrollContainer: $('#app-content'),
fileActions: this._createFileActions()
}
);
Expand Down
5 changes: 0 additions & 5 deletions apps/files_sharing/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ OCA.Sharing.App = {
$el,
{
id: 'shares.self',
scrollContainer: $('#app-content'),
sharedWithUser: true,
fileActions: this._createFileActions(),
config: OCA.Files.App.getFilesConfig()
Expand All @@ -55,7 +54,6 @@ OCA.Sharing.App = {
$el,
{
id: 'shares.others',
scrollContainer: $('#app-content'),
sharedWithUser: false,
fileActions: this._createFileActions(),
config: OCA.Files.App.getFilesConfig()
Expand All @@ -78,7 +76,6 @@ OCA.Sharing.App = {
$el,
{
id: 'shares.link',
scrollContainer: $('#app-content'),
linksOnly: true,
fileActions: this._createFileActions(),
config: OCA.Files.App.getFilesConfig()
Expand All @@ -101,7 +98,6 @@ OCA.Sharing.App = {
$el,
{
id: 'shares.deleted',
scrollContainer: $('#app-content'),
showDeleted: true,
sharedWithUser: true,
fileActions: this._restoreShareAction(),
Expand All @@ -125,7 +121,6 @@ OCA.Sharing.App = {
$el,
{
id: 'shares.overview',
scrollContainer: $('#app-content'),
config: OCA.Files.App.getFilesConfig(),
isOverview: true
}
Expand Down
1 change: 0 additions & 1 deletion apps/files_sharing/js/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ OCA.Sharing.PublicApp = {
$el,
{
id: 'files.public',
scrollContainer: $('#app-content'),
dragOptions: dragOptions,
folderDropOptions: folderDropOptions,
fileActions: fileActions,
Expand Down
3 changes: 2 additions & 1 deletion apps/files_sharing/templates/public.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @var $l \OCP\IL10N */
/** @var $_ array */
?>

<div id="app-content">
<?php if ($_['previewSupported']): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?>
<link rel="image_src" href="<?php p($_['previewImage']); ?>" />
<?php endif; ?>
Expand Down Expand Up @@ -90,3 +90,4 @@
data-url="<?php p(\OC::$server->getURLGenerator()->linkTo('files', 'ajax/upload.php')); ?>" />
</div>
<?php endif; ?>
</div>
1 change: 0 additions & 1 deletion apps/files_trashbin/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ OCA.Trashbin.App = {
var urlParams = OC.Util.History.parseUrlQuery();
this.fileList = new OCA.Trashbin.FileList(
$('#app-content-trashbin'), {
scrollContainer: $('#app-content'),
fileActions: this._createFileActions(),
detailsViewEnabled: false,
scrollTo: urlParams.scrollto,
Expand Down
1 change: 0 additions & 1 deletion apps/systemtags/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
$el,
{
id: 'systemtags',
scrollContainer: $('#app-content'),
fileActions: this._createFileActions(),
config: OCA.Files.App.getFilesConfig()
}
Expand Down
28 changes: 21 additions & 7 deletions core/css/apps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ kbd {
/* Navigation: folder like structure */
#app-navigation {
width: $navigation-width;
position: sticky;
position: fixed;
top: $header-height;
left: 0;
z-index: 1500;
z-index: 500;
overflow-y: auto;
overflow-x: hidden;
height: calc(100vh - #{$header-height});
// Do not use vh because of mobile headers
// are included in the calculation
height: calc(100% - #{$header-height});
box-sizing: border-box;
background-color: var(--color-main-background);
-webkit-user-select: none;
Expand Down Expand Up @@ -170,6 +172,7 @@ kbd {
> ul {
opacity: 0;
max-height: 0;
overflow-y: hidden;
/* bezier override the hide/slow effect due to the 2000 max-height */
transition: max-height 1000ms cubic-bezier(0, 1, 0, 1),
opacity 250ms ease-in-out;
Expand Down Expand Up @@ -523,7 +526,7 @@ kbd {
.app-navigation-entry-deleted {
display: inline-flex;
padding-left: 44px;
transform: translateX(250px);
transform: translateX(#{$navigation-width});
.app-navigation-entry-deleted-description {
position: relative;
white-space: nowrap;
Expand Down Expand Up @@ -580,12 +583,19 @@ kbd {


/* CONTENT --------------------------------------------------------- */
#content-wrapper {
// everything not related to content but needs to be on the window
// goes here (popups, tooltips...)
position: relative;
min-height: 100%;
display: unset;
}
#content {
/* header height */
padding-top: $header-height;
box-sizing: border-box;
position: relative;
display: flex;
margin-top: $header-height;
min-height: 100%;
}

/* APP-CONTENT AND WRAPPER ------------------------------------------ */
Expand All @@ -594,9 +604,13 @@ kbd {
z-index: 1000;
background-color: var(--color-main-background);
position: relative;
min-height: calc(100vh - #{$header-height});
min-height: 100%;
flex-basis: 100vw;
overflow: auto;
/* margin if navigation element is here */
#app-navigation + & {
margin-left: $navigation-width;
}
/* no top border for first settings item */
> .section:first-child {
border-top: none;
Expand Down
3 changes: 1 addition & 2 deletions core/css/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
display: inline-flex;
position: fixed;
top: 0;
left: 0;
right: 0;
width: 100%;
z-index: 2000;
height: $header-height;
background-color: var(--color-primary);
Expand Down
1 change: 0 additions & 1 deletion core/css/ie.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

#app-navigation,
#app-sidebar {
position: fixed !important;
}
Expand Down
6 changes: 3 additions & 3 deletions core/css/mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@

/* APP SIDEBAR TOGGLE and SWIPE ----------------------------------------------*/
#app-navigation {
transform: translateX(-250px);
transform: translateX(-#{$navigation-width});
}
.snapjs-left {
#app-navigation {
transform: translateX(0);
}
}

#app-content {
margin-left: -$navigation-width;
#app-navigation + #app-content {
margin-left: 0;
}


Expand Down
15 changes: 15 additions & 0 deletions core/css/public.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,19 @@
.ie #content {
display: inline-block;
}


p.info {
margin: 20px auto;
text-shadow: 0 0 2px rgba(0, 0, 0, .4);
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
p.info, form fieldset legend,
#datadirContent label,
form fieldset .warning-info,
form input[type='checkbox']+label {
text-align: center;
}
}
1 change: 0 additions & 1 deletion core/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ body {
line-height: 1.6em;
font-family: var(--font-face);
color: var(--color-main-text);
height: auto;
}

.two-factor-header {
Expand Down
2 changes: 1 addition & 1 deletion core/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@ function initCore() {
var snapper = new Snap({
element: document.getElementById('app-content'),
disable: 'right',
maxPosition: 250,
maxPosition: 300, // $navigation-width
minDragDistance: 100
});
$('#app-content').prepend('<div id="app-navigation-toggle" class="icon-menu" style="display:none;"></div>');
Expand Down
6 changes: 5 additions & 1 deletion core/templates/layout.base.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
</head>
<body id="body-public">
<?php include 'layout.noscript.warning.php'; ?>
<?php print_unescaped($_['content']); ?>
<div id="content-wrapper">
<div id="content" class="app-public" role="main">
<?php print_unescaped($_['content']); ?>
</div>
</div>
</body>
</html>
8 changes: 5 additions & 3 deletions core/templates/layout.public.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@
</div>
<?php } ?>
</header>
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
<?php print_unescaped($_['content']); ?>
</div>
<div id="content-wrapper">
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
<?php print_unescaped($_['content']); ?>
</div>
</div
<?php if($template->getFooterVisible()) { ?>
<footer>
<p class="info"><?php print_unescaped($theme->getLongFooter()); ?></p>
Expand Down
14 changes: 12 additions & 2 deletions tests/acceptance/features/bootstrap/SettingsMenuContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,26 @@ class SettingsMenuContext implements Context, ActorAwareInterface {
/**
* @return Locator
*/
public static function settingsMenuButton() {
public static function settingsSectionInHeader() {
return Locator::forThe()->xpath("//*[@id = 'header']//*[@id = 'settings']")->
describedAs("Settings menu section in the header");
}

/**
* @return Locator
*/
public static function settingsMenuButton() {
return Locator::forThe()->id("expand")->
descendantOf(self::settingsSectionInHeader())->
describedAs("Settings menu button");
}

/**
* @return Locator
*/
public static function settingsMenu() {
return Locator::forThe()->id("expanddiv")->descendantOf(self::settingsMenuButton())->
return Locator::forThe()->id("expanddiv")->
descendantOf(self::settingsSectionInHeader())->
describedAs("Settings menu");
}

Expand Down