1 [%- USE JSON -%][%- USE HTML %][%- USE L %][%- USE LxERP %][%- USE P -%]
3 <h1>[%- HTML.escape(SELF.requirement_spec.displayable_name('format', 'with_customer')) %]
5 [% HTML.escape(SELF.requirement_spec.customer.displayable_name) -%]
8 [%- L.hidden_tag('requirement_spec_id', SELF.requirement_spec.id) -%]
10 <div id="requirement_spec_version">
11 [%- INCLUDE 'requirement_spec/_version.html' requirement_spec=SELF.requirement_spec -%]
14 <div id="column-container">
15 <div id="tree-column" style="border-right: 1px solid black">
16 <div style="min-height: 32px; height: 32px;">
17 <div style="float: left">
18 [% L.button_tag("new_section_form()", LxERP.t8("New section"), id="new-section-button") %]
20 <div id="spinner" class="clearfix" style="float: right; display: none; background:url('js/themes/requirement-spec/throbber.gif') center center no-repeat !important; min-height: 32px; height: 32px; min-width: 32px; width: 32px;"></div>
26 <div id="content-column" class="clearfix">
27 <div id="section-container" class="section-container">
29 <div id="section_content" class="section-content">
30 [%- IF SELF.requirement_spec_item && SELF.requirement_spec_item.id -%]
31 [%- INCLUDE 'requirement_spec_item/_single_section.html' requirement_spec_item=SELF.requirement_spec_item -%]
34 [%#- render :partial => 'requirement_spec_items/no_section' -%]
41 <script type="text/javascript">
44 { "data": [% JSON.json(LxERP.t8("Text blocks front")) %],
45 "metadata": { "type": "textblocks-front" },
46 "attr": { "id": "tb-front" },
48 [% FOREACH tb = SELF.requirement_spec.text_blocks_for_position(0) %]
49 [% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
54 { "data": [% JSON.json(LxERP.t8("Sections")) %],
55 "metadata": { "type": "sections" },
56 "attr": { "id": "sections" },
59 [% FOREACH section = SELF.requirement_spec.sections %]
60 [% P.requirement_spec_item_jstree_data(section).json %][% IF !loop.last %],[% END %]
65 { "data": [% JSON.json(LxERP.t8("Text blocks back")) %],
66 "metadata": { "type": "textblocks-back" },
67 "attr": { "id": "tb-back" },
69 [% FOREACH tb = SELF.requirement_spec.text_blocks_for_position(1) %]
70 [% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
80 "initially_open": [ "tb-front", "tb-back", "sections"
81 [%- FOREACH section = SELF.requirement_spec.sections -%]
82 , "fb-[% section.id %]"
83 [%- FOREACH function_block = section.children -%]
84 , "fb-[% function_block.id -%]"
94 "check_move": check_move,
99 "theme": "requirement-spec"
101 "plugins": [ "themes", "json_data", "ui", "crrm", "dnd" ]
103 .bind("move_node.jstree", node_moved);
105 $(document).ajaxSend(function() {
106 $('#spinner').show();
107 }).ajaxStop(function() {
108 $('#spinner').hide();