Disabling one attribute on selecting other
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 49
- Joined: Mon Mar 28, 2016 3:54 pm
Disabling one attribute on selecting other
Post by Raga Mounika »
Hi,
I am doing modifications in GUI using CSS.
For <image> element I have two attributes scale, scalefit. Scale consists of a textfield and scalefit has a checkbox.
When image is inserted both the attributes are displayed, later on selecting scale, scalefit should be disabled and vice versa for scalefit case.
Please help me in solving the code in CSS.
Thank you.
Regards,
Mounika
I am doing modifications in GUI using CSS.
For <image> element I have two attributes scale, scalefit. Scale consists of a textfield and scalefit has a checkbox.
When image is inserted both the attributes are displayed, later on selecting scale, scalefit should be disabled and vice versa for scalefit case.
Please help me in solving the code in CSS.
Thank you.
Regards,
Mounika
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Disabling one attribute on selecting other
Post by alex_jitianu »
Hi,
This looks to be the same requirement you've described in: viewtopic.php?f=20&t=13416
I expected the CSS block I provided there to give you this exact behavior:
Can you please tell me why is the CSS rule from above unfitted to your use case?
Best regards,
Alex
This looks to be the same requirement you've described in: viewtopic.php?f=20&t=13416
I expected the CSS block I provided there to give you this exact behavior:
Code: Select all
*[class~="topic/image"]:before {
content: "Scale: " oxy_textfield(edit, '@scale', width, 10em)
"Scalefit: " oxy_checkbox(edit, '@scalefit', values, 'yes') "\A "
}
*[class~="topic/image"][scale]:not([scalefit]):before {
content: "Scale: " oxy_textfield(edit, '@scale', width, 10em)
}
*[class~="topic/image"][scalefit]:not([scale]):before {
content: "Scalefit: " oxy_checkbox(edit, '@scalefit', values, 'yes')
}
Best regards,
Alex
-
- Posts: 49
- Joined: Mon Mar 28, 2016 3:54 pm
Re: Disabling one attribute on selecting other
Post by Raga Mounika »
Hi Alex,
Thanks for the quick response
This code completely removes the scalefit attribute on selecting scale attribute.
I need the scalefit attribute to be read only(not editable) on selecting scale attribute.
Please help me on this.
Regards,
Mounika
Thanks for the quick response

This code completely removes the scalefit attribute on selecting scale attribute.
I need the scalefit attribute to be read only(not editable) on selecting scale attribute.
Please help me on this.
Regards,
Mounika
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Disabling one attribute on selecting other
Post by alex_jitianu »
Hi Mounika,
@scalefit is indeed hidden when selecting @scale but as soon as you remove the value from @scale it will be presented again. This applies to both of them: as soon as you input a value in one the other disappears. As soon as you remove the value both of them are presented.
Unfortunately you can't present one and make it read-only. If what you desire is to forbid the user to give values for both of them then perhaps you can develop a Schematron rule to catch this situation. Besides that, you can provide Quick Fixes: Remove @scale or Remove @scalefit. We have a recorded Webinar that describes how to Create Schematron Quickfixes and contribute them to a framework.
Best regards,
Alex
@scalefit is indeed hidden when selecting @scale but as soon as you remove the value from @scale it will be presented again. This applies to both of them: as soon as you input a value in one the other disappears. As soon as you remove the value both of them are presented.
Unfortunately you can't present one and make it read-only. If what you desire is to forbid the user to give values for both of them then perhaps you can develop a Schematron rule to catch this situation. Besides that, you can provide Quick Fixes: Remove @scale or Remove @scalefit. We have a recorded Webinar that describes how to Create Schematron Quickfixes and contribute them to a framework.
Best regards,
Alex
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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