Opened 15 years ago

Closed 14 years ago

#5775 closed New Feature (fixed)

Required field's label to contain a CSS class to allow it to be styled differently

Reported by: Joe Kavanagh Owned by: Tobiasz Cudnik
Priority: Normal Milestone: CKEditor 3.4
Component: UI : Dialogs Version:
Keywords: IBM Confirmed Cc: Damian

Description (last modified by Tobiasz Cudnik)

If a labeled dialog UI Element's required property is set to true the field's label should contain a CSS style so it can be styled differently. For example:

<label class="cke_dialog_ui_labeled_label cke_required"...

A style like the following could then be used to mark required fields:

.cke_skin_<name> .cke_dialog_ui_labeled_label.cke_required:before {
	content: "* ";
}

Attachments (2)

5775.patch (2.8 KB) - added by Tobiasz Cudnik 14 years ago.
5775_2.patch (2.3 KB) - added by Tobiasz Cudnik 14 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 15 years ago by Garry Yao

Keywords: Confirmed added

comment:2 Changed 14 years ago by Joe Kavanagh

Milestone: CKEditor 3.xCKEditor 3.4

comment:3 Changed 14 years ago by Tobiasz Cudnik

Description: modified (diff)
Owner: set to Tobiasz Cudnik
Status: newassigned

We're not allowed to use such advanced CSS selectors as in the example (because of IE6's lame support for selectors), but it should be doable somehow.

Changed 14 years ago by Tobiasz Cudnik

Attachment: 5775.patch added

comment:4 Changed 14 years ago by Tobiasz Cudnik

Keywords: Review? added

comment:5 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

The implementation is good. Even the default styling for the required fields is a nice addition. I just have to disagree with the "*" hardcoded on the fields. We need to leave it as a CSS only solution.

By default, let's not have any "*" there, only bold, leaving to the implementer the decision to apply or not other styles to that.

Changed 14 years ago by Tobiasz Cudnik

Attachment: 5775_2.patch added

comment:6 Changed 14 years ago by Tobiasz Cudnik

Keywords: Review? added; Review- removed

Second patch doesn't contain hardcoded "*" sign.

comment:7 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:8 Changed 14 years ago by Tobiasz Cudnik

Resolution: fixed
Status: review_passedclosed

Fixed with [5722].

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy