Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 20c848fa

Von Hans Peter Schlaepfer vor mehr als 3 Jahren hinzugefügt

  • ID 20c848fab33f1bb41aee2f9ffd9c0299f4f44dbb
  • Vorgänger 7e184961
  • Nachfolger 6e354294

Design 4.0: areainput_tag: übergebene CSS-Klasse beibehalten und Design-Änderung

Unterschiede anzeigen:

SL/Template/Plugin/L.pm
248 248
  my $minrows = delete $attributes{min_rows} || 1;
249 249
  my $maxrows = delete $attributes{max_rows};
250 250
  my $rows    = $::form->numtextrows($value, $cols, $maxrows, $minrows);
251
  my $class   = $attributes{class}; # Do not delete attribute/hash element
251 252

  
252 253
  $attributes{id} ||= _tag_id();
253 254
  my $id            = $attributes{id};
254 255

  
255 256
  return $self->textarea_tag($name, $value, %attributes, rows => $rows, cols => $cols) if $rows > 1;
256

  
257
  return '<span>'
257
  # PENDENT: Hier sollte noch eine Klasse an kivi.switch_areainput_to_textarea uebergeben werden
258
  # PENDENT: ID gugusli aus button entfernen, wird nicht angezeigt im browser (war nur Test)
259
  return '<span class="switch-form-element">'
258 260
    . $self->input_tag($name, $value, %attributes, size => $cols)
259
    . "<img src=\"image/edit-entry.png\" onclick=\"kivi.switch_areainput_to_textarea('${id}')\" style=\"margin-left: 2px;\">"
261
    . "<button class=\"wi-tiny icon\"><img src=\"image/pencil.png\" onclick=\"kivi.switch_areainput_to_textarea('${id}','".$class."')\"></button>"
260 262
    . '</span>';
261 263
}
262 264

  

Auch abrufbar als: Unified diff