272 lines
11 KiB
Smarty
272 lines
11 KiB
Smarty
|
|
|
|
<div class="floatLeft mainFrameTree">
|
|
|
|
|
|
|
|
|
|
|
|
<ul id="dhtmlgoodies_tree2" class="dhtmlgoodies_tree">
|
|
{*<li id="node0" >
|
|
<a href="{url _value=home}" >Strona Główna</a>
|
|
<div class="floatRight iconNavigation">
|
|
<a class="_loadInMainFrame" href="#"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</li>*}
|
|
<hr style="border-top:1px dashed red;" />
|
|
<div style="border: 1px">Menu top</div>
|
|
<hr style="border-top:1px dashed red;" />
|
|
{foreach from=$arrayObjStructure item=objElement key=idElement}
|
|
<li id="node{$objElement->GetId()}" ><a href="{url label=editStructure id=$objElement->GetId()}" class="{if !$objElement->GetPublication()}nonactive {/if}{if $idStucture == $objElement->GetId()}active{/if}" >{$objElement->GetElementName()}</a>
|
|
|
|
|
|
{if $objElement->GetHaveChildren()}
|
|
<ul>
|
|
{foreach from=$objElement->arrayChildren item=objElementSub key=idElementSub}
|
|
{assign var=idParentSub value=$objElementSub->GetId()}
|
|
<li id="node{$objElementSub->GetId()}" ><a href="{url label=editStructure id=$objElementSub->GetId()}" class="{if !$objElementSub->GetPublication()}nonactive {/if}{if $idStucture == $objElementSub->GetId()}active{/if}">{$objElementSub->GetElementName()}</a>
|
|
|
|
|
|
{if $objElementSub->GetHaveChildren()}
|
|
<ul>
|
|
{foreach from=$objElementSub->arrayChildren item=objElementSubSub key=idElementSubSub}
|
|
<li id="node{$objElementSubSub->GetId()}" ><a href="{url label=editStructure id=$objElementSubSub->GetId()}" class="{if !$objElementSubSub->GetPublication()}nonactive {/if}{if $idStucture == $objElementSubSub->GetId()}active{/if}">{$objElementSubSub->GetElementName()}</a>
|
|
|
|
{if $objElementSubSub->GetHaveChildren()}
|
|
{assign var=arraySubSubSub value=$objElementSubSub->arrayChildren}
|
|
<ul>
|
|
{section customer $arraySubSubSub}
|
|
<li id="node{$arraySubSubSub[customer]->GetId()}" ><a href="{url label=editStructure id=$arraySubSubSub[customer]->GetId()}" class="{if !$arraySubSubSub[customer]->GetPublication()}nonactive {/if}{if $idStucture == $arraySubSubSub[customer]->GetId()}active{/if}">{$arraySubSubSub[customer]->GetElementName()}</a>
|
|
|
|
|
|
</li>
|
|
{/section}
|
|
|
|
</ul>
|
|
{/if}
|
|
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
{/if}
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
{/if}
|
|
</li>
|
|
{/foreach}
|
|
|
|
<hr style="border-top:1px dashed red;" />
|
|
<div style="border: 1px">Pozostałe</div>
|
|
<hr style="border-top:1px dashed red;" />
|
|
|
|
{foreach from=$arrayObjStructureBottom item=objElement key=idElement}
|
|
<li id="node{$objElement->GetId()}" ><a href="{url label=editStructure id=$objElement->GetId()}" class="{if !$objElement->GetPublication()}nonactive {/if}{if $idStucture == $objElement->GetId()}active{/if}">{$objElement->GetElementName()}</a>
|
|
|
|
|
|
{if $objElement->GetHaveChildren()}
|
|
<ul>
|
|
{foreach from=$objElement->arrayChildren item=objElementSub key=idElementSub}
|
|
{assign var=idParentSub value=$objElementSub->GetId()}
|
|
<li id="node{$objElementSub->GetId()}" ><a href="{url label=editStructure id=$objElementSub->GetId()}" class="{if !$objElementSub->GetPublication()}nonactive {/if}{if $idStucture == $objElementSub->GetId()}active{/if}">{$objElementSub->GetElementName()}</a>
|
|
|
|
|
|
{if $objElementSub->GetHaveChildren()}
|
|
<ul>
|
|
{foreach from=$objElementSub->arrayChildren item=objElementSubSub key=idElementSubSub}
|
|
<li id="node{$objElementSubSub->GetId()}" ><a href="{url label=editStructure id=$objElementSubSub->GetId()}" class="{if !$objElementSubSub->GetPublication()}nonactive {/if}{if $idStucture == $objElementSubSub->GetId()}active{/if}">{$objElementSubSub->GetElementName()}</a>
|
|
|
|
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
{/if}
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
{/if}
|
|
</li>
|
|
{/foreach}
|
|
|
|
{*
|
|
<hr style="border-top:1px dashed red;">
|
|
<div style="border: 1px">Pozostałe</div>
|
|
<hr style="border-top:1px dashed red;">
|
|
{foreach from=$arrayObjStructureOther item=objElement key=idElement}
|
|
<li id="node{$objElement->GetId()}" ><a href="{url label=editStructure id=$objElement->GetId()}" {if $idStucture == $objElement->GetId()}style="font-weight: bold; background-color: #333c8e; color: #ffffff;"{/if}>{$objElement->GetElementName()}</a>
|
|
|
|
|
|
{if $objElement->GetHaveChildren()}
|
|
<ul>
|
|
{foreach from=$objElement->arrayChildren item=objElementSub key=idElementSub}
|
|
{assign var=idParentSub value=$objElementSub->GetId()}
|
|
<li id="node{$objElementSub->GetId()}" ><a href="{url label=editStructure id=$objElementSub->GetId()}" {if $idStucture == $objElementSub->GetId()}style="font-weight: bold; background-color: #333c8e; color: #ffffff;"{/if}>{$objElementSub->GetElementName()}</a>
|
|
|
|
|
|
{if $objElementSub->GetHaveChildren()}
|
|
<ul>
|
|
{foreach from=$objElementSub->arrayChildren item=objElementSubSub key=idElementSubSub}
|
|
<li id="node{$objElementSubSub->GetId()}" ><a href="{url label=editStructure id=$objElementSubSub->GetId()}" {if $idStucture == $objElementSubSub->GetId()}style="font-weight: bold; background-color: #333c8e; color: #ffffff;"{/if}>{$objElementSubSub->GetElementName()}</a>
|
|
|
|
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
{/if}
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
{/if}
|
|
</li>
|
|
{/foreach}
|
|
*}
|
|
</ul>
|
|
|
|
{*
|
|
<div class="treeHeader">
|
|
<a class="longTree floatLeft _loadInMainFrame" onclick="return load(this);" href="{url SimpleArticle_Index='index'}">Strona główna </a>
|
|
<div class="floatRight iconNavigation">
|
|
<a class="_loadInMainFrame" onclick="return load(this);" href="{url SimpleArticle_Index='add'}"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</div>
|
|
<div class="treeHeader">
|
|
<a class="longTree floatLeft loadInMainFrame" onclick="return load(this);" href="{url Person_Index='index'}">Osoby </a>
|
|
<div class="floatRight iconNavigation">
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</div>
|
|
<div class="treeHeader">
|
|
<a class="longTree floatLeft loadInMainFrame" onclick="return load(this);" href="{url Spectacle_Index='index'}">Spektakle </a>
|
|
<div class="floatRight iconNavigation">
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="treeHeader">
|
|
<a class="longTree floatLeft loadInMainFrame" onclick="return load(this);" href="{url Test_Index='index'}">Test </a>
|
|
<div class="floatRight iconNavigation">
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="treeHeader">
|
|
<a class="longTree floatLeft loadInMainFrame" href="#">Struktura z bazy ponizej </a>
|
|
<div class="floatRight iconNavigation">
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="treeContent">
|
|
{foreach from=$arrayObjStructure item=objElement key=idElement}
|
|
<div class="treeHeader">
|
|
<a class="iconCategoryUnder floatLeft loadInMainFrame" onclick="return load(this);" href="{url structure='edit' id=$objElement->GetId()}">{$objElement->GetName()}</a>
|
|
<div class="floatRight iconNavigation">
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</div>
|
|
<div class="treeContent">
|
|
{if $objElement->GetHaveChildren()}
|
|
<div class="treeHeader">
|
|
<a class="longTree floatLeft" href="#">Elementy - {$objElement->GetName()}</a>
|
|
<div class="floatRight iconNavigation">
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{foreach from=$objElement->arrayChildren item=objElementSub key=idElementSub}
|
|
{assign var=idParentSub value=$objElementSub->GetId()}
|
|
<div class="treeHeader">
|
|
<a class="iconCategoryUnder floatLeft" onclick="return load(this);" href="{url structure='edit' id=$objElementSub->GetId()}">{$objElementSub->GetName()}</a>
|
|
<div class="floatRight iconNavigation">
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</div>
|
|
<div class="treeContent">
|
|
{if $objElementSub->GetHaveChildren()}
|
|
<div class="treeHeader">
|
|
<a class="longTree floatLeft" href="#">Elementy - {$objElementSub->GetName()}</a>
|
|
<div class="floatRight iconNavigation">
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{foreach from=$objElementSub->arrayChildren item=objElementSubSub key=idElementSubSub}
|
|
|
|
<div class="treeHeader">
|
|
<a class="iconCategoryUnder floatLeft" onclick="return load(this);" href="{url structure='edit' id=$objElementSubSub->GetId()}">{$objElementSubSub->GetName()}</a>
|
|
<div class="floatRight iconNavigation">
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType03.gif" alt="" title="" /></a>
|
|
<a href="#"><img src="{$urlStatic}/image/Admin/iconType.gif" alt="" title="" /></a>
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
{/foreach}
|
|
|
|
|
|
</div>
|
|
*}
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearBoth"></div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
{literal}
|
|
var ajaxObjects = new Array();
|
|
|
|
// Use something like this if you want to save data by Ajax.
|
|
function saveMyTree()
|
|
{
|
|
saveString = treeObj.getNodeOrders();
|
|
var ajaxIndex = ajaxObjects.length;
|
|
ajaxObjects[ajaxIndex] = new sack();
|
|
var url = 'saveNodes.php?saveString=' + saveString;
|
|
ajaxObjects[ajaxIndex].requestFile = url; // Specifying which file to get
|
|
ajaxObjects[ajaxIndex].onCompletion = function() { saveComplete(ajaxIndex); } ; // Specify function that will be executed after file has been found
|
|
ajaxObjects[ajaxIndex].runAJAX(); // Execute AJAX function
|
|
|
|
}
|
|
function saveComplete(index)
|
|
{
|
|
alert(ajaxObjects[index].response);
|
|
}
|
|
|
|
|
|
|
|
function initTree() {
|
|
treeObj = new JSDragDropTree();
|
|
{/literal}
|
|
treeObj.imageFolder = '{$urlStatic}/images/';
|
|
|
|
treeObj.setTreeId('dhtmlgoodies_tree2');
|
|
treeObj.setMaximumDepth(3);
|
|
treeObj.setMessageMaximumDepthReached('Próbujesz utowrzyc pozmiom menu poza zakresem'); // If you want to show a message when maximum depth is reached, i.e. on drop.
|
|
treeObj.initTree();
|
|
treeObj.expandAll();
|
|
|
|
|
|
{literal}
|
|
}
|
|
|
|
window.onload = initTree;
|
|
|
|
{/literal}
|
|
var updateTreeUrl = '{url Structure='UpdateTree'}';
|
|
</script>
|