Rename "#app" to "#app-content"

The standard layout in the server uses "#app-navigation",
"#app-content" and "#app-sidebar" as children of "#content"; the
navigation and sidebar are not needed, so "#app" is simply renamed to
"#app-content".

Also note that "#controls" is already the first child of "#app-content",
so there is no need to prepend it. In a similar way there are standard
CSS rules defined in the server for "#controls" as a child of
"#app-content", so no special rules need to be defined here.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2018-08-03 22:01:04 +02:00
parent 59827e3785
commit 287741123a
7 changed files with 10 additions and 20 deletions

View File

@ -35,9 +35,9 @@
right: 17px;
top: 18px;
}
#app #dropdown.shareDropDown .shareWithLoading {
/* The "box-sizing" of "#app" descendants is set to "border-box" in the
* server. To have the same size the padding here has to be set to the
#app-content #dropdown.shareDropDown .shareWithLoading {
/* The "box-sizing" of "#app-content" descendants is set to "border-box" in
* the server. To have the same size the padding here has to be set to the
* min-width/min-height plus the padding set for the icon in the default
* "content-box" sizing. */
padding: 19px;
@ -52,9 +52,9 @@
top: 18px;
}
#app #dropdown .shareWithConfirm {
/* The "box-sizing" of "#app" descendants is set to "border-box" in the
* server. To have the same size the padding here has to be set to the
#app-content #dropdown .shareWithConfirm {
/* The "box-sizing" of "#app-content" descendants is set to "border-box" in
* the server. To have the same size the padding here has to be set to the
* min-width/min-height plus the padding set for the icon in the default
* "content-box" sizing. */
padding: 19px;

View File

@ -78,15 +78,6 @@ div.crumb.last a {
list-style: initial;
}
#app {
/* #app is the parent of #controls and #gallery, and #controls uses a sticky
* position, so the #app height must contain the full gallery for the
* controls to be stuck while scrolling. The server sets "height: 100%" for
* the app, so that value has to be overriden. */
height: auto;
width: 100%;
}
#gallery.hascontrols {
position: relative;
overflow: hidden;

View File

@ -12,7 +12,6 @@
/* global OC, $, _, Gallery, SlideShow */
$(document).ready(function () {
"use strict";
$('#controls').prependTo($('#app'));
Gallery.utility = new Gallery.Utility();
Gallery.view = new Gallery.View();
Gallery.token = Gallery.utility.getPublicToken();

View File

@ -133,7 +133,7 @@
*/
_build: function () {
var i, crumbs, name, path, currentAlbum;
var albumName = $('#app').data('albumname');
var albumName = $('#app-content').data('albumname');
if (!albumName) {
albumName = t('gallery', 'Gallery');
}

View File

@ -222,7 +222,7 @@
download: function (event) {
event.preventDefault();
var path = $('#app').data('albumname');
var path = $('#app-content').data('albumname');
var files = Gallery.currentAlbum;
var downloadUrl = Gallery.utility.buildFilesUrl(path, files);

View File

@ -4,7 +4,7 @@
*/
?>
<div id="app">
<div id="app-content">
<?php
if (isset($_['code'])) {
if ($_['code'] === 404) {

View File

@ -24,7 +24,7 @@ style(
style('files_sharing', 'public');
?>
<div id="app" data-albumname="<?php p($_['albumName']) ?>">
<div id="app-content" data-albumname="<?php p($_['albumName']) ?>">
<div id="controls">
<div id="breadcrumbs"></div>
<!-- sorting buttons -->