From 81903154e24efaaa51d9a190a869b4c0ce2e5e09 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 5 Mar 2013 10:19:21 +0100 Subject: [PATCH] Globaler AJAX-Spinner in Headerzeile rechts --- SL/Layout/None.pm | 5 +++++ css/kivitendo/frame_header/header.css | 7 +++++++ css/lx-office-erp/frame_header/header.css | 11 +++++++++++ image/spinner-blue.gif | Bin 0 -> 847 bytes image/spinner-white.gif | Bin 0 -> 847 bytes templates/webpages/layout/ajax_spinner_setup.js | 7 +++++++ templates/webpages/menu/header.html | 5 ++++- templates/webpages/menu/menunew.html | 5 ++++- templates/webpages/menu/menuv3.html | 5 ++++- 9 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 image/spinner-blue.gif create mode 100644 image/spinner-white.gif create mode 100644 templates/webpages/layout/ajax_spinner_setup.js 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 0000000000000000000000000000000000000000..8e3f3b10682051d5d93944d5e39cc11ee045d110 GIT binary patch literal 847 zcmZ?wbhEHb6krfw_`<-DG3na>|Npb6T)Xq^>xQE*fBpXZ{OynW#dl_Hd;IasuN|jf zAH4LoeD19!d!Kc#ym$Hjr_(n-FpvTi|8x7fh6Fo12DlpO889;f^(y|8axO|uEJ;mK zD9+}1yrR2vIXQw2G#%tg}#)`c}opMaul^%5>~C9 zA#!Y@lxf2UwwoOd(Y-7-Oqs0#69rlsJ6jj^txP# znr1852#b8Gls)>s-wB%~843zr?w5Kpw4{zcSh2!E#kKapfrHnMGI8`wX-Lfw5#l*` zK*2$f%jZDDhvY!_W+taCPqzh_&QP#fWg40ixJ~Oe;?`>ncX7DG7s;^5z=Kn)RmY&u=?Yh0wt&~O zw>+Wtrsd2mH7eP>F`E25-B>LRf&^=W!W1S$k)sYPnw{m?)`%a=?rxgHsOa=0!JeUU zJJY@i%C1coRZf8s4avK67nN}fDJ@iZd1!G$V?rBmsM|8hqC1j&OAB6Weop(}fYln1 z-+-~V!hy%tP~gx>iQHI;<2xlhdM>ox&|nwnVliP-c&?!%vCK^|(Sso(cm_vfuIZAk zj7csYTi6&@?MzJ4;p$UuC@>aFKBBxq{Ri(GC3X`t^8hui2>k|)o?aEKmc~OZ^#FQ| zW0`{q!=X*b9F;sLa%`BjFoDA^ua(u)K&3;XSI*mf6R(F3`@v4#l4h-@W>+Z@fhC7^ sFD9($NI1asQ^2s3Lt?{phkib1^9&AsLzXnw7|re;HAMz%Q1S!=0KLo-a{vGU literal 0 HcmV?d00001 diff --git a/image/spinner-white.gif b/image/spinner-white.gif new file mode 100644 index 0000000000000000000000000000000000000000..e192ca895cd00d6b752ec84619b787188f30ee41 GIT binary patch literal 847 zcmZ?wbhEHb6krfw_`<;O|Nnmm28JI$eppyow6wIav9YPCsa?BvZN-WeVq#)tWo2n; zX-}R!nK5I=v17+PJUqg}!hq_D2a5l>{aizWogD*Qjr0td8G$+#|4BI)r6!i7rYMwW zmSiX-W+hhSNI#p{aB=u^kJ9BqzM)+D@@g7D>_ZH z6>Nk>K2^#dec$hd&5{fSg)a9?JsDb3M<1+M;h^GLd*HyqYe$(ldZsj_W{3#!96X@l zAjsu&py5MupnEfu)0U^(0!(Kp*sL-QO$pql{X%Kq;`Av7E5z0lI$B?E`RzKdsAZ)9=nHHN!5+~JF4SY+VADb}iE(C2i8t1nx?>)BhL zPS>_TA<--6ZN7=uLx=rfr*28JR#UU9l!(BR!@3s} qR&*pBVEQRw*vTQWVY)*bLIMx~ literal 0 HcmV?d00001 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 -%]