update albumtree

This commit is contained in:
Stian Lund 2024-03-28 10:05:36 +01:00
parent 6cda84fd2f
commit 9797a6b962
23 changed files with 9 additions and 8 deletions

BIN
modules/albumtree/images/base.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 67 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 64 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 65 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 88 B

View File

@ -345,6 +345,7 @@ if (!Array.prototype.pop) {
|--------------------------------------------------*/
.dtree {
font-size: 1.05em;
white-space: nowrap;
}
.dtree img {
@ -370,7 +371,7 @@ function albumSelect_goToNode(nodeId) {
document.location = new String('main.php?g2_itemId=__ID__').replace('__ID__', nodeId);
}
var albumTree = new dTree('albumTree');
var albumTree_images = 'https://gallery315.dajavous.com/modules/albumtree/images/'
var albumTree_images = '<?= item::root()->url() ?>modules/albumtree/images/'
albumTree.icon = {
root : albumTree_images + 'base.gif',
folder : albumTree_images + 'folder.gif',
@ -394,12 +395,12 @@ albumTree.config.closeSameLevel = false;
albumTree.config.cookiePath = '<?= item::root()->url() ?>';
albumTree.config.cookieDomain = '';
{ var pf = '<?= item::root()->url() ?>';
<?
<?php
function addtree($album){
?>
albumTree.add(<?= $album->id -1 ?>, <?= $album->parent_id -1 ?>, "<?= html::purify($album->title) ?>", pf+'<?= $album->relative_url() ?>');
<?
foreach ($album->viewable()->children(null, null, array(array("tag_album", "=", "album"))) as $child){
<?php
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){
addtree($child);
}
}

View File

@ -10,14 +10,14 @@
</style>
<ul class="treealbumnav">
<?
<?php
function makelist($album,$level){
//print out the list item
?>
<li>
<a href="<?= item::root()->url() ?><?= $album->relative_url() ?>"><?= str_repeat("&nbsp;&nbsp;", $level) ?><?= html::purify($album->title) ?></a>
</li>
<?
<?php
//recurse over the children, and print their list items as well
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){
makelist($child,$level+1);

View File

@ -1,11 +1,11 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<select onchange="window.location=this.value">
<?
<?php
function makeselect($album, $level){
//print out the list item as a select option
?>
<option value="<?= item::root()->url() ?><?= $album->relative_url() ?>"><?= str_repeat("&nbsp;&nbsp;", $level) ?><?= html::purify($album->title) ?></option>
<?
<?php
//recurse over the children, and print their list items as well
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){
makeselect($child,$level+1);