Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b28b0afc

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID b28b0afc6b991b5050ea39f66fd1870ca27f400f
  • Vorgänger 3bbe01f7
  • Nachfolger 20220c4d

Pflichtenhefttextblöcke: AJAX-Calls für erweitertes Menü gefixt

Unterschiede anzeigen:

SL/Controller/RequirementSpecTextBlock.pm
45 45

  
46 46
  # $::lxdebug->message(0, "cur $current_where new $new_where");
47 47

  
48
  $self->show_list(output_position => $new_where, id => $::form->{clicked_id}) if ($new_where != ($current_where // -1));
48
  $self->show_list(output_position => $new_where, id => $::form->{clicked_id}, set_type => 1) if ($new_where != ($current_where // -1));
49 49

  
50 50
  $self->render($self->js);
51 51
}
......
322 322

  
323 323
sub show_list {
324 324
  my $self   = shift;
325
  my %params = Params::Validate::validate(@_, { output_position => 1, id => 0, requirement_spec_id => 0, });
325
  my %params = Params::Validate::validate(@_, { output_position => 1, id => 0, requirement_spec_id => 0, set_type => 0, });
326 326

  
327 327
  $params{requirement_spec_id} ||= $::form->{requirement_spec_id};
328 328
  croak "Unknown requirement_spec_id" if !$params{requirement_spec_id};
......
332 332

  
333 333
  $self->js->html('#column-content', $html);
334 334

  
335
  if ($params{id}) {
336
    $self->js
337
     ->val('#current_content_type', 'text-blocks-' . (0 == $params{output_position} ? 'front' : 'back'))
338
     ->val('#current_content_id',   $params{id});
339
  }
335
  $self->js->val('#current_content_type', 'text-blocks-' . (0 == $params{output_position} ? 'front' : 'back')) if $params{id} || $params{set_type};
336
  $self->js->val('#current_content_id',   $params{id})                                                         if $params{id};
340 337

  
341 338
  return $self->set_function_blocks_tab_menu_class(class => 'text-block-context-menu');
342 339
}

Auch abrufbar als: Unified diff