Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4856da7e

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID 4856da7e20f5dba5c1ecca440869de3f6bb0a70a
  • Vorgänger b6aa691e
  • Nachfolger 68f1c66a

Einführung eines simplen Anzeige-Systems für Fehler, Warnungen, Informationen

Minimal an Rails' "flash"-Methode angelehnt, heißt auch so,
funktioniert aber noch nicht über Request-Grenzen hinweg. Ausgabe
erfolgt momentan nur in alle Einkaufs- und
Verkaufsbeleg-Bearbeiten-Masken.

Conflicts:

bin/mozilla/io.pl
templates/webpages/do/form_header.html
templates/webpages/ir/form_header.html
templates/webpages/is/form_header.html
templates/webpages/oe/form_header.html

Unterschiede anzeigen:

bin/mozilla/common.pl
727 727
  $main::lxdebug->leave_sub();
728 728
}
729 729

  
730
sub flash {
731
  my $category = shift;
732

  
733
  $::form->{FLASH} ||= { };
734
  $::form->{FLASH}->{ $category } ||= [ ];
735
  push @{ $::form->{FLASH}->{ $category } }, @_;
736
}
737

  
738
sub render_flash {
739
  return $::form->parse_html_template('common/flash');
740
}
741

  
730 742
if ($::use_rdbo) {
731 743
  eval {
732 744
    require SL::DB::Helpers::Mappings;
css/lx-office-erp.css
288 288
  height:0;
289 289
  visibility:hidden;
290 290
}
291

  
292
.flash_message_error {
293
  background-color:#FFD6D6;
294
  border: 1px solid #AE0014;
295
  margin-top: 2px;
296
  margin-bottom: 2px;
297
}
298

  
299
.flash_message_warning {
300
  background-color:#FFE8C7;
301
  border: 1px solid #FF6600;
302
  margin-top: 2px;
303
  margin-bottom: 2px;
304
}
305

  
306
.flash_message_info {
307
  background-color:#DCF2FF;
308
  border: 1px solid #4690FF;
309
  margin-top: 2px;
310
  margin-bottom: 2px;
311
}
templates/webpages/do/form_header.html
50 50

  
51 51
 <div class="listtop">[% title %]</div>
52 52

  
53
[%- INCLUDE 'common/flash.html' %]
54

  
53 55
 [%- IF ERRORS && ERRORS.size %]
54 56
 <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
55 57
 [%- END %]
templates/webpages/ir/form_header.html
26 26

  
27 27
<p><div class="listtop" width="100%">[% title %]</div></p>
28 28

  
29
[%- INCLUDE 'common/flash.html' %]
30

  
29 31
<table width="100%">
30 32
  <tr>
31 33
    <td valign="top">
templates/webpages/is/form_header.html
26 26

  
27 27
<p>[% saved_message %]</p>
28 28

  
29
[%- INCLUDE 'common/flash.html' %]
30

  
29 31
<table width="100%">
30 32
  <tr>
31 33
    <td valign="top">
templates/webpages/oe/form_header.html
25 25

  
26 26
    <div class="listtop">[% title %]</div>
27 27

  
28
[%- INCLUDE 'common/flash.html' %]
29

  
28 30
    <table width="100%">
29 31
      <tr height="5"></tr>
30 32
      <tr>

Auch abrufbar als: Unified diff