Skip to content

Commit

Permalink
Output valid image sizes onto page allow for image size picking
Browse files Browse the repository at this point in the history
Currently not implemented, obviously.
  • Loading branch information
djmattyg007 committed Sep 29, 2016
1 parent 8067d70 commit 6c05641
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modes/filebrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
$paths = Access::getAllowedPaths();

if (empty($_POST)) {
loadPicTemplate("templates/filebrowser.phtml", array("paths" => $paths));
$appConf = loadPicFile("conf/app.json");
loadPicTemplate("templates/filebrowser.phtml", array(
"paths" => $paths,
"imageSizes" => json_decode($appConf, true)["image_sizes"],
));
exit();
}
if (!isset($_POST["path"]) || !is_numeric($_POST["path"])) {
Expand Down
4 changes: 4 additions & 0 deletions templates/filebrowser.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ Keyboard<br>shortcuts
}
</script>

<script type="application/json" id="image-sizes">
<?php echo json_encode($imageSizes); ?>
</script>

<div style="display:none;">
<script type="text/x-html-template" id="browser-directory-row-template">
<tr class="dir-row">
Expand Down

0 comments on commit 6c05641

Please sign in to comment.