diff --git a/app/Helpers/DbHelper.php b/app/Helpers/DbHelper.php index f3b191f..89c5f53 100644 --- a/app/Helpers/DbHelper.php +++ b/app/Helpers/DbHelper.php @@ -10,6 +10,12 @@ use Illuminate\Support\Facades\Auth; class DbHelper { public static function getAlbumsForCurrentUser() + { + return self::getAlbumsForCurrentUser_NonPaged() + ->paginate(UserConfig::get('items_per_page')); + } + + public static function getAlbumsForCurrentUser_NonPaged() { $albumsQuery = Album::query(); $user = Auth::user(); @@ -57,8 +63,7 @@ class DbHelper return $albumsQuery->select('albums.*') ->distinct() ->orderBy('name') - ->withCount('photos') - ->paginate(UserConfig::get('items_per_page')); + ->withCount('photos'); } public static function getAlbumByAliasForCurrentUser($urlAlias) diff --git a/app/Http/Middleware/GlobalConfiguration.php b/app/Http/Middleware/GlobalConfiguration.php index c744645..9c0b1b7 100644 --- a/app/Http/Middleware/GlobalConfiguration.php +++ b/app/Http/Middleware/GlobalConfiguration.php @@ -59,7 +59,8 @@ class GlobalConfiguration private function addAlbumsToView() { - $albums = DbHelper::getAlbumsForCurrentUser(); + //$albums = DbHelper::getAlbumsForCurrentUser_NonPaged()->get(); + $albums = Album::all(); View::share('albums', $albums); } diff --git a/resources/assets/css/admin.css b/resources/assets/css/admin.css index d4ddafb..21f7b52 100644 --- a/resources/assets/css/admin.css +++ b/resources/assets/css/admin.css @@ -5,4 +5,21 @@ .card-header.card-danger { color: #fff; font-weight: bold; +} + +.photo .loading { + background-color: #ffffff; + display: none; + height: 100%; + left: 0; + opacity: 0.8; + position: absolute; + text-align: center; + top: 0; + width: 100%; + z-index: 1000; +} + +.photo .loading img { + margin-top: 40px; } \ No newline at end of file diff --git a/resources/assets/css/tether-theme-basic.css b/resources/assets/css/tether-theme-basic.css new file mode 100644 index 0000000..f2b3b5c --- /dev/null +++ b/resources/assets/css/tether-theme-basic.css @@ -0,0 +1,21 @@ +.tether-element, .tether-element:after, .tether-element:before, .tether-element *, .tether-element *:after, .tether-element *:before { + box-sizing: border-box; } + +.tether-element { + position: absolute; + display: none; } + .tether-element.tether-open { + display: block; } + +.tether-element.tether-theme-basic { + max-width: 100%; + max-height: 100%; } + .tether-element.tether-theme-basic .tether-content { + border-radius: 5px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); + font-family: inherit; + background: #fff; + color: inherit; + padding: 1em; + font-size: 1.1em; + line-height: 1.5em; } diff --git a/resources/assets/css/tether.css b/resources/assets/css/tether.css new file mode 100644 index 0000000..fc30f56 --- /dev/null +++ b/resources/assets/css/tether.css @@ -0,0 +1,8 @@ +.tether-element, .tether-element:after, .tether-element:before, .tether-element *, .tether-element *:after, .tether-element *:before { + box-sizing: border-box; } + +.tether-element { + position: absolute; + display: none; } + .tether-element.tether-open { + display: block; } diff --git a/resources/assets/js/jquery.js b/resources/assets/js/001-jquery.js similarity index 100% rename from resources/assets/js/jquery.js rename to resources/assets/js/001-jquery.js diff --git a/resources/assets/js/002-bootbox.js b/resources/assets/js/002-bootbox.js new file mode 100644 index 0000000..2734f4d --- /dev/null +++ b/resources/assets/js/002-bootbox.js @@ -0,0 +1,985 @@ +/** + * bootbox.js [v4.4.0] + * + * http://bootboxjs.com/license.txt + */ + +// @see https://github.com/makeusabrew/bootbox/issues/180 +// @see https://github.com/makeusabrew/bootbox/issues/186 +(function (root, factory) { + + "use strict"; + if (typeof define === "function" && define.amd) { + // AMD. Register as an anonymous module. + define(["resources/assets/js/001-jquery"], factory); + } else if (typeof exports === "object") { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(require("resources/assets/js/001-jquery")); + } else { + // Browser globals (root is window) + root.bootbox = factory(root.jQuery); + } + +}(this, function init($, undefined) { + + "use strict"; + + // the base DOM structure needed to create a modal + var templates = { + dialog: + "