Opened 7 years ago

Closed 6 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: JoeK Owned by: tobiasz.cudnik
Priority: Normal Milestone: CKEditor 3.4
Component: UI : Dialogs Version:
Keywords: IBM Confirmed Cc: damo

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 6 years ago.
5775_2.patch (2.3 KB) - added by tobiasz.cudnik 6 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 years ago by garry.yao

  • Keywords Confirmed added

comment:2 Changed 6 years ago by JoeK

  • Milestone changed from CKEditor 3.x to CKEditor 3.4

comment:3 Changed 6 years ago by tobiasz.cudnik

  • Description modified (diff)
  • Owner set to tobiasz.cudnik
  • Status changed from new to assigned

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 6 years ago by tobiasz.cudnik

comment:4 Changed 6 years ago by tobiasz.cudnik

  • Keywords Review? added

comment:5 Changed 6 years ago by fredck

  • 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 6 years ago by tobiasz.cudnik

comment:6 Changed 6 years ago by tobiasz.cudnik

  • Keywords Review? added; Review- removed

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

comment:7 Changed 6 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:8 Changed 6 years ago by tobiasz.cudnik

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed with [5722].

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy