From: Moritz Bunkus Date: Tue, 5 Mar 2013 09:19:21 +0000 (+0100) Subject: Globaler AJAX-Spinner in Headerzeile rechts X-Git-Tag: release-3.1.0beta1~569^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=81903154e24efaaa51d9a190a869b4c0ce2e5e09;p=kivitendo-erp.git Globaler AJAX-Spinner in Headerzeile rechts --- diff --git a/SL/Layout/None.pm b/SL/Layout/None.pm index 60b8512fe..ffd5bb55e 100644 --- a/SL/Layout/None.pm +++ b/SL/Layout/None.pm @@ -8,6 +8,7 @@ use List::MoreUtils qw(apply); sub javascripts_inline { _setup_formats(), _setup_focus(), + _setup_ajax_spinner(), } sub use_javascript { @@ -48,4 +49,8 @@ sub _setup_focus { } } +sub _setup_ajax_spinner { + return SL::Presenter->get->render('layout/ajax_spinner_setup', { type => 'js' }); +} + 1; diff --git a/css/kivitendo/frame_header/header.css b/css/kivitendo/frame_header/header.css index 376cb1e10..80ab601fb 100644 --- a/css/kivitendo/frame_header/header.css +++ b/css/kivitendo/frame_header/header.css @@ -11,6 +11,7 @@ padding: 0; border: 0; overflow: hidden; + min-height: 20px; width: 100%; border-spacing: 0; font-size: 12px; @@ -31,3 +32,9 @@ font-family: verdana,arial,sans-serif; vertical-align: middle; } + +#frame-header #ajax-spinner { + margin-top: 2px; + margin-right: 10px; + display: none; +} diff --git a/css/lx-office-erp/frame_header/header.css b/css/lx-office-erp/frame_header/header.css index 852a76c98..3046f2336 100644 --- a/css/lx-office-erp/frame_header/header.css +++ b/css/lx-office-erp/frame_header/header.css @@ -15,6 +15,7 @@ color: white; border: 0; overflow: hidden; + min-height: 20px; width: 100%; border-spacing: 0; font-size: 12px; @@ -36,3 +37,13 @@ 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; +} diff --git a/image/spinner-blue.gif b/image/spinner-blue.gif new file mode 100644 index 000000000..8e3f3b106 Binary files /dev/null and b/image/spinner-blue.gif differ diff --git a/image/spinner-white.gif b/image/spinner-white.gif new file mode 100644 index 000000000..e192ca895 Binary files /dev/null and b/image/spinner-white.gif differ diff --git a/templates/webpages/layout/ajax_spinner_setup.js b/templates/webpages/layout/ajax_spinner_setup.js new file mode 100644 index 000000000..675c7e6ee --- /dev/null +++ b/templates/webpages/layout/ajax_spinner_setup.js @@ -0,0 +1,7 @@ +$(function() { + $(document).ajaxSend(function() { + $('#ajax-spinner').show(); + }).ajaxStop(function() { + $('#ajax-spinner').hide(); + }); +}); diff --git a/templates/webpages/menu/header.html b/templates/webpages/menu/header.html index 869479fee..0ad43f50f 100644 --- a/templates/webpages/menu/header.html +++ b/templates/webpages/menu/header.html @@ -1,4 +1,4 @@ -[%- USE T8 %] +[%- USE T8 %][%- USE LxERP -%]
[% UNLESS is_links %] @@ -16,4 +16,7 @@ [% now.to_lxoffice %] - [% now.hms %] + + [% LxERP.t8('Loading...') %] +
diff --git a/templates/webpages/menu/menunew.html b/templates/webpages/menu/menunew.html index b94024678..11e676e08 100644 --- a/templates/webpages/menu/menunew.html +++ b/templates/webpages/menu/menunew.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[% USE HTML %][%- USE LxERP -%]