use List::MoreUtils qw(apply);
sub javascripts_inline {
- _setup_formats(),
- _setup_focus(),
+ my ($self) = @_;
+
+ my $datefmt = apply {
+ s/d+/dd/gi;
+ s/m+/mm/gi;
+ s/y+/yy/gi;
+ } $::myconfig{dateformat};
+
+ return $self->render(
+ 'layout/javascript_setup',
+ { type => 'js', output => 0, },
+ datefmt => $datefmt,
+ focus => $::request->layout->focus,
+ ajax_spinner => 1,
+ );
}
sub use_javascript {
$self->SUPER::use_stylesheet(@_);
}
-sub _setup_formats {
- my $datefmt = apply {
- s/d+/dd/gi;
- s/m+/mm/gi;
- s/y+/yy/gi;
- } $::myconfig{dateformat};
-
- $::form->parse_html_template('layout/javascript_setup', { datefmt => $datefmt });
-}
-
-sub _setup_focus {
- if ($::request->{layout}->focus) {
- return $::form->parse_html_template('layout/focus_setup', {
- focus => $::request->{layout}->focus,
- })
- } else {
- return ();
- }
-}
-
1;
# User name to use for database access
login =
# Set to 1 for debug messages in /tmp/kivitendo-debug.log
-debug = 1
+debug = 0
# Chose a system user the daemon should run under when started as root.
run_as =
padding: 0;
border: 0;
overflow: hidden;
+ min-height: 20px;
width: 100%;
border-spacing: 0;
font-size: 12px;
font-family: verdana,arial,sans-serif;
vertical-align: middle;
}
+
+#frame-header #ajax-spinner {
+ margin-top: 2px;
+ margin-right: 10px;
+ display: none;
+}
color: white;
border: 0;
overflow: hidden;
+ min-height: 20px;
width: 100%;
border-spacing: 0;
font-size: 12px;
font-family: verdana,arial,sans-serif;
vertical-align: middle;
}
+
+#frame-header #ajax-spinner {
+ margin-top: 2px;
+ margin-right: 10px;
+ display: none;
+ width: 16px;
+ height: 16px;
+ min-width: 16px;
+ min-height: 16px;
+}
+++ /dev/null
-function fokus(){ [% IF focus %]$('[% focus %]').focus()[% END %] }
+++ /dev/null
-[%- USE T8 %]
-$(function() {
- setupPoints('[% myconfig.numberformat %]', '[% 'wrongformat' | $T8 %]');
- setupDateFormat('[% myconfig.dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
-
- $.datepicker.setDefaults(
- $.extend({}, $.datepicker.regional["[% myconfig.countrycode %]"], {
- dateFormat: "[% datefmt %]",
- showOn: "button",
- showButtonPanel: true,
- changeMonth: true,
- changeYear: true,
- buttonImage: "image/calendar.png",
- buttonImageOnly: true
- }));
-
- $('.datepicker').each(function() {
- $(this).datepicker();
- });
-})
--- /dev/null
+[%- USE T8 %]
+$(function() {
+[% IF datefmt %]
+ setupPoints('[% MYCONFIG.numberformat %]', '[% 'wrongformat' | $T8 %]');
+ setupDateFormat('[% MYCONFIG.dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
+
+ $.datepicker.setDefaults(
+ $.extend({}, $.datepicker.regional["[% MYCONFIG.countrycode %]"], {
+ dateFormat: "[% datefmt %]",
+ showOn: "button",
+ showButtonPanel: true,
+ changeMonth: true,
+ changeYear: true,
+ buttonImage: "image/calendar.png",
+ buttonImageOnly: true
+ }));
+
+ $('.datepicker').each(function() {
+ $(this).datepicker();
+ });
+[% END %]
+
+[% IF ajax_spinner %]
+ $(document).ajaxSend(function() {
+ $('#ajax-spinner').show();
+ }).ajaxStop(function() {
+ $('#ajax-spinner').hide();
+ });
+[% END %]
+});
+
+function fokus() {
+[%- IF focus -%]
+ $('[% focus %]').focus();
+[%- END -%]
+}
-[%- USE T8 %]
+[%- USE T8 %][%- USE LxERP -%]
<div id="frame-header">
[% UNLESS is_links %]
<span class="frame-header-element frame-header-left">
[% now.to_lxoffice %] -
[% now.hms %]
</span>
+ <span class="frame-header-element frame-header-right" id="ajax-spinner">
+ <img src="image/[% IF MYCONFIG.stylesheet == 'lx-office-erp.css' %]spinner-blue.gif[% ELSE %]spinner-white.gif[% END %]" alt="[% LxERP.t8('Loading...') %]">
+ </span>
</div>
[%- USE T8 %]
-[% USE HTML %]
+[% USE HTML %][%- USE LxERP -%]
<script type="text/javascript">
<!--
function clockon() {
<a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
[% date %] <span id='clock_id' style='position:relative'></span>
</span>
+ <span class="frame-header-element frame-header-right" id="ajax-spinner">
+ <img src="image/[% IF MYCONFIG.stylesheet == 'lx-office-erp.css' %]spinner-blue.gif[% ELSE %]spinner-white.gif[% END %]" alt="[% LxERP.t8('Loading...') %]">
+ </span>
</div>
<div id="main_menu_div"></div>
[%- USE T8 %]
-[% USE HTML %]
+[% USE HTML %][%- USE LxERP -%]
<script type="text/javascript" src="js/quicksearch_input.js"></script>
<script type="text/javascript">
<!--
<a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
[% date %] <span id='clock_id' style='position:relative'></span>
</span>
+ <span class="frame-header-element frame-header-right" id="ajax-spinner">
+ <img src="image/[% IF MYCONFIG.stylesheet == 'lx-office-erp.css' %]spinner-blue.gif[% ELSE %]spinner-white.gif[% END %]" alt="[% LxERP.t8('Loading...') %]">
+ </span>
</div>
<div id="menuv3">