Files
iTop/templates/base/layouts/tab-container/layout.js.twig

18 lines
646 B
Twig

{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% if not aPage.isPrintable %}
$('#{{ oUIBlock.GetId() }}').tab_container();
{% else %}
{% for oTab in oUIBlock.GetSubBlocks() %}
oHiddeableChapters['tab_{{ oTab.GetId()|sanitize_identifier }}'] = '{{ oTab.GetTitle()|escape_for_js_string }}';
{% if oTab.GetType() == constant('TabManager::ENUM_TAB_TYPE_AJAX') %}
$.post('{{ oTab.GetUrl()|raw}}', {printable: '1'}, function(data){
$('#tab_{{ oTab.GetId()|sanitize_identifier }} > .printable-tab-content').append(data);
});
{% endif %}
{% endfor %}
{% endif %}