use Rose::Object::MakeMethods::Generic
(
scalar => [ qw(text_block) ],
use Rose::Object::MakeMethods::Generic
(
scalar => [ qw(text_block) ],
$self->add_new_text_block_form(output_position => $new_where, insert_after_id => $::form->{id}, requirement_spec_id => $::form->{requirement_spec_id});
$self->add_new_text_block_form(output_position => $new_where, insert_after_id => $::form->{id}, requirement_spec_id => $::form->{requirement_spec_id});
->insertAfter($html, '#text-block-' . $self->text_block->id)
->jstree->select_node('#tree', '#tb-' . $self->text_block->id)
->focus('#edit_text_block_' . $self->text_block->id . '_title')
->insertAfter($html, '#text-block-' . $self->text_block->id)
->jstree->select_node('#tree', '#tb-' . $self->text_block->id)
->focus('#edit_text_block_' . $self->text_block->id . '_title')
->replaceWith('#text-block-' . $self->text_block->id, $html)
->run(SORTABLE_PICTURE_LIST())
->jstree->rename_node('#tree', '#tb-' . $self->text_block->id, $self->text_block->title)
->replaceWith('#text-block-' . $self->text_block->id, $html)
->run(SORTABLE_PICTURE_LIST())
->jstree->rename_node('#tree', '#tb-' . $self->text_block->id, $self->text_block->title)
- ->prop('#tb-' . $self->text_block->id, 'title', $self->text_block->content_excerpt)
+ ->prop('#tb-' . $self->text_block->id . ' a', 'title', $self->text_block->content_excerpt)
+ ->addClass('#tb-' . $self->text_block->id . ' a', 'tooltip')
+ ->reinit_widgets
my $dropped_type = $position ne 'last' ? undef : $::form->{dropped_type} =~ m/^ text-blocks- (?:front|back) $/x ? $::form->{dropped_type} : die "Unknown 'dropped_type' parameter";
my $old_where = $self->text_block->output_position;
my $dropped_type = $position ne 'last' ? undef : $::form->{dropped_type} =~ m/^ text-blocks- (?:front|back) $/x ? $::form->{dropped_type} : die "Unknown 'dropped_type' parameter";
my $old_where = $self->text_block->output_position;
1;
$self->text_block->remove_from_list;
$self->text_block->output_position($position =~ m/before|after/ ? $dropped_text_block->output_position : $::form->{dropped_type} eq 'text-blocks-front' ? 0 : 1);
1;
$self->text_block->remove_from_list;
$self->text_block->output_position($position =~ m/before|after/ ? $dropped_text_block->output_position : $::form->{dropped_type} eq 'text-blocks-front' ? 0 : 1);
sub load_requirement_spec_text_block {
my ($self) = @_;
$self->text_block(SL::DB::RequirementSpecTextBlock->new(id => $::form->{id})->load || die "No such requirement spec text block");
sub load_requirement_spec_text_block {
my ($self) = @_;
$self->text_block(SL::DB::RequirementSpecTextBlock->new(id => $::form->{id})->load || die "No such requirement spec text block");
$self->js
->action($params{insert_after_id} ? 'insertAfter' : 'appendTo', $html, '#text-block-' . ($params{insert_after_id} || 'list'))
$self->js
->action($params{insert_after_id} ? 'insertAfter' : 'appendTo', $html, '#text-block-' . ($params{insert_after_id} || 'list'))
1;
$self->picture($copied->to_object)->save; # Create new picture from copied data and save
$self->text_block->add_pictures($self->picture); # Add new picture to text block
$self->text_block->save;
})) {
$::lxdebug->message(LXDebug::WARN(), "Error: " . $self->text_block->db->error);
1;
$self->picture($copied->to_object)->save; # Create new picture from copied data and save
$self->text_block->add_pictures($self->picture); # Add new picture to text block
$self->text_block->save;
})) {
$::lxdebug->message(LXDebug::WARN(), "Error: " . $self->text_block->db->error);
}
my $html = $self->render('requirement_spec_text_block/_text_block_picture', { output => 0 }, picture => $self->picture);
}
my $html = $self->render('requirement_spec_text_block/_text_block_picture', { output => 0 }, picture => $self->picture);
$self->invalidate_version
->append('#text-block-' . $self->text_block->id . '-pictures', $html)
->show('#text-block-' . $self->text_block->id . '-pictures')
$self->invalidate_version
->append('#text-block-' . $self->text_block->id . '-pictures', $html)
->show('#text-block-' . $self->text_block->id . '-pictures')