editcomplex.smarty
3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{capture assign=sCSS}
{literal}
/* inactivity */
.active .inactivity_message { display: none; }
/* fixed status */
.active .fixed_message { display: none; }
.active.fixed .fixed_message { display: block; }
.active.fixed .unassigned_items { display: none; }
.inactive { background: #ccc; }
.inactive .fixed_message,
.inactive .unassigned_items,
.inactive .available_behaviours,
.inactive .behaviour_edit_options
{ display: none; }
.helpText { color: #666; }
{/literal}
{/capture}
{$context->oPage->requireCSSStandalone($sCSS)}
<!-- include the mochikit js -->
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Base.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Iter.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/DateTime.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Async.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/DOM.js")}
{$context->oPage->requireJSResource("presentation/lookAndFeel/knowledgeTree/js/taillog.js")}
{$context->oPage->requireJSResource("presentation/lookAndFeel/knowledgeTree/js/conditional_complex_edit.js")}
{capture assign=sJS}
addLoadEvent(updateActiveFields);
{/capture}
{$context->oPage->requireJSStandalone($sJS)}
<h2>Edit Complex Conditional Metadata</h2>
<form>
<input type="hidden" name="fieldset_id" id="global-fieldset-id" value="{$fieldset_id}" />
<table>
<!--
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
<th>Column 4</th>
</tr> -->
<tbody>
<tr valign="top">
{foreach from=$aFields item=oField}
<td class="inactive" id="md_{$oField->getId()}">
<h3>{$oField->getName()}</h3>
<p class="inactivity_message">This column is not active.</p>
<p class="fixed_message">Editing behaviour <strong>Jack</strong></p>
<div class="unassigned_items">
<h3>Unassigned/Unavailable</h3>
<select class="item_list" multiple="true">
<!-- These are orphaned - we fire a "activate" command on load / available.
<option value="-1">Test 1</option>
<option value="-2">Test 2</option>
<option value="-3">Test 3</option>
<option value="-4">Test 4</option>
-->
</select>
<p><strong>Assign to behaviour</strong></p>
<select class="available_behaviours" onchange="assignToBehaviour(this, {$oField->getId()});">
<option>Select a behaviour</option>
<!-- ditto
<option value="1">Behaviour 1</option>
<option value="2">Behaviour 2</option>
<option value="3">Behaviour 3</option>
<option value="4">Behaviour 4</option>
-->
</select> <br />
<strong>or</strong> to a new behaviour called <br />
<input type="text" name="new_behaviour" class="new_behaviour" />
<input type="button" value="create behaviour" onclick="assignToNewBehaviour({$oField->getId()});" />
</div>
<div class="behaviour_edit_options">
<h3>Edit Behaviour</h3>
<p class="helpText">
Select a behaviour from this list to change the
items which are available.
</p>
<select class="edit_behaviours" onchange="editBehaviour(this, {$oField->getId()});">
<option>Select a behaviour</option>
<!--
<option value="1">Behaviour 1</option>
<option value="2">Behaviour 2</option>
<option value="3">Behaviour 3</option>
<option value="4">Behaviour 4</option>
-->
</select>
<br />
<a href="#" onclick="changeAssignments({$oField->getId()}); return false;">Change Assignments for this field.</a>
</div>
</td>
{/foreach}
</tr>
</tbody>
</table>
<table id="brad-log">
<tr>
<th>Severity</th>
<th>Time</th>
<th>Entry</th>
</tr>
<tbody >
</tbody>
</table>