some fixes to make dialogs work with IE
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1391 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
804ac92565
commit
c3064f8fa4
2 changed files with 26 additions and 13 deletions
|
@ -14,8 +14,14 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
|
||||
<tbody id="form.fields">
|
||||
<metal:fields use-macro="view/template/macros/fields" />
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<div id="form.fields">
|
||||
<metal:fields use-macro="view/template/macros/fields" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<tbody>
|
||||
|
@ -34,7 +40,7 @@
|
|||
<metal:block define-macro="create">
|
||||
<form method="post" action="." enctype="multipart/form-data">
|
||||
<input type="hidden" name="form.action" value="create"
|
||||
tal:attributes="value view/form_action" />
|
||||
tal:attributes="value view/form_action" />
|
||||
<table cellpadding="3" class="form">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
@ -45,7 +51,8 @@
|
|||
<select name="form.type" id="form.type"
|
||||
tal:attributes="onChange
|
||||
string:return replaceFieldsNode(
|
||||
'form.fields', 'form.type', 'inner_form.html')">
|
||||
'form.fields', 'form.type',
|
||||
'${view/url}/inner_form.html')">
|
||||
<option value=".loops/concepts/note"
|
||||
tal:repeat="type view/resourceTypes"
|
||||
tal:content="type/title"
|
||||
|
@ -60,8 +67,14 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
|
||||
<tbody id="form.fields">
|
||||
<metal:fields use-macro="view/template/macros/fields" />
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<div id="form.fields">
|
||||
<metal:fields use-macro="view/template/macros/fields" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<tbody>
|
||||
|
@ -79,8 +92,9 @@
|
|||
|
||||
<metal:fields define-macro="fields">
|
||||
<tal:block tal:define="dummy view/setUp">
|
||||
<table width="100%">
|
||||
<tr tal:repeat="widget view/widgets">
|
||||
<td class="label"
|
||||
<td class="label" width="10%"
|
||||
tal:define="hint widget/hint">
|
||||
<label tal:attributes="for widget/name">
|
||||
<span class="required" tal:condition="widget/required"
|
||||
|
@ -88,7 +102,7 @@
|
|||
tal:content="widget/label">label</span>
|
||||
</label>
|
||||
</td>
|
||||
<td class="field" colspan="4"
|
||||
<td class="field" colspan="4" width="90%"
|
||||
tal:define="hint widget/hint">
|
||||
<div class="widget" tal:content="structure widget">
|
||||
<input type="text" />
|
||||
|
@ -99,6 +113,7 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</tal:block>
|
||||
</metal:fields>
|
||||
|
||||
|
|
|
@ -15,9 +15,8 @@ function focusOpener() {
|
|||
|
||||
function replaceFieldsNode(targetId, typeId, url) {
|
||||
token = dojo.byId(typeId).value;
|
||||
dojo.io.updateNode(targetId, {
|
||||
url: url + '?form.type=' + token
|
||||
});
|
||||
uri = url + '?form.type=' + token;
|
||||
dojo.io.updateNode(targetId, uri);
|
||||
}
|
||||
|
||||
function submitReplacing(targetId, formId, actionUrl) {
|
||||
|
@ -81,7 +80,7 @@ function addConceptAssignment() {
|
|||
dojo.require('dojo.html')
|
||||
node = dojo.byId('form.assignments');
|
||||
els = document.forms[0].elements;
|
||||
for (var i=0; i<els.length; i++) { //getElementsByName does not work in IE
|
||||
for (var i=0; i<els.length; i++) { //getElementsByName does not work here in IE
|
||||
el = els[i];
|
||||
if (el.name == 'concept.search.text_selected') {
|
||||
cToken = el.value;
|
||||
|
@ -100,7 +99,6 @@ function addConceptAssignment() {
|
|||
td.innerHTML = '<input type="checkbox" name="form.assignments.selected:list" value="' + token + '" checked><span>' + title + '</span>';
|
||||
var tr = document.createElement('tr');
|
||||
tr.appendChild(td);
|
||||
//alert(tr.firstChild.attributes['colSpan'].value);
|
||||
node.appendChild(tr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue