Details
-
Improvement
-
Resolution: Duplicate
-
Minor
-
None
-
1.0, 1.1 M1
-
None
-
None
-
Panel DocumentInformation skin, bugfixingday
-
Description
This should apply to any 1.* release:
It looks like the DocumentInformation panel depends on being rendered inside the edit form. In a skin I have, the main content (including the form) is completely rendered before the sidebar, and the sidebar is what renders the panels.
The following change to the DocumentInformation Panel corrected the problem:
Instead of :
<dl><dt><label for="xwikidocparentinput2">$msg.get("parentfield"):</label></dt> <dd><input type="text" id="xwikidocparentinput2" name="parent" value="$!tdoc.parent" size="30" /></dd>
Do this:
<dl><dt><label for="xwikidocparentinput2">$msg.get("parentfield"):</label></dt> <dd><input type="text" id="xwikidocparentinput2" name="parent" value="$!tdoc.parent" size="30" onChange="updateParent(this); return false;"/></dd>
(add a call to a javascript on the parent input field: onChange="updateParent(this); return false;")
The script:
function updateParent(field) {
var editForm = document.getElementById('edit');
if(!editForm || !field) return;
editForm.xwikidocparentinput.value = field.value;
alert(field.value);
alert(editForm.xwikidocparentinput.value);
}
Requires the hidden field for the parent to be re-added. I put it in edit.vm, so that it present in any edit mode:
<input type="hidden" id="xwikidocparentinput" name="parent" value="$!tdoc.parent"/>
Something similar should be done for tags, as that update will have the same issue. I haven't had the time to figure out how they work yet.. the tagedit.vm template is pretty obscure.
Attachments
Issue Links
- duplicates
-
XWIKI-5449 Better parent selection UI in edit mode
- Closed