print $form->redirect_header($form->{callback});
$form->redirect($locale->text('GL transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id});
} elsif ($::instance_conf->get_gl_add_doc && $::instance_conf->get_doc_storage) {
- my $add_doc_url = build_std_url("script=gl.pl", 'action=edit', 'id=' . E($form->{id}));
+ my $add_doc_url = build_std_url("script=gl.pl", 'action=edit', 'id=' . E($form->{id}), 'fragment=ui-tabs-docs');
print $form->redirect_header($add_doc_url);
$form->redirect($locale->text('GL transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id});
}
$('.overlay_div img').on('click', ns.download);
};
+ ns.doc_tab_init = function(tabs_id, doc_tab_id, id, object_type) {
+ var url = 'controller.pl?action=File/list&file_type=document&object_type=' + object_type + '&object_id=' + $('#id').val();
+
+ $('#' + tabs_id).on('tabsbeforeactivate', function(e, ui) {
+ if (ui.newPanel.attr('id') !== doc_tab_id) return;
+ $('#' + doc_tab_id).html(kivi.t8('Loading...'));
+ $('#' + doc_tab_id).load(url);
+ });
+
+ $('#' + tabs_id).on('tabscreate', function(e, ui) {
+ if (ui.panel.attr('id') !== doc_tab_id) return;
+ $('#' + doc_tab_id).html(kivi.t8('Loading...'));
+ $('#' + doc_tab_id).load(url);
+ });
+ };
+
});
});
};
});
+
+$(function() {
+ kivi.File.doc_tab_init('gl_tabs', 'ui-tabs-docs', $('#id').val(), 'gl_transaction');
+});
"July":"Juli",
"Jun":"Jun",
"June":"Juni",
+"Loading...":"Wird geladen...",
"Map":"Karte",
"Mar":"März",
"March":"März",
"July":"",
"Jun":"",
"June":"",
+"Loading...":"",
"Map":"",
"Mar":"",
"March":"",
<input type="hidden" name="follow_up_trans_info_1" value="[% id | html %]">
<input type="hidden" name="follow_up_rowcount" value="1">
-<div id="ir_tabs" class="tabwidget">
+<div id="gl_tabs" class="tabwidget">
<ul>
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
[%- IF INSTANCE_CONF.get_webdav %]
[%- END %]
[%- IF id %]
[%- IF INSTANCE_CONF.get_doc_storage %]
- <li><a href="controller.pl?action=File/list&file_type=document&object_type=gl_transaction&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
+ <li><a href="#ui-tabs-docs">[% 'Documents' | $T8 %]</a></li>
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=gl_transaction&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
[%- END %]
[%- END %]
</ul>
+
+[%- IF INSTANCE_CONF.get_doc_storage %]
+ <div id="ui-tabs-docs"></div>
+[%- END %]
+
<div id="ui-tabs-basic-data">
<table width=100%>