CSS: Obtaining access to a contextual menu with no value selected
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 9
- Joined: Mon May 10, 2021 10:55 am
CSS: Obtaining access to a contextual menu with no value selected
Hello,
I am new to using CSS in oXygenXML Author, and more specifically the form controls.
I have managed to customize quite a bit of the CSS to fit my needs.
Recently, I tried to add a pop-up, to facilitate my work process in choosing the value for a specific attribute.
With this, as long as a value has been selected for the attribute, the contextual menu can be used.
However, if "no value" is selected or is already present, when the element is selected (which is the case), I cannot retrieve the contextual menu.
Is there a method to enable the contextual menu to be called even when there is no value?
I am new to using CSS in oXygenXML Author, and more specifically the form controls.
I have managed to customize quite a bit of the CSS to fit my needs.
Recently, I tried to add a pop-up, to facilitate my work process in choosing the value for a specific attribute.
Code: Select all
*[class ~= "task/step"][importance="value1"]:before,
*[class ~= "task/step"][importance="value2"]:before {
content: oxy_popup(
...
);
}
However, if "no value" is selected or is already present, when the element is selected (which is the case), I cannot retrieve the contextual menu.
Is there a method to enable the contextual menu to be called even when there is no value?
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: CSS: Obtaining access to a contextual menu with no value selected
Post by alex_jitianu »
Hello,
This popup form control is editing the attribute @importance? If that's the case, change the selector to match any step element, even one without a @importance set:
Best regards,
Alex
This popup form control is editing the attribute @importance? If that's the case, change the selector to match any step element, even one without a @importance set:
Code: Select all
*[class ~= "task/step"]:before {
content: oxy_popup(
...
);
}
Alex
-
- Posts: 9
- Joined: Mon May 10, 2021 10:55 am
Re: CSS: Obtaining access to a contextual menu with no value selected
Hi Alex,
Thank you for the quick reply.
I actually want the pop up form control to edit the attribute @importance.
The issue I am having is when the value has the possibility of having no value.
If value1 or value2 have been preselected, then I can select another value from the pop up, if I decide to change the attribute value, however, when 'No Value' is selected, the pop up control will disappear, and the only way to select the attributes from that point is to head over to the Attributes view or edit the attribute in the text mode.
Thank you for the quick reply.
I actually want the pop up form control to edit the attribute @importance.
The issue I am having is when the value has the possibility of having no value.
If value1 or value2 have been preselected, then I can select another value from the pop up, if I decide to change the attribute value, however, when 'No Value' is selected, the pop up control will disappear, and the only way to select the attributes from that point is to head over to the Attributes view or edit the attribute in the text mode.
Code: Select all
*[class ~= "task/step"][importance="value1"]:before,
*[class ~= "task/step"][importance="value2"]:before {
content: oxy_popup(
edit, '@importance',
values, "value1, value2, ",
labels, "Value1: , Value2: , 'No Value' ",
... ;
);
}
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: CSS: Obtaining access to a contextual menu with no value selected
Post by alex_jitianu »
Hi,
As I see it, the culprit is the CSS selector:
These selectors match the step element only if the @importance attribute has either value1 or value2. It means that when the @importance attribute is missing this selector doesn't match anymore and the form control is not added. That's why I suggested a more relaxed selector that matches the step element no matter the value of @importance:
Did you try replacing your selectors with this one?
Best regards,
Alex
As I see it, the culprit is the CSS selector:
Code: Select all
*[class ~= "task/step"][importance="value1"]:before,
*[class ~= "task/step"][importance="value2"]:before
Code: Select all
*[class ~= "task/step"]:before {
Best regards,
Alex
-
- Posts: 9
- Joined: Mon May 10, 2021 10:55 am
Re: CSS: Obtaining access to a contextual menu with no value selected
Hi Alex,
I apologize, it seems as though I misunderstood your first reply.
Yes, this works perfectly.
I was just bit confused when I had tried it because when I removed @importance attribute, I ended up seeing something like Value1: Value1, printed inside a step element in the author mode, however, I realized that has to do with another CSS rule, which was previously created by someone else.
Thank you for your quick and informative replies.
I apologize, it seems as though I misunderstood your first reply.
Yes, this works perfectly.
I was just bit confused when I had tried it because when I removed @importance attribute, I ended up seeing something like Value1: Value1, printed inside a step element in the author mode, however, I realized that has to do with another CSS rule, which was previously created by someone else.
Thank you for your quick and informative replies.
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