Merge branch 'master' of github.com:kivitendo/kivitendo-erp
authorNiclas Zimmermann <niclas@kivitendo-premium.de>
Tue, 5 Mar 2013 14:19:07 +0000 (15:19 +0100)
committerNiclas Zimmermann <niclas@kivitendo-premium.de>
Tue, 5 Mar 2013 14:19:07 +0000 (15:19 +0100)
12 files changed:
SL/Layout/None.pm
config/kivitendo.conf.default
css/kivitendo/frame_header/header.css
css/lx-office-erp/frame_header/header.css
image/spinner-blue.gif [new file with mode: 0644]
image/spinner-white.gif [new file with mode: 0644]
templates/webpages/layout/focus_setup.html [deleted file]
templates/webpages/layout/javascript_setup.html [deleted file]
templates/webpages/layout/javascript_setup.js [new file with mode: 0644]
templates/webpages/menu/header.html
templates/webpages/menu/menunew.html
templates/webpages/menu/menuv3.html

index 60b8512..c3708bf 100644 (file)
@@ -6,8 +6,21 @@ use parent qw(SL::Layout::Base);
 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 {
@@ -28,24 +41,4 @@ sub use_stylesheet {
   $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;
index 875cfe0..9debb7b 100644 (file)
@@ -169,7 +169,7 @@ openofficeorg_daemon_port = 2002
 # 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 =
 
index 376cb1e..80ab601 100644 (file)
@@ -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;
+}
index 852a76c..3046f23 100644 (file)
@@ -15,6 +15,7 @@
   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;
+}
diff --git a/image/spinner-blue.gif b/image/spinner-blue.gif
new file mode 100644 (file)
index 0000000..8e3f3b1
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 (file)
index 0000000..e192ca8
Binary files /dev/null and b/image/spinner-white.gif differ
diff --git a/templates/webpages/layout/focus_setup.html b/templates/webpages/layout/focus_setup.html
deleted file mode 100644 (file)
index e97fb69..0000000
+++ /dev/null
@@ -1 +0,0 @@
-function fokus(){ [% IF focus %]$('[% focus %]').focus()[% END %] }
diff --git a/templates/webpages/layout/javascript_setup.html b/templates/webpages/layout/javascript_setup.html
deleted file mode 100644 (file)
index 3508ef8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-[%- 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();
-  });
-})
diff --git a/templates/webpages/layout/javascript_setup.js b/templates/webpages/layout/javascript_setup.js
new file mode 100644 (file)
index 0000000..dc51634
--- /dev/null
@@ -0,0 +1,36 @@
+[%- 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 -%]
+}
index 869479f..0ad43f5 100644 (file)
@@ -1,4 +1,4 @@
-[%- USE T8 %]
+[%- USE T8 %][%- USE LxERP -%]
 <div id="frame-header">
 [% UNLESS is_links %]
  <span class="frame-header-element frame-header-left">
@@ -16,4 +16,7 @@
   [% 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>
index b940246..11e676e 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]
+[% USE HTML %][%- USE LxERP -%]
  <script type="text/javascript">
 <!--
 function clockon() {
@@ -26,6 +26,9 @@ $(clockon);
    <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
    [% date %] <span id='clock_id' style='position:relative'></span>&nbsp;
   </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>
index 3798bdc..8872988 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]
+[% USE HTML %][%- USE LxERP -%]
  <script type="text/javascript" src="js/quicksearch_input.js"></script>
  <script type="text/javascript">
  <!--
@@ -25,6 +25,9 @@ $(clockon);
     <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
     [% date %] <span id='clock_id' style='position:relative'></span>&nbsp;
  </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">