openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 4d308457adcc910dc45e6968e156de0ff849b3d3
parent 828cbbd8f6307f45fea8f252a9e736adf7437d23
Author: Jan Dankert <devnull@localhost>
Date:   Wed, 19 Sep 2018 23:56:56 +0200

Der Navigationsbaum soll initial durch den 1. HTTP-Request schon bereit gestellt werden. Per Javascript erfolgt nur noch das Auf- und Zublättern.

Diffstat:
modules/cms-core/action/TreeAction.class.php | 108++++++++++++++++++++++++++++++++++++++++++-------------------------------------
modules/cms-ui/themes/default/html/views/tree/tree.php | 2--
modules/cms-ui/themes/default/html/views/tree/tree.tpl.src.xml | 2+-
modules/cms-ui/themes/default/production/combined.min.js | 12++++++------
modules/cms-ui/themes/default/script/openrat.js | 13++++++-------
modules/cms-ui/themes/default/script/openrat.min.js | 12++++++------
modules/util/Tree.class.php | 20--------------------
modules/util/TreeElement.class.php | 3++-
8 files changed, 79 insertions(+), 93 deletions(-)

diff --git a/modules/cms-core/action/TreeAction.class.php b/modules/cms-core/action/TreeAction.class.php @@ -46,70 +46,78 @@ class TreeAction extends Action */ public function loadBranchView() { - $tree = new Tree(); $type = $this->getRequestVar('type'); - - if ( intval($this->getRequestVar('id')) != 0 ) - $tree->$type( $this->getRequestId() ); - else - $tree->$type(); - - $branch = array(); - foreach($tree->treeElements as $element ) - { - $branch[] = get_object_vars($element); - } - + + $branch = $this->loadTreeBranch( $type ); + $this->setTemplateVar( 'branch',$branch ); } - - /** - * Projekt-Einstellungen anzeigen. - */ - public function settingsView() - { - /* - $this->setTemplateVar( 'languages' ,Language::getAll() ); - $this->setTemplateVar( 'languageid',0 ); - $this->setTemplateVar( 'models' ,Model::getAll() ); - $this->setTemplateVar( 'modelid' ,0 ); - */ - } - /** - * @deprecated - */ - public function settingsPost() - { + private function loadTreeBranch( $type ) + { + $tree = new Tree(); - $this->addNotice('language',$language->name,'DONE',OR_NOTICE_OK); - $this->addNotice('model' ,$model->name ,'DONE',OR_NOTICE_OK); - } + if ( intval($this->getRequestVar('id')) != 0 ) + $tree->$type( $this->getRequestId() ); + else + $tree->$type(); + + $branch = array(); + foreach($tree->treeElements as $element ) + { + $branch[] = get_object_vars($element); + } + + return $branch; + } /** - * @deprecated + * Initialer Aufbau des Navigationsbaums. */ - public function languagePost() - { - $language = new Language( $this->getRequestId() ); - $language->load(); + public function treeView() + { + $branch = $this->loadTreeBranch( 'root' ); - $this->addNotice('language',$language->name,'DONE',OR_NOTICE_OK); - } - - - public function modelPost() - { - $model = new Model( $this->getRequestId() ); - $model->load(); + foreach( $branch as $k=>$b ) + { + if ( !empty($b['type']) ) + $branch[$k]['children'] = $this->loadTreeBranch( $b['type'] ); + else + $branch[$k]['children'] = array(); + } + + $this->outputTreeBranch( $branch ); + + //$this->setTemplateVar( 'branch',$branch ); + + } + + + + private function outputTreeBranch($branch ) + { + $json = new \JSON(); + echo '<ul class="tree">'; + + foreach( $branch as $b ) + { + echo '<li class="object" data-id="'.$b['internalId'].'" data-type="'.$b['type'].'"><div class="tree"><div class="arrow"></div></div><a href="./?action='.$b['action'].'&id='.$b['internalId'].'" class="entry" data-extra="'.str_replace('"',"'",$json->encode($b['extraId'])).'" data-id="'.$b['internalId'].'" data-type="'.$b['type'].'" title="'.$b['description'].'"><img src="modules/cms-ui/themes/default/images/icon_'.$b['icon'].'.png" />'.$b['text'].'</a>'; + + if ( isset($b['children']) && !empty($b['children']) ) + { + $this->outputTreeBranch($b['children']); + } + + echo '</li>'; + } + + echo '</ul>'; + } - $this->addNotice('model' ,$model->name ,'DONE',OR_NOTICE_OK); - } - } ?> \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/tree/tree.php b/modules/cms-ui/themes/default/html/views/tree/tree.php @@ -1,5 +1,3 @@ - <div class="headermenu"><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_PROJECTTIMELINE') ?>" data-type="dialog" data-name="<?php echo lang('MENU_PROJECTTIMELINE') ?>" data-method="projecttimeline"><img src="./themes/default/images/icon/action/projecttimeline.svg" title="<?php echo lang('MENU_projecttimeline_DESC') ?>" /><?php echo lang('MENU_projecttimeline') ?></a></div><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_USERPROJECTTIMELINE') ?>" data-type="dialog" data-name="<?php echo lang('MENU_USERPROJECTTIMELINE') ?>" data-method="userprojecttimeline"><img src="./themes/default/images/icon/action/userprojecttimeline.svg" title="<?php echo lang('MENU_userprojecttimeline_DESC') ?>" /><?php echo lang('MENU_userprojecttimeline') ?></a></div></div> - \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/tree/tree.tpl.src.xml b/modules/cms-ui/themes/default/html/views/tree/tree.tpl.src.xml @@ -1,4 +1,4 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> - <header views="projecttimeline,userprojecttimeline" /> + </output> \ No newline at end of file diff --git a/modules/cms-ui/themes/default/production/combined.min.js b/modules/cms-ui/themes/default/production/combined.min.js @@ -11026,12 +11026,12 @@ else{r=8};setTimeout(function(){$(o).fadeOut('slow').remove()},r*1000)});$.each( /* ./modules//template-engine/components/html/upload/upload.min.js */;$(document).on('orViewLoaded',function(e,n){var t=$(e.target).find('form'),o=$(e.target).find('div.filedropzone > div.input');o.on('dragenter',function(e){e.stopPropagation();e.preventDefault();$(this).css('border','1px dotted gray')});o.on('dragover',function(e){e.stopPropagation();e.preventDefault()});o.on('drop',function(e){$(this).css('border','1px dotted red');e.preventDefault();var n=e.originalEvent.dataTransfer.files;handleFileUpload(t,n)});$(e.target).find('input[type=file]').change(function(){var e=$(this).prop('files');handleFileUpload(t,e)})});function handleFileUpload(e,o){for(var a=0,r;r=o[a];a++){var n=new FormData();n.append('file',r);n.append('action','folder');n.append('subaction','createfile');n.append('output','json');n.append('token',$(e).find('input[name=token]').val());n.append('id',$(e).find('input[name=id]').val());var t=$('<div class="notice info"><div class="text loader"></div></div>');$('#noticebar').prepend(t);$(t).show();$.ajax({'type':'POST',url:'./api/',cache:!1,contentType:!1,processData:!1,data:n,success:function(n,o,a){$(t).remove();doResponse(n,o,e)},error:function(n,o,i){$(e).closest('div.content').removeClass('loader');$(t).remove();var r;try{var a=jQuery.parseJSON(n.responseText);r=a.error+'/'+a.description+': '+a.reason}catch(d){r=n.responseText};notify('error',r)}})}}; /* ./modules//template-engine/components/html/tree/tree.min.js */;$(document).on('orViewLoaded',function(o,n){}); /* ./modules/cms-ui/themes/default/script/openrat.min.js */;var OR_THEMES_EXT_DIR='modules/cms-ui/themes/';$(function(){$('html').removeClass('nojs');$('.initial-hidden').removeClass('initial-hidden');registerHeaderEvents();registerWorkbenchEvents();$('.view').each(function(e){afterViewLoaded(this)});window.onpopstate=function(e){Navigator.navigateTo(e.state)};initActualHistoryState();Workbench.initialize();$('#noticebar .notice').click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});loadTree();$(document).keyup(function(e){if(e.keyCode==27){$('#dialog .view').fadeOut('fast').html('');$('#dialog').removeClass('is-open').addClass('is-closed')}});$('#noticebar .notice').fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});registerOpenClose($('section.toggle-open-close'));$('section.toggle-open-close .on-click-open-close').click(function(){var t=$(this).closest('section');if(t.hasClass('disabled'))return;var e=t.find('div.view-loader');if(e.children().length==0)Workbench.loadNewActionIntoElement(e)})});function initActualHistoryState(){var e={};e.name=window.document.title;var t=new URLSearchParams(window.location.search);if(t.has('action')){e.action=t.get('action');e.id=t.get('id');e.name=window.document.title;e.data={};var t=Array.from(t.entries());for(var i in t){e.data[t[i][0]]=t[i][1]};Navigator.toActualHistory(e);filterMenus(e.action,e.id,e.data)}};var Navigator=new function(){'use strict';this.navigateTo=function(e){Workbench.loadNewActionState(e)};this.navigateToNew=function(e){Workbench.loadNewActionState(e);window.history.pushState(e,e.name,createUrl(e.action,null,e.id,e.data,!1))};this.navigateToNewAction=function(e,t,i,a){var n={action:e,method:t,id:i,data:a};this.navigateToNew(n)};this.toActualHistory=function(e){window.history.replaceState(e,e.name,createUrl(e.action,null,e.id,e.data,!1))}},Workbench=new function(){'use strict';this.initialize=function(){this.initializePingTimer()};this.initializePingTimer=function(){var e=function(){$.ajax(createUrl('title','ping',0))},t=5;window.setInterval(e,t*60*1000)};this.loadNewActionState=function(e){Workbench.loadNewAction(e.action,e.id,e.data)};this.loadNewAction=function(e,t,i){$('#editor').attr('data-action',e);$('#editor').attr('data-id',t);$('#editor').attr('data-extra',JSON.stringify(i));$('#workbench section.closed .view-loader').empty();$('#workbench section.open .view-loader').each(function(e){var t=$(this);Workbench.loadNewActionIntoElement(t)});filterMenus(e,t,i)};this.loadNewActionIntoElement=function(e){var t=$('#editor').attr('data-action'),i=$('#editor').attr('data-id'),a=$('#editor').attr('data-extra'),n=e.data('method');Workbench.loadViewIntoElement(e,t,n,i,a)};this.loadViewIntoElement=function(e,t,i,a,n){var o=createUrl(t,i,a,n,!0);e.empty().fadeTo(1,0.7).addClass('loader').html('').load(o,function(t,i,a){e.fadeTo(350,1);$(e).removeClass('loader');if(i=='error'){$(e).html('');notify('error',t);return};afterViewLoaded(e)})}};function registerWorkbenchEvents(){$('div.header').dblclick(function(){fullscreen(this)});$('div#filler').click(function(){if($('div#dialog').hasClass('modal')){} -else{$('div#dialog').removeClass('is-open').addClass('is-closed');$('div#dialog > .view').html('')}})};function loadView(e,t,i,a,n){Navigator.navigateToNewAction(t,i,a,n)};function afterViewLoaded(e){var t=$(e).closest('section'),i=$(e).children().length>0;t.toggleClass('disabled',!i);$(e).trigger('orViewLoaded');$(e).closest('div.panel').find('div.header div.dropdown div.entry.perview').remove();$(e).find('.toggle-nav-open-close').click(function(){$('nav').toggleClass('open')});$(e).find('div.headermenu > a').each(function(e,t){});$(e).find('div.header > a.back').each(function(t,i){$(i).removeClass('button').wrap('<div class="entry perview" />').parent().appendTo($(e).closest('div.panel').find('div.header div.dropdown').first())});$(e).find('div.selector.tree').each(function(){var e=this;$(this).orTree({type:'project',selectable:$(e).attr('data-types').split(','),id:$(e).attr('data-init-folderid'),onSelect:function(t,i,a){var n=$(e).parent();$(n).find('input[type=text]').attr('value',t);$(n).find('input[type=hidden]').attr('value',a)}})});$('div.content li.object').draggable({cursor:'move',revert:'invalid'});$('div.content li.object > .entry[data-type=\'folder\']').droppable({accept:'li.object',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,t){var i=t.draggable,a=$(this).parent();startDialog($(this).text(),$(i).attr('data-type'),'copy',$(a).attr('data-id'),{'action':$(i).attr('data-type'),'subaction':'copy','id':$(i).attr('data-id'),'targetFolderId':$(a).attr('data-id')});$(i).detach().css({top:0,left:0}).appendTo(a).click()}});$(e).find('input').change(function(){$(this).parent('div.view').addClass('dirty')});$(e).find('select.theme-chooser').change(function(){setUserStyle(this.value)})};function registerHeaderEvents(){$('body').click(function(){$('.toolbar-icon.menu').parent().removeClass('open')});$('#title .toolbar-icon.menu').click(function(e){e.stopPropagation();$(this).parent().toggleClass('open')});$('#title .toolbar-icon.menu').mouseover(function(){$(this).parent().find('.toolbar-icon.menu').removeClass('open');$(this).addClass('open')});$('#title div.search input').blur(function(){$('div.search input div.dropdown').fadeOut()});$('#title div.search input').orSearch({dropdown:'#title div.search div.dropdown'})};function fullscreen(e){$(e).closest('div.panel').fadeOut('fast',function(){$(this).toggleClass('fullscreen').fadeIn('fast')})};function loadTree(){$('#navigation').html('&nbsp;');$('#navigation').orTree({type:'root',id:0,onSelect:function(e,t,i,a){$('nav').removeClass('open');openNewAction(e,t,i,a)}});$('#navigation > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click();$('#navigation > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click()};function submitUrl(e,t){postUrl(t,e)};function postUrl(e,t){e+='&output=json';$.ajax({'type':'POST',url:e,data:{},success:function(e,i,a){$('div.panel div.status div.loader').html('&nbsp;');doResponse(e,i,t)}})};function startDialog(e,t,i,a,n){if(!t)t=$('#editor').attr('data-action');a=$('#editor').attr('data-id');$('div#dialog > .view').html('<div class="header"><img class="icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+e+'</div>');$('div#dialog > .view').data('id',a);$('div#dialog').removeClass('is-closed').addClass('is-open');Workbench.loadViewIntoElement($('div#dialog > .view'),t,i,a,n)};function modalView(e,t){var i=$(e).closest('div.panel').find('li.active').attr('data-action'),a=$(e).closest('div.panel').find('li.active').attr('data-method'),n=$(e).closest('div.panel').find('li.active').attr('data-id');$(e).closest('div.content').modal({'overlayClose':'true','xxxonClose':function(){alert('close)')}});loadView($(e).closest('div.content'),i,a,n)};function setTitle(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};function openNewAction(e,t,i,a){setTitle(e);setNewAction(t,i,a)};function filterMenus(e,t,i){$('div.clickable').addClass('active');$('div.clickable.filtered').removeClass('active').addClass('inactive');$('div.clickable.filtered.on-action-'+e).addClass('active').removeClass('inactive');$('div.clickable.filtered a').attr('data-action',e);$('div.clickable.filtered a').attr('data-id',t);$('div.clickable.filtered a').attr('data-extra',JSON.stringify(i))};function setNewAction(e,t,i){Navigator.navigateToNewAction(e,'edit',t,i)};function setNewId(e){};function notifyBrowser(e){if(!('Notification' in window)){return} +else{$('div#dialog').removeClass('is-open').addClass('is-closed');$('div#dialog > .view').html('')}})};function loadView(e,t,i,a,n){Navigator.navigateToNewAction(t,i,a,n)};function afterViewLoaded(e){var t=$(e).closest('section'),i=$(e).children().length>0;t.toggleClass('disabled',!i);$(e).trigger('orViewLoaded');$(e).closest('div.panel').find('div.header div.dropdown div.entry.perview').remove();$(e).find('.toggle-nav-open-close').click(function(){$('nav').toggleClass('open')});$(e).find('div.headermenu > a').each(function(e,t){});$(e).find('div.header > a.back').each(function(t,i){$(i).removeClass('button').wrap('<div class="entry perview" />').parent().appendTo($(e).closest('div.panel').find('div.header div.dropdown').first())});$(e).find('div.selector.tree').each(function(){var e=this;$(this).orTree({type:'project',selectable:$(e).attr('data-types').split(','),id:$(e).attr('data-init-folderid'),onSelect:function(t,i,a){var n=$(e).parent();$(n).find('input[type=text]').attr('value',t);$(n).find('input[type=hidden]').attr('value',a)}})});$('div.content li.object').draggable({cursor:'move',revert:'invalid'});$('div.content li.object > .entry[data-type=\'folder\']').droppable({accept:'li.object',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,t){var i=t.draggable,a=$(this).parent();startDialog($(this).text(),$(i).attr('data-type'),'copy',$(a).attr('data-id'),{'action':$(i).attr('data-type'),'subaction':'copy','id':$(i).attr('data-id'),'targetFolderId':$(a).attr('data-id')});$(i).detach().css({top:0,left:0}).appendTo(a).click()}});$(e).find('input').change(function(){$(this).parent('div.view').addClass('dirty')});$(e).find('select.theme-chooser').change(function(){setUserStyle(this.value)})};function registerHeaderEvents(){$('body').click(function(){$('.toolbar-icon.menu').parent().removeClass('open')});$('#title .toolbar-icon.menu').click(function(e){e.stopPropagation();$(this).parent().toggleClass('open')});$('#title .toolbar-icon.menu').mouseover(function(){$(this).parent().find('.toolbar-icon.menu').removeClass('open');$(this).addClass('open')});$('#title div.search input').blur(function(){$('div.search input div.dropdown').fadeOut()});$('#title div.search input').orSearch({dropdown:'#title div.search div.dropdown'})};function fullscreen(e){$(e).closest('div.panel').fadeOut('fast',function(){$(this).toggleClass('fullscreen').fadeIn('fast')})};function loadTree(){$('#navigation div.tree').addClass('closed').find('.arrow').addClass('arrow-right');$('#navigation').orTree({type:'root',id:0,onSelect:function(e,t,i,a){$('nav').removeClass('open');openNewAction(e,t,i,a)}})};function submitUrl(e,t){postUrl(t,e)};function postUrl(e,t){e+='&output=json';$.ajax({'type':'POST',url:e,data:{},success:function(e,i,a){$('div.panel div.status div.loader').html('&nbsp;');doResponse(e,i,t)}})};function startDialog(e,t,i,a,n){if(!t)t=$('#editor').attr('data-action');a=$('#editor').attr('data-id');$('div#dialog > .view').html('<div class="header"><img class="icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+e+'</div>');$('div#dialog > .view').data('id',a);$('div#dialog').removeClass('is-closed').addClass('is-open');Workbench.loadViewIntoElement($('div#dialog > .view'),t,i,a,n)};function modalView(e,t){var i=$(e).closest('div.panel').find('li.active').attr('data-action'),a=$(e).closest('div.panel').find('li.active').attr('data-method'),n=$(e).closest('div.panel').find('li.active').attr('data-id');$(e).closest('div.content').modal({'overlayClose':'true','xxxonClose':function(){alert('close)')}});loadView($(e).closest('div.content'),i,a,n)};function setTitle(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};function openNewAction(e,t,i,a){setTitle(e);setNewAction(t,i,a)};function filterMenus(e,t,i){$('div.clickable').addClass('active');$('div.clickable.filtered').removeClass('active').addClass('inactive');$('div.clickable.filtered.on-action-'+e).addClass('active').removeClass('inactive');$('div.clickable.filtered a').attr('data-action',e);$('div.clickable.filtered a').attr('data-id',t);$('div.clickable.filtered a').attr('data-extra',JSON.stringify(i))};function setNewAction(e,t,i){Navigator.navigateToNewAction(e,'edit',t,i)};function setNewId(e){};function notifyBrowser(e){if(!('Notification' in window)){return} else if(Notification.permission==='granted'){var t=new Notification(e)} -else if(Notification.permission!=='denied'){Notification.requestPermission(function(t){if(t==='granted'){var i=new Notification(e)}})}};function setUserStyle(e){var t=$('html'),i=t.attr('class').split(/\s+/);$.each(i,function(e,i){if(i.startsWith('theme-')){t.removeClass(i)}});t.addClass('theme-'+e.toLowerCase())};function insert(e,t,i){var a=document.forms[0].elements[e];a.focus();if(typeof document.selection!='undefined'){var c=document.selection.createRange(),n=c.text;c.text=t+n+i;c=document.selection.createRange();if(n.length==0){c.move('character',-i.length)} -else{c.moveStart('character',t.length+n.length+i.length)};c.select()} -else if(typeof a.selectionStart!='undefined'){var r=a.selectionStart,l=a.selectionEnd,n=a.value.substring(r,l);a.value=a.value.substr(0,r)+t+n+i+a.value.substr(l);var o;if(n.length==0){o=r+t.length} -else{o=r+t.length+n.length+i.length};a.selectionStart=o;a.selectionEnd=o} -else{o=a.value.length;var n=prompt('Text');a.value=a.value.substr(0,o)+t+n+i+a.value.substr(o)}};function createUrl(e,t,i,a,o){var n='./';n+='?action='+e;if(t!=null)n+='&subaction='+t;n+='&id='+i;if(o)n+='&embed=1';if(typeof a==='string'){a=a.replace(/'/g,'"');var c=jQuery.parseJSON(a);jQuery.each(c,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} +else if(Notification.permission!=='denied'){Notification.requestPermission(function(t){if(t==='granted'){var i=new Notification(e)}})}};function setUserStyle(e){var t=$('html'),i=t.attr('class').split(/\s+/);$.each(i,function(e,i){if(i.startsWith('theme-')){t.removeClass(i)}});t.addClass('theme-'+e.toLowerCase())};function insert(e,t,i){var a=document.forms[0].elements[e];a.focus();if(typeof document.selection!='undefined'){var r=document.selection.createRange(),n=r.text;r.text=t+n+i;r=document.selection.createRange();if(n.length==0){r.move('character',-i.length)} +else{r.moveStart('character',t.length+n.length+i.length)};r.select()} +else if(typeof a.selectionStart!='undefined'){var c=a.selectionStart,s=a.selectionEnd,n=a.value.substring(c,s);a.value=a.value.substr(0,c)+t+n+i+a.value.substr(s);var o;if(n.length==0){o=c+t.length} +else{o=c+t.length+n.length+i.length};a.selectionStart=o;a.selectionEnd=o} +else{o=a.value.length;var n=prompt('Text');a.value=a.value.substr(0,o)+t+n+i+a.value.substr(o)}};function createUrl(e,t,i,a,o){var n='./';n+='?action='+e;if(t!=null)n+='&subaction='+t;n+='&id='+i;if(o)n+='&embed=1';if(typeof a==='string'){a=a.replace(/'/g,'"');var r=jQuery.parseJSON(a);jQuery.each(r,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} else if(typeof a==='object'){jQuery.each(a,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} else{};return n};function resizeWorkbenchContainer(e){};function resizeWorkbench(){};function resizeTabs(e){};function help(e,t,i){var a=$(e).closest('div.panel').find('li.action.active').attr('data-action'),n=$(e).closest('div.panel').find('li.action.active').attr('data-method');window.open(t+a+'/'+n+i,'OpenRat_Help','location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes')};function notify(e,t){var i=$('<div class="notice '+e+'"><div class="text">'+t+'</div></div>');$('#noticebar').prepend(i);$(i).fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})})};function registerOpenClose(e){$(e).children('.on-click-open-close').click(function(){$(this).closest('.toggle-open-close').toggleClass('open closed')})}; \ No newline at end of file diff --git a/modules/cms-ui/themes/default/script/openrat.js b/modules/cms-ui/themes/default/script/openrat.js @@ -443,19 +443,18 @@ function fullscreen( element ) { function loadTree() { - // Oberstes Tree-Element erzeugen - $('#navigation').html("&nbsp;"); - - // Wurzel des Baums laden + $('#navigation div.tree').addClass('closed').find('.arrow').addClass('arrow-right'); + // Klick-Funktion zum Öffnen des Zweiges. + //$('#navigation div.tree').click( function() { $(this).parent().orTree( {type:line.type,id:line.internalId,extraId:line.extraId,onSelect:settings.onSelect,selectable:settings.selectable} );} ); // Zweig öffnen + + + // Wurzel des Baums laden //loadBranch( $('div#tree ul.tree > li'),'root',0); $('#navigation').orTree( { type:'root',id:0,onSelect:function(name,type,id,extraId) { $('nav').removeClass('open'); openNewAction( name,type,id, extraId ); } }); - // Die ersten 2 Hierarchien öffnen: - $('#navigation > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click(); - $('#navigation > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click(); } diff --git a/modules/cms-ui/themes/default/script/openrat.min.js b/modules/cms-ui/themes/default/script/openrat.min.js @@ -1,10 +1,10 @@ ;var OR_THEMES_EXT_DIR='modules/cms-ui/themes/';$(function(){$('html').removeClass('nojs');$('.initial-hidden').removeClass('initial-hidden');registerHeaderEvents();registerWorkbenchEvents();$('.view').each(function(e){afterViewLoaded(this)});window.onpopstate=function(e){Navigator.navigateTo(e.state)};initActualHistoryState();Workbench.initialize();$('#noticebar .notice').click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});loadTree();$(document).keyup(function(e){if(e.keyCode==27){$('#dialog .view').fadeOut('fast').html('');$('#dialog').removeClass('is-open').addClass('is-closed')}});$('#noticebar .notice').fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});registerOpenClose($('section.toggle-open-close'));$('section.toggle-open-close .on-click-open-close').click(function(){var t=$(this).closest('section');if(t.hasClass('disabled'))return;var e=t.find('div.view-loader');if(e.children().length==0)Workbench.loadNewActionIntoElement(e)})});function initActualHistoryState(){var e={};e.name=window.document.title;var t=new URLSearchParams(window.location.search);if(t.has('action')){e.action=t.get('action');e.id=t.get('id');e.name=window.document.title;e.data={};var t=Array.from(t.entries());for(var i in t){e.data[t[i][0]]=t[i][1]};Navigator.toActualHistory(e);filterMenus(e.action,e.id,e.data)}};var Navigator=new function(){'use strict';this.navigateTo=function(e){Workbench.loadNewActionState(e)};this.navigateToNew=function(e){Workbench.loadNewActionState(e);window.history.pushState(e,e.name,createUrl(e.action,null,e.id,e.data,!1))};this.navigateToNewAction=function(e,t,i,a){var n={action:e,method:t,id:i,data:a};this.navigateToNew(n)};this.toActualHistory=function(e){window.history.replaceState(e,e.name,createUrl(e.action,null,e.id,e.data,!1))}},Workbench=new function(){'use strict';this.initialize=function(){this.initializePingTimer()};this.initializePingTimer=function(){var e=function(){$.ajax(createUrl('title','ping',0))},t=5;window.setInterval(e,t*60*1000)};this.loadNewActionState=function(e){Workbench.loadNewAction(e.action,e.id,e.data)};this.loadNewAction=function(e,t,i){$('#editor').attr('data-action',e);$('#editor').attr('data-id',t);$('#editor').attr('data-extra',JSON.stringify(i));$('#workbench section.closed .view-loader').empty();$('#workbench section.open .view-loader').each(function(e){var t=$(this);Workbench.loadNewActionIntoElement(t)});filterMenus(e,t,i)};this.loadNewActionIntoElement=function(e){var t=$('#editor').attr('data-action'),i=$('#editor').attr('data-id'),a=$('#editor').attr('data-extra'),n=e.data('method');Workbench.loadViewIntoElement(e,t,n,i,a)};this.loadViewIntoElement=function(e,t,i,a,n){var o=createUrl(t,i,a,n,!0);e.empty().fadeTo(1,0.7).addClass('loader').html('').load(o,function(t,i,a){e.fadeTo(350,1);$(e).removeClass('loader');if(i=='error'){$(e).html('');notify('error',t);return};afterViewLoaded(e)})}};function registerWorkbenchEvents(){$('div.header').dblclick(function(){fullscreen(this)});$('div#filler').click(function(){if($('div#dialog').hasClass('modal')){} -else{$('div#dialog').removeClass('is-open').addClass('is-closed');$('div#dialog > .view').html('')}})};function loadView(e,t,i,a,n){Navigator.navigateToNewAction(t,i,a,n)};function afterViewLoaded(e){var t=$(e).closest('section'),i=$(e).children().length>0;t.toggleClass('disabled',!i);$(e).trigger('orViewLoaded');$(e).closest('div.panel').find('div.header div.dropdown div.entry.perview').remove();$(e).find('.toggle-nav-open-close').click(function(){$('nav').toggleClass('open')});$(e).find('div.headermenu > a').each(function(e,t){});$(e).find('div.header > a.back').each(function(t,i){$(i).removeClass('button').wrap('<div class="entry perview" />').parent().appendTo($(e).closest('div.panel').find('div.header div.dropdown').first())});$(e).find('div.selector.tree').each(function(){var e=this;$(this).orTree({type:'project',selectable:$(e).attr('data-types').split(','),id:$(e).attr('data-init-folderid'),onSelect:function(t,i,a){var n=$(e).parent();$(n).find('input[type=text]').attr('value',t);$(n).find('input[type=hidden]').attr('value',a)}})});$('div.content li.object').draggable({cursor:'move',revert:'invalid'});$('div.content li.object > .entry[data-type=\'folder\']').droppable({accept:'li.object',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,t){var i=t.draggable,a=$(this).parent();startDialog($(this).text(),$(i).attr('data-type'),'copy',$(a).attr('data-id'),{'action':$(i).attr('data-type'),'subaction':'copy','id':$(i).attr('data-id'),'targetFolderId':$(a).attr('data-id')});$(i).detach().css({top:0,left:0}).appendTo(a).click()}});$(e).find('input').change(function(){$(this).parent('div.view').addClass('dirty')});$(e).find('select.theme-chooser').change(function(){setUserStyle(this.value)})};function registerHeaderEvents(){$('body').click(function(){$('.toolbar-icon.menu').parent().removeClass('open')});$('#title .toolbar-icon.menu').click(function(e){e.stopPropagation();$(this).parent().toggleClass('open')});$('#title .toolbar-icon.menu').mouseover(function(){$(this).parent().find('.toolbar-icon.menu').removeClass('open');$(this).addClass('open')});$('#title div.search input').blur(function(){$('div.search input div.dropdown').fadeOut()});$('#title div.search input').orSearch({dropdown:'#title div.search div.dropdown'})};function fullscreen(e){$(e).closest('div.panel').fadeOut('fast',function(){$(this).toggleClass('fullscreen').fadeIn('fast')})};function loadTree(){$('#navigation').html('&nbsp;');$('#navigation').orTree({type:'root',id:0,onSelect:function(e,t,i,a){$('nav').removeClass('open');openNewAction(e,t,i,a)}});$('#navigation > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click();$('#navigation > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click()};function submitUrl(e,t){postUrl(t,e)};function postUrl(e,t){e+='&output=json';$.ajax({'type':'POST',url:e,data:{},success:function(e,i,a){$('div.panel div.status div.loader').html('&nbsp;');doResponse(e,i,t)}})};function startDialog(e,t,i,a,n){if(!t)t=$('#editor').attr('data-action');a=$('#editor').attr('data-id');$('div#dialog > .view').html('<div class="header"><img class="icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+e+'</div>');$('div#dialog > .view').data('id',a);$('div#dialog').removeClass('is-closed').addClass('is-open');Workbench.loadViewIntoElement($('div#dialog > .view'),t,i,a,n)};function modalView(e,t){var i=$(e).closest('div.panel').find('li.active').attr('data-action'),a=$(e).closest('div.panel').find('li.active').attr('data-method'),n=$(e).closest('div.panel').find('li.active').attr('data-id');$(e).closest('div.content').modal({'overlayClose':'true','xxxonClose':function(){alert('close)')}});loadView($(e).closest('div.content'),i,a,n)};function setTitle(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};function openNewAction(e,t,i,a){setTitle(e);setNewAction(t,i,a)};function filterMenus(e,t,i){$('div.clickable').addClass('active');$('div.clickable.filtered').removeClass('active').addClass('inactive');$('div.clickable.filtered.on-action-'+e).addClass('active').removeClass('inactive');$('div.clickable.filtered a').attr('data-action',e);$('div.clickable.filtered a').attr('data-id',t);$('div.clickable.filtered a').attr('data-extra',JSON.stringify(i))};function setNewAction(e,t,i){Navigator.navigateToNewAction(e,'edit',t,i)};function setNewId(e){};function notifyBrowser(e){if(!('Notification' in window)){return} +else{$('div#dialog').removeClass('is-open').addClass('is-closed');$('div#dialog > .view').html('')}})};function loadView(e,t,i,a,n){Navigator.navigateToNewAction(t,i,a,n)};function afterViewLoaded(e){var t=$(e).closest('section'),i=$(e).children().length>0;t.toggleClass('disabled',!i);$(e).trigger('orViewLoaded');$(e).closest('div.panel').find('div.header div.dropdown div.entry.perview').remove();$(e).find('.toggle-nav-open-close').click(function(){$('nav').toggleClass('open')});$(e).find('div.headermenu > a').each(function(e,t){});$(e).find('div.header > a.back').each(function(t,i){$(i).removeClass('button').wrap('<div class="entry perview" />').parent().appendTo($(e).closest('div.panel').find('div.header div.dropdown').first())});$(e).find('div.selector.tree').each(function(){var e=this;$(this).orTree({type:'project',selectable:$(e).attr('data-types').split(','),id:$(e).attr('data-init-folderid'),onSelect:function(t,i,a){var n=$(e).parent();$(n).find('input[type=text]').attr('value',t);$(n).find('input[type=hidden]').attr('value',a)}})});$('div.content li.object').draggable({cursor:'move',revert:'invalid'});$('div.content li.object > .entry[data-type=\'folder\']').droppable({accept:'li.object',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,t){var i=t.draggable,a=$(this).parent();startDialog($(this).text(),$(i).attr('data-type'),'copy',$(a).attr('data-id'),{'action':$(i).attr('data-type'),'subaction':'copy','id':$(i).attr('data-id'),'targetFolderId':$(a).attr('data-id')});$(i).detach().css({top:0,left:0}).appendTo(a).click()}});$(e).find('input').change(function(){$(this).parent('div.view').addClass('dirty')});$(e).find('select.theme-chooser').change(function(){setUserStyle(this.value)})};function registerHeaderEvents(){$('body').click(function(){$('.toolbar-icon.menu').parent().removeClass('open')});$('#title .toolbar-icon.menu').click(function(e){e.stopPropagation();$(this).parent().toggleClass('open')});$('#title .toolbar-icon.menu').mouseover(function(){$(this).parent().find('.toolbar-icon.menu').removeClass('open');$(this).addClass('open')});$('#title div.search input').blur(function(){$('div.search input div.dropdown').fadeOut()});$('#title div.search input').orSearch({dropdown:'#title div.search div.dropdown'})};function fullscreen(e){$(e).closest('div.panel').fadeOut('fast',function(){$(this).toggleClass('fullscreen').fadeIn('fast')})};function loadTree(){$('#navigation div.tree').addClass('closed').find('.arrow').addClass('arrow-right');$('#navigation').orTree({type:'root',id:0,onSelect:function(e,t,i,a){$('nav').removeClass('open');openNewAction(e,t,i,a)}})};function submitUrl(e,t){postUrl(t,e)};function postUrl(e,t){e+='&output=json';$.ajax({'type':'POST',url:e,data:{},success:function(e,i,a){$('div.panel div.status div.loader').html('&nbsp;');doResponse(e,i,t)}})};function startDialog(e,t,i,a,n){if(!t)t=$('#editor').attr('data-action');a=$('#editor').attr('data-id');$('div#dialog > .view').html('<div class="header"><img class="icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+e+'</div>');$('div#dialog > .view').data('id',a);$('div#dialog').removeClass('is-closed').addClass('is-open');Workbench.loadViewIntoElement($('div#dialog > .view'),t,i,a,n)};function modalView(e,t){var i=$(e).closest('div.panel').find('li.active').attr('data-action'),a=$(e).closest('div.panel').find('li.active').attr('data-method'),n=$(e).closest('div.panel').find('li.active').attr('data-id');$(e).closest('div.content').modal({'overlayClose':'true','xxxonClose':function(){alert('close)')}});loadView($(e).closest('div.content'),i,a,n)};function setTitle(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};function openNewAction(e,t,i,a){setTitle(e);setNewAction(t,i,a)};function filterMenus(e,t,i){$('div.clickable').addClass('active');$('div.clickable.filtered').removeClass('active').addClass('inactive');$('div.clickable.filtered.on-action-'+e).addClass('active').removeClass('inactive');$('div.clickable.filtered a').attr('data-action',e);$('div.clickable.filtered a').attr('data-id',t);$('div.clickable.filtered a').attr('data-extra',JSON.stringify(i))};function setNewAction(e,t,i){Navigator.navigateToNewAction(e,'edit',t,i)};function setNewId(e){};function notifyBrowser(e){if(!('Notification' in window)){return} else if(Notification.permission==='granted'){var t=new Notification(e)} -else if(Notification.permission!=='denied'){Notification.requestPermission(function(t){if(t==='granted'){var i=new Notification(e)}})}};function setUserStyle(e){var t=$('html'),i=t.attr('class').split(/\s+/);$.each(i,function(e,i){if(i.startsWith('theme-')){t.removeClass(i)}});t.addClass('theme-'+e.toLowerCase())};function insert(e,t,i){var a=document.forms[0].elements[e];a.focus();if(typeof document.selection!='undefined'){var c=document.selection.createRange(),n=c.text;c.text=t+n+i;c=document.selection.createRange();if(n.length==0){c.move('character',-i.length)} -else{c.moveStart('character',t.length+n.length+i.length)};c.select()} -else if(typeof a.selectionStart!='undefined'){var r=a.selectionStart,l=a.selectionEnd,n=a.value.substring(r,l);a.value=a.value.substr(0,r)+t+n+i+a.value.substr(l);var o;if(n.length==0){o=r+t.length} -else{o=r+t.length+n.length+i.length};a.selectionStart=o;a.selectionEnd=o} -else{o=a.value.length;var n=prompt('Text');a.value=a.value.substr(0,o)+t+n+i+a.value.substr(o)}};function createUrl(e,t,i,a,o){var n='./';n+='?action='+e;if(t!=null)n+='&subaction='+t;n+='&id='+i;if(o)n+='&embed=1';if(typeof a==='string'){a=a.replace(/'/g,'"');var c=jQuery.parseJSON(a);jQuery.each(c,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} +else if(Notification.permission!=='denied'){Notification.requestPermission(function(t){if(t==='granted'){var i=new Notification(e)}})}};function setUserStyle(e){var t=$('html'),i=t.attr('class').split(/\s+/);$.each(i,function(e,i){if(i.startsWith('theme-')){t.removeClass(i)}});t.addClass('theme-'+e.toLowerCase())};function insert(e,t,i){var a=document.forms[0].elements[e];a.focus();if(typeof document.selection!='undefined'){var r=document.selection.createRange(),n=r.text;r.text=t+n+i;r=document.selection.createRange();if(n.length==0){r.move('character',-i.length)} +else{r.moveStart('character',t.length+n.length+i.length)};r.select()} +else if(typeof a.selectionStart!='undefined'){var c=a.selectionStart,s=a.selectionEnd,n=a.value.substring(c,s);a.value=a.value.substr(0,c)+t+n+i+a.value.substr(s);var o;if(n.length==0){o=c+t.length} +else{o=c+t.length+n.length+i.length};a.selectionStart=o;a.selectionEnd=o} +else{o=a.value.length;var n=prompt('Text');a.value=a.value.substr(0,o)+t+n+i+a.value.substr(o)}};function createUrl(e,t,i,a,o){var n='./';n+='?action='+e;if(t!=null)n+='&subaction='+t;n+='&id='+i;if(o)n+='&embed=1';if(typeof a==='string'){a=a.replace(/'/g,'"');var r=jQuery.parseJSON(a);jQuery.each(r,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} else if(typeof a==='object'){jQuery.each(a,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} else{};return n};function resizeWorkbenchContainer(e){};function resizeWorkbench(){};function resizeTabs(e){};function help(e,t,i){var a=$(e).closest('div.panel').find('li.action.active').attr('data-action'),n=$(e).closest('div.panel').find('li.action.active').attr('data-method');window.open(t+a+'/'+n+i,'OpenRat_Help','location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes')};function notify(e,t){var i=$('<div class="notice '+e+'"><div class="text">'+t+'</div></div>');$('#noticebar').prepend(i);$(i).fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})})};function registerOpenClose(e){$(e).children('.on-click-open-close').click(function(){$(this).closest('.toggle-open-close').toggleClass('open closed')})}; \ No newline at end of file diff --git a/modules/util/Tree.class.php b/modules/util/Tree.class.php @@ -73,7 +73,6 @@ class Tree $treeElement->action = 'projectlist'; $treeElement->icon = 'projectlist'; $treeElement->type = 'projects'; - $treeElement->target = 'cms_main'; $this->addTreeElement($treeElement); @@ -115,7 +114,6 @@ class Tree $treeElement->url = Html::url('user', 'listing', 0, array(REQ_PARAM_TARGET => 'content')); $treeElement->action = 'userlist'; $treeElement->icon = 'userlist'; - $treeElement->target = 'cms_main'; $treeElement->type = 'users'; $this->addTreeElement($treeElement); @@ -126,7 +124,6 @@ class Tree $treeElement->url = Html::url('group', 'listing', 0, array(REQ_PARAM_TARGET => 'content')); $treeElement->action = 'grouplist'; $treeElement->icon = 'userlist'; - $treeElement->target = 'cms_main'; $treeElement->type = 'groups'; $this->addTreeElement($treeElement); @@ -158,7 +155,6 @@ class Tree $treeElement->action = 'project'; $treeElement->type = 'project'; $treeElement->description = ''; - $treeElement->target = 'cms_main'; $this->addTreeElement($treeElement); } @@ -193,7 +189,6 @@ class Tree $treeElement->icon = 'folder'; $treeElement->action = 'folder'; // $treeElement->url = Html::url( 'folder','',$folder->objectid,array(REQ_PARAM_TARGET=>'content') ); - $treeElement->target = 'content'; $treeElement->type = 'folder'; $treeElement->internalId = $folder->objectid; $this->addTreeElement($treeElement); @@ -213,7 +208,6 @@ class Tree $treeElement->description = lang('GLOBAL_TEMPLATES_DESC'); $treeElement->icon = 'templatelist'; $treeElement->action = 'templatelist'; - $treeElement->target = 'content'; $treeElement->type = 'templates'; $this->addTreeElement($treeElement); } @@ -230,7 +224,6 @@ class Tree // $treeElement->url = Html::url('language','listing',0,array(REQ_PARAM_TARGETSUBACTION=>'listing',REQ_PARAM_TARGET=>'content')); $treeElement->icon = 'languagelist'; $treeElement->description = lang('GLOBAL_LANGUAGES_DESC'); - $treeElement->target = 'content'; // Nur fuer Projekt-Administratoren aufklappbar if ($userIsProjectAdmin) @@ -255,7 +248,6 @@ class Tree // $treeElement->url = Html::url('model','listing',0,array(REQ_PARAM_TARGETSUBACTION=>'listing',REQ_PARAM_TARGET=>'content')); $treeElement->action = 'modellist'; $treeElement->icon = 'modellist'; - $treeElement->target = 'content'; $this->addTreeElement($treeElement); @@ -269,7 +261,6 @@ class Tree $treeElement->action = 'search'; $treeElement->icon = 'search'; $treeElement->description = lang('GLOBAL_SEARCH_DESC'); - $treeElement->target = 'content'; $this->addTreeElement($treeElement); } @@ -301,7 +292,6 @@ class Tree $desc .= ' - ' . $user->desc; $treeElement->description = $desc; - $treeElement->target = 'cms_main'; $this->addTreeElement($treeElement); } @@ -327,7 +317,6 @@ class Tree array(REQ_PARAM_TARGET => 'content')); $treeElement->icon = 'group'; $treeElement->description = lang('GLOBAL_GROUP') . ' ' . $g->name . ': ' . implode(', ', $g->getUsers()); - $treeElement->target = 'cms_main'; $treeElement->type = 'userofgroup'; $treeElement->action = 'group'; @@ -355,7 +344,6 @@ class Tree $treeElement->icon = 'user'; $treeElement->action = 'user'; $treeElement->description = $u->fullname; - $treeElement->target = 'cms_main'; $this->addTreeElement($treeElement); } @@ -395,7 +383,6 @@ class Tree $treeElement->description .= ' - ' . Text::maxLaenge(25, $element->desc); else $treeElement->description .= ' - ' . lang('GLOBAL_NO_DESCRIPTION_AVAILABLE'); - $treeElement->target = 'content'; if (in_array($element->type, array('link', 'list', 'include'))) { $treeElement->type = 'value'; @@ -441,7 +428,6 @@ class Tree $treeElement->description .= ' - ' . Text::maxLaenge(25, $object->desc); else $treeElement->description .= ' - ' . lang('GLOBAL_NO_DESCRIPTION_AVAILABLE'); - $treeElement->target = 'content'; $this->addTreeElement($treeElement); } @@ -460,7 +446,6 @@ class Tree $treeElement = new TreeElement(); $treeElement->id = $o->objectid; $treeElement->internalId = $o->objectid; - $treeElement->target = 'content'; $treeElement->text = $o->name; $treeElement->description = lang('GLOBAL_' . $o->getType()) . ' ' . $id; @@ -505,7 +490,6 @@ class Tree $treeElement->id = $o->objectid; $treeElement->internalId = $o->objectid; $treeElement->extraId = array(REQ_PARAM_LANGUAGE_ID => $f->languageid, REQ_PARAM_MODEL_ID => $f->modelid); - $treeElement->target = 'content'; $treeElement->text = $o->name; $treeElement->description = lang('GLOBAL_' . $o->getType()) . ' ' . $o->objectid; @@ -564,7 +548,6 @@ class Tree $treeElement->url = Html::url('template', 'src', $id, array(REQ_PARAM_TARGETSUBACTION => 'src', REQ_PARAM_TARGET => 'content')); $treeElement->icon = 'template'; $treeElement->action = 'template'; - $treeElement->target = 'content'; $treeElement->internalId = $id; $treeElement->extraId = array(REQ_PARAM_LANGUAGE_ID => $_REQUEST[REQ_PARAM_LANGUAGE_ID], REQ_PARAM_MODEL_ID => $_REQUEST[REQ_PARAM_MODEL_ID]); $treeElement->type = 'template'; @@ -603,7 +586,6 @@ class Tree else $desc = $e->desc; $treeElement->description = $e->name . ' (' . lang('EL_' . $e->type) . '): ' . Text::maxLaenge(40, $desc); - $treeElement->target = 'content'; $this->addTreeElement($treeElement); } } @@ -627,7 +609,6 @@ class Tree $treeElement->icon = 'language'; $treeElement->action = 'language'; $treeElement->description = ''; - $treeElement->target = 'content'; $this->addTreeElement($treeElement); } } @@ -649,7 +630,6 @@ class Tree $treeElement->action = 'model'; $treeElement->icon = 'model'; $treeElement->description = ''; - $treeElement->target = 'content'; $this->addTreeElement($treeElement); } } diff --git a/modules/util/TreeElement.class.php b/modules/util/TreeElement.class.php @@ -47,7 +47,6 @@ class TreeElement var $description = ""; var $url = ""; var $icon = ""; - var $target = ""; var $action = ""; /** @@ -64,6 +63,8 @@ class TreeElement * @type String */ var $type = ""; + + public $children = array(); // Konstruktor