Revision 3fbb0b9b
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Controller/RequirementSpecItem.pm | ||
---|---|---|
155 | 155 |
->hide('#column-content > *') |
156 | 156 |
->appendTo($html, '#column-content') |
157 | 157 |
->focus('#new_section_title') |
158 |
->reinit_widgets |
|
158 | 159 |
->render($self); |
159 | 160 |
} |
160 | 161 |
|
... | ... | |
241 | 242 |
->remove("#edit_section_form") |
242 | 243 |
->insertAfter($html, '#section-header-' . $self->item->id) |
243 | 244 |
->jstree->select_node('#tree', '#fb-' . $self->item->id) |
244 |
->focus("#edit_section_title") |
|
245 | 245 |
->val('#current_content_type', 'section') |
246 | 246 |
->val('#current_content_id', $self->item->id) |
247 |
->reinit_widgets |
|
248 |
->focus("#edit_section_title") |
|
247 | 249 |
->render($self); |
248 | 250 |
return; |
249 | 251 |
} |
... | ... | |
262 | 264 |
->insertAfter($html, $content_top_id) |
263 | 265 |
->run('kivi.requirement_spec.init_function_block_keypress_events', "${id_base}_form") |
264 | 266 |
->jstree->select_node('#tree', '#fb-' . $self->item->id) |
265 |
->focus("#${id_base}_description") |
|
266 | 267 |
->val('#current_content_type', $self->item->item_type) |
267 | 268 |
->val('#current_content_id', $self->item->id) |
269 |
->reinit_widgets |
|
270 |
->focus("#${id_base}_description") |
|
268 | 271 |
->render($self); |
269 | 272 |
} |
270 | 273 |
|
... | ... | |
559 | 562 |
|
560 | 563 |
sub create_dependency_item { |
561 | 564 |
my $self = shift; |
562 |
[ $_[0]->id, $self->presenter->truncate(join(' ', grep { $_ } ($_[1], $_[0]->fb_number, $_[0]->description))) ]; |
|
565 |
[ $_[0]->id, $self->presenter->truncate(join(' ', grep { $_ } ($_[1], $_[0]->fb_number, $_[0]->description_as_stripped_html))) ];
|
|
563 | 566 |
} |
564 | 567 |
|
565 | 568 |
sub create_dependencies { |
... | ... | |
611 | 614 |
->action($params{insert_position}, $html, $params{display_reference}) |
612 | 615 |
->action_if($self->item->item_type eq 'sub-function-block', 'show', '#sub-function-block-container-' . $self->item->parent_id) |
613 | 616 |
->run('kivi.requirement_spec.init_function_block_keypress_events', "${id_base}_form") |
617 |
->reinit_widgets |
|
614 | 618 |
->focus("#${id_base}_description"); |
615 | 619 |
} |
616 | 620 |
|
SL/DB/RequirementSpecItem.pm | ||
---|---|---|
12 | 12 |
use SL::DB::Manager::RequirementSpecItem; |
13 | 13 |
use SL::DB::Helper::ActsAsList; |
14 | 14 |
use SL::DB::Helper::AttrDuration; |
15 |
use SL::DB::Helper::AttrHTML; |
|
15 | 16 |
use SL::DB::Default; |
16 | 17 |
use SL::Locale::String; |
17 | 18 |
use SL::PrefixedNumber; |
... | ... | |
40 | 41 |
|
41 | 42 |
__PACKAGE__->configure_acts_as_list(group_by => [qw(requirement_spec_id parent_id)]); |
42 | 43 |
__PACKAGE__->attr_duration(qw(time_estimation)); |
44 |
__PACKAGE__->attr_html('description'); |
|
43 | 45 |
|
44 | 46 |
__PACKAGE__->before_save(\&_before_save_create_fb_number); |
45 | 47 |
__PACKAGE__->before_save(\&_before_save_invalidate_requirement_spec_version); |
... | ... | |
128 | 130 |
sub content_excerpt { |
129 | 131 |
my ($self) = @_; |
130 | 132 |
|
131 |
return Common::truncate($self->description // '', at => 200); |
|
133 |
return Common::truncate($self->description_as_stripped_html // '', at => 200);
|
|
132 | 134 |
} |
133 | 135 |
|
134 | 136 |
|
SL/Presenter/RequirementSpecItem.pm | ||
---|---|---|
12 | 12 |
sub requirement_spec_item_tree_node_title { |
13 | 13 |
my ($self, $item) = @_; |
14 | 14 |
|
15 |
return join(' ', map { $_ || '' } ($item->fb_number, $self->truncate($item->parent_id ? $item->description : $item->title, at => 30))); |
|
15 |
return join(' ', map { $_ || '' } ($item->fb_number, $self->truncate($item->parent_id ? $item->description_as_stripped_html : $item->title, at => 30)));
|
|
16 | 16 |
} |
17 | 17 |
|
18 | 18 |
sub requirement_spec_item_jstree_data { |
templates/webpages/requirement_spec/_edit_time_and_cost_estimate_item.html | ||
---|---|---|
3 | 3 |
[% L.hidden_tag("requirement_spec_items[+].id", item.id, id = id_prefix _ '_item_id') %] |
4 | 4 |
|
5 | 5 |
<td style="padding-left: [%- level * 50 -%]px"> |
6 |
[%- P.simple_format(item.fb_number _ ": " _ item.description) -%]
|
|
6 |
[%- item.fb_number _ ": " _ item.description_as_restricted_html -%]
|
|
7 | 7 |
</td> |
8 | 8 |
<td> |
9 | 9 |
[%- L.select_tag('requirement_spec_items[].complexity_id', SELF.complexities, id=id_prefix _ '_complexity_id_' _ item.id, title_key='description', default=item.complexity_id, style="width: 100%") %]<br> |
templates/webpages/requirement_spec/_show_time_and_cost_estimate_item.html | ||
---|---|---|
1 | 1 |
[%- USE HTML -%][%- USE LxERP -%][%- USE P -%] |
2 | 2 |
<tr class="listrow"> |
3 | 3 |
<td style="padding-left: [%- level * 50 -%]px"> |
4 |
[%- P.simple_format(item.fb_number _ ": " _ item.description) -%]
|
|
4 |
[%- item.fb_number _ ": " _ item.description_as_restricted_html -%]
|
|
5 | 5 |
</td> |
6 | 6 |
<td>[%- HTML.escape(item.complexity.description) -%]</td> |
7 | 7 |
<td>[%- HTML.escape(item.risk.description) -%]</td> |
templates/webpages/requirement_spec_item/_function_block_content_top.html | ||
---|---|---|
1 | 1 |
[%- USE HTML -%][%- USE L -%]<div id="[% id_prefix %]function-block-content-top-[% requirement_spec_item.id %]"> |
2 | 2 |
<div class="function-block-number">[%- HTML.escape(requirement_spec_item.fb_number) -%]</div> |
3 |
[%- L.simple_format(requirement_spec_item.description) -%]
|
|
3 |
[%- requirement_spec_item.description_as_restricted_html -%]
|
|
4 | 4 |
</div> |
templates/webpages/requirement_spec_item/_function_block_form.html | ||
---|---|---|
28 | 28 |
[%- ELSE -%] |
29 | 29 |
[%- LxERP.t8("Add sub function block") %] |
30 | 30 |
[%- END -%]:<br> |
31 |
[% L.textarea_tag(id_base _ '.description', SELF.item.description, rows=8, style="width: 100%") %]
|
|
31 |
[% L.textarea_tag(id_base _ '.description_as_restricted_html', SELF.item.description_as_restricted_html, id=id_base _ '_description', rows=8, style="width: 100%", class='texteditor') %]
|
|
32 | 32 |
</div> |
33 | 33 |
|
34 | 34 |
<div style="margin-top: 10px"> |
templates/webpages/requirement_spec_item/_section_form.html | ||
---|---|---|
27 | 27 |
|
28 | 28 |
<p> |
29 | 29 |
[%- LxERP.t8("Description") %]:<br> |
30 |
[% L.textarea_tag(id_base _ '.description', SELF.item.description, rows=8, cols=80, style=style) %]
|
|
30 |
[% L.textarea_tag(id_base _ '.description_as_restricted_html', SELF.item.description_as_restricted_html, id=id_base _ '_description', rows=8, cols=80, style=style, class='texteditor') %]
|
|
31 | 31 |
</p> |
32 | 32 |
|
33 | 33 |
<p> |
templates/webpages/requirement_spec_item/_section_header.html | ||
---|---|---|
13 | 13 |
<div class="section-description" id="section-description"> |
14 | 14 |
<div class="section-description-heading">[%- LxERP.t8("Preamble") %]</div> |
15 | 15 |
[% IF requirement_spec_item.description %] |
16 |
[%- L.simple_format(requirement_spec_item.description) -%]
|
|
16 |
[%- requirement_spec_item.description_as_restricted_html -%]
|
|
17 | 17 |
[%- ELSE %] |
18 | 18 |
<span class="dimmed-text">[%- LxERP.t8("No text has been entered yet.") %]</span> |
19 | 19 |
[%- END %] |
templates/webpages/requirement_spec_order/_assignment_form.html | ||
---|---|---|
40 | 40 |
[% L.hidden_tag("sections[+].id", section.id, no_id=1) %] |
41 | 41 |
<td>[% HTML.escape(section.fb_number) %]</td> |
42 | 42 |
<td>[% HTML.escape(section.title) %]</td> |
43 |
<td>[% HTML.escape(P.truncate(section.description)) %]</td> |
|
43 |
<td>[% HTML.escape(P.truncate(section.description_as_stripped_html)) %]</td>
|
|
44 | 44 |
<td>[% P.part_picker('sections[].order_part_id', section.order_part_id, convertible_unit=SELF.h_unit_name, id='quotations_and_orders_sections_order_pard_id_' _ loop.count, style=style) %]</td> |
45 | 45 |
</tr> |
46 | 46 |
[% END %] |
templates/webpages/requirement_spec_order/list.html | ||
---|---|---|
23 | 23 |
<tr class="listrow"> |
24 | 24 |
<td>[% HTML.escape(section.fb_number) %]</td> |
25 | 25 |
<td>[% HTML.escape(section.title) %]</td> |
26 |
<td>[% HTML.escape(P.truncate(section.description)) %]</td> |
|
26 |
<td>[% HTML.escape(P.truncate(section.description_as_stripped_html)) %]</td>
|
|
27 | 27 |
<td> |
28 | 28 |
[% IF section.order_part %] |
29 | 29 |
[% HTML.escape(section.order_part.partnumber) %] [% HTML.escape(section.order_part.description) %] |
templates/webpages/requirement_spec_order/update.html | ||
---|---|---|
31 | 31 |
<tr class="listrow"> |
32 | 32 |
[% L.hidden_tag("orderitems[+].id", item.item.id, no_id=1) %] |
33 | 33 |
<td>[% HTML.escape(item.item.part.partnumber) %]</td> |
34 |
<td>[% HTML.escape(item.item.description) %]</td> |
|
34 |
<td>[% HTML.escape(item.item.description_as_stripped_html) %]</td>
|
|
35 | 35 |
<td align="right">[% LxERP.format_amount(item.item.qty * 1) %] [% HTML.escape(item.item.unit) %]</td> |
36 | 36 |
<td align="right">[% LxERP.format_amount(item.item.qty * 1) %] [% HTML.escape(item.item.unit) %]</td> |
37 | 37 |
<td>[% L.select_tag('orderitems[].section_id', sections, default=item.section.id, title_sub=\make_section_title, style=style, no_id=1, with_empty=1, empty_title=LxERP.t8('Do not modify this position')) %]</td> |
Auch abrufbar als: Unified diff
Pflichtenheftabschnitte/-funktionsblöcke: HTML nutzen