+sub action_ajax_copy_picture {
+ my ($self, %params) = @_;
+
+ SL::Clipboard->new->copy($self->picture);
+ SL::ClientJS->new->render($self);
+}
+
+sub action_ajax_paste_picture {
+ my ($self, %params) = @_;
+
+ my $copied = SL::Clipboard->new->get_entry(qr/^RequirementSpecPicture$/);
+ if (!$copied) {
+ return SL::ClientJS->new
+ ->error(t8("The clipboard does not contain anything that can be pasted here."))
+ ->render($self);
+ }
+
+ $self->text_block($self->picture->text_block); # Save text block via the picture the user clicked on
+
+ $self->paste_picture($copied);
+}
+
+sub action_reorder_pictures {
+ my ($self) = @_;
+
+ SL::DB::RequirementSpecPicture->reorder_list(@{ $::form->{picture_id} || [] });
+
+ $self->render(\'', { type => 'json' });
+}
+