Oxy collapsible property for bookevent elements
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 20
- Joined: Fri Nov 14, 2014 10:04 am
Oxy collapsible property for bookevent elements
We have done some customization in CSS for bookmap elements. For one of the requirement, we have do add custom CSS to element. We have the following structure for <bookchangehistory> element in our bookmap DTD.
We would like to add collapsible property to <bookevent> with <bookeventtype="changerecord">. Since this type of element can be inserted multiple times, we would like to have some kind of collapsible property defined only for these elements which can collapse all these elements in one go. It would be easier for end users to collapse all bookevent at once.
The element which should only remain visible are reviewed, edited, approved and first bookevent element. Rest all following bookevent elements must be collapsible.
We did try to add collapsible property to bookevent element, but it is adding to all the following bookevent elements. We also tried to add collapsible property to bookchangehistory with exceptions of approved. edited. reviewed and first bookevent element, but it always collapses all but the last element available in the CSS definition.
The above piece of code is hiding all but edited element.
Another observation with above mentioned code is that, even though I have ser oxy_lable as Revision Information, it is showing Bookchangehistory Revision Information as display text in author view.
Is there a way to achieve collapsibility to only bookevent elements at one go and not on individual ones?
Code: Select all
<bookchangehistory>
Code: Select all
<bookchangehistory>
<reviewed>
<person value=""/>
</reviewed>
<edited>
<person value=""/>
<organization/>
</edited>
<approved value="no">
<person value=""/>
<organization/>
</approved>
<bookevent>
<bookeventtype name="workflow_status" value="work"/>
</bookevent>
<bookevent>
<bookeventtype name="changerecord"/>
<person/>
<revisionid/>
<completed>
<year/>
<month/>
<day/>
</completed>
<summary/>
</bookevent>
<bookevent>
<bookeventtype name="changerecord"/>
<person/>
<revisionid/>
<completed>
<year/>
<month/>
<day/>
</completed>
<summary/>
</bookevent>
</bookchangehistory>
The element which should only remain visible are reviewed, edited, approved and first bookevent element. Rest all following bookevent elements must be collapsible.
We did try to add collapsible property to bookevent element, but it is adding to all the following bookevent elements. We also tried to add collapsible property to bookchangehistory with exceptions of approved. edited. reviewed and first bookevent element, but it always collapses all but the last element available in the CSS definition.
Code: Select all
*[class~="bookmap/bookchangehistory"]{
-oxy-foldable:true !important;
-oxy-folded:false !important;
content:oxy_label(text, "Revision Information", width, 163px, text-align, left,color,gray,styles,"font-weight:bold")!important;
color:gray;
font-weight:normal;
-oxy-not-foldable-child: bookevent;
-oxy-not-foldable-child: reviewed;
-oxy-not-foldable-child: approved;
-oxy-not-foldable-child: edited;
}
Another observation with above mentioned code is that, even though I have ser oxy_lable as Revision Information, it is showing Bookchangehistory Revision Information as display text in author view.
Is there a way to achieve collapsibility to only bookevent elements at one go and not on individual ones?
-
- Posts: 78
- Joined: Wed Jun 22, 2016 2:48 pm
Re: Oxy collapsible property for bookevent elements
Post by adrian_sorop »
Hi!
Thank you for writing.
I've investigated your use-case. The -oxy-not-foldable-child property does not take into account all values, if multiple childs are set. It uses the last one.
I've logged and internal issue (ID is EXM-48482). We'll update this post when this will be fixed.
Regards,
Adrian S
Thank you for writing.
I've investigated your use-case. The -oxy-not-foldable-child property does not take into account all values, if multiple childs are set. It uses the last one.
I've logged and internal issue (ID is EXM-48482). We'll update this post when this will be fixed.
Regards,
Adrian S
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 20
- Joined: Fri Nov 14, 2014 10:04 am
Re: Oxy collapsible property for bookevent elements
Hey Adrian,
What about the other query?
What about the other query?
- Another observation with above mentioned code is that, even though I have set oxy_label as Revision Information, it is showing Bookchangehistory Revision Information as display text in author view.
- Is there any other way we can achieve collapsibility for multiple bookevents?
-
- Posts: 78
- Joined: Wed Jun 22, 2016 2:48 pm
Re: Oxy collapsible property for bookevent elements
Post by adrian_sorop »
By bad, I forgot about those.
You can overwrite that style for element and set it to empty:
JS Operation documentation: https://www.oxygenxml.com/doc/versions/ ... soperation
Go to Oxygen Preferences, Document Type Association, select and edit your framework (I assume is DITA Map).
Go to Author tab, then to Actions. Set an ID and a Name (and shortcut if you want) for your action.
For Operation, click to the Choose button and select JSOperation from list and click OK.
Operation's argument scrip should be:
After this, you can add this action to Contextual Menu for example: In the Author tab, Contextual menu, find your action in the list and add it to the menu.
Let me know if this works for you,
Adrian S
Oxygen's default CSS sets the name of the element as label on a before(3)even though I have set oxy_label as Revision Information, it is showing Bookchangehistory Revision Information as display text in author
You can overwrite that style for
Code: Select all
bookchangehistory
Code: Select all
*[class~='bookmap/bookchangehistory']:before(3) {
content: "" !important;
}
A JS Operation that will expand all bookevents element can be used for this scope.Is there any other way we can achieve collapsibility for multiple bookevents?
JS Operation documentation: https://www.oxygenxml.com/doc/versions/ ... soperation
Go to Oxygen Preferences, Document Type Association, select and edit your framework (I assume is DITA Map).
Go to Author tab, then to Actions. Set an ID and a Name (and shortcut if you want) for your action.
For Operation, click to the Choose button and select JSOperation from list and click OK.
Operation's argument scrip should be:
Code: Select all
function doOperation() {
results = authorAccess.getDocumentController().findNodesByXPath("//bookevent", true, true, true);
authorFoldManager = authorAccess.getEditorAccess().getAuthorFoldManager();
for(i = 0; i < results.length; i++){
authorFoldManager.expandFold(results[i]);
}
}
Let me know if this works for you,
Adrian S
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Oxy collapsible property for bookevent elements
Hi,
One question for the original poster, are you using the customization for the Oxygen desktop installation or in the WebAuthor in-browser editor?
Regards,
Radu
One question for the original poster, are you using the customization for the Oxygen desktop installation or in the WebAuthor in-browser editor?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 78
- Joined: Wed Jun 22, 2016 2:48 pm
Re: Oxy collapsible property for bookevent elements
Post by adrian_sorop »
Hi,
I'm excited to announce that version 24.0 of the Oxygen XML Editor is now available to be downloaded.
In this new release, setting multiple not-foldable-child elements is now possible.
The not-foldable-child elements can be defined as a comma separated list, like:
Regards,
Adrian S
I'm excited to announce that version 24.0 of the Oxygen XML Editor is now available to be downloaded.
In this new release, setting multiple not-foldable-child elements is now possible.
The not-foldable-child elements can be defined as a comma separated list, like:
Code: Select all
p {
-oxy-foldable:true;
-oxy-not-foldable-child: b, i;
}
Adrian S
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service