PDA

Просмотр полной версии : Скрыть навигационное меню


Ивано
07.01.2013, 22:03
В одном из расширений, которое находится во вкладке "WEB" - понадобилось скрыть дерево страниц. По аналогии, как это происходит когда заходим к примеру в менеджер расширений - заходим и дерево страниц скрывается.

Не могу понять как это сделать.
Из расширения получается обращаться к страницам через Javascript
top.TYPO3.Backend.NavigationContainer.PageTree.sel ect(15);
результат - выделяется страница


Но как скрыть дерево страниц?
Пробовал тем, что нашел - но это все не работает или что-то делаю не правильно...

//if (top && top.TYPO3.Backend.NavigationContainer.PageTree) {

//top.TYPO3.Backend.NavigationContainer.PageTree.sel ect(15);
window.onload = function(){

alert(14);
window.top.document.getElementById("ext-gen33").style.width = "200px";


};
window.onunload = function(){

//window.top.document.getElementById("typo3-navigationContainer").style.display = "block";
//alert(1);

};


//top.TYPO3.Backend.NavigationContainer.hidden();
//top.TYPO3.Backend.NavigationContainer.show();

//TYPO3.Backend.NavigationContainer.hide();
//alert(1);
//top.TYPO3.Backend.NavigationContainer.PageTree.ref reshTree();
//top.goToModule("user_task");
//}


--
Спасибо.

dmartynenko
09.01.2013, 15:44
ИМХО никак. На то эта группа и назвается Web, что бы быть связанной с деревом страниц Web сайта.

Добавьте модуль в группу "Инструменты" или создайте свою группу (так делает Direct Mail)

Ивано++
22.01.2013, 18:17
Может кому пригодится при разработках...

Все таки и это возможно.
JS-функции, которые отвечают за это мне найти не удалось...
Но вот то, что они делают:

1. #typo3-navigationContainer добавляется новый класс "x-hide-display"
2. #ext-comp-1004 ставится left:0 и меняется ширина
3. #typo3-navigationContainer-xsplit - присваивается visibility: hidden;

Ивано++
22.01.2013, 19:00
Не пойму как там сверстано - но вот так работает:
Пока попробовал только в google chrome

top.TYPO3.Backend.NavigationContainer.hide();
window.top.document.getElementById("typo3-navigationContainer-xsplit").style.visibility = "hidden";
window.top.document.getElementById("ext-comp-1004").style.left = "0px";
window.top.document.getElementById("ext-comp-1004").style.width = window.top.document.getElementById("ext-comp-1003").style.width;
window.top.document.getElementById("typo3-contentContainerWrapper").style.width = window.top.document.getElementById("ext-comp-1003").style.width;
window.top.document.getElementById("typo3-contentContainer").style.width = window.top.document.getElementById("ext-comp-1003").style.width;
window.top.document.getElementById("ext-gen55").style.width = window.top.document.getElementById("ext-comp-1003").style.width;
window.top.document.getElementById("ext-gen38").style.width = window.top.document.getElementById("ext-comp-1003").style.width;
window.top.document.getElementById("ext-gen29").style.width = window.top.document.getElementById("ext-comp-1003").style.width;
window.top.document.getElementById("ext-gen58").style.width = window.top.document.getElementById("ext-comp-1003").style.width;

Ивано++
25.01.2013, 19:31
А вот и тема на эту тему...
http://forge.typo3.org/issues/27432