Opened 10 years ago

Closed 10 years ago

#3758 closed New Feature (fixed)

Add support to change the dialog definition in selected editor

Reported by: Wiktor Walc Owned by: Martin Kou
Priority: Normal Milestone: CKEditor 3.0
Component: UI : Dialogs Version:
Keywords: Confirmed Review+ Doc Cc:

Description

When the dialogDefinition event is fired it is possible to change the global dialog definition, but it is not possible to change the dialog definition just for the selected editor instance.

Attachments (3)

3758.patch (1.4 KB) - added by Wiktor Walc 10 years ago.
Patch added by Martin in #3673
3758_2.patch (2.9 KB) - added by Martin Kou 10 years ago.
3758_3.patch (2.2 KB) - added by Martin Kou 10 years ago.

Download all attachments as: .zip

Change History (13)

Changed 10 years ago by Wiktor Walc

Attachment: 3758.patch added

Patch added by Martin in #3673

comment:1 Changed 10 years ago by Martin Kou

Keywords: Review? added

comment:2 Changed 10 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:3 Changed 10 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed
  • The cloning logic is broken. It doesn't handle null properties. (The table dialog doesn't work)
  • At this point, we should instead enhance the CKEDITOR.tools.clone function to make it support arrays, using it instead of custom local functions.
  • Please ensure you have things tested before the new patch. This is a drastic change, which needs much attention.

Changed 10 years ago by Martin Kou

Attachment: 3758_2.patch added

comment:4 Changed 10 years ago by Martin Kou

Keywords: Review? added; Review- removed

comment:5 Changed 10 years ago by Martin Kou

After this patch, only the following types will be allowed in a dialog definition:

  • undefined
  • null
  • Number
  • Boolean
  • String
  • Date
  • Function
  • Array
  • Literal Object

Things outside of the types listed above, e.g. regex objects and DOM objects, will result in cloning errors.

comment:6 Changed 10 years ago by Martin Kou

Keywords: Doc? added

Changed 10 years ago by Martin Kou

Attachment: 3758_3.patch added

comment:7 Changed 10 years ago by Garry Yao

Keywords: Review- added; Review? removed

The cloning logic could be further simplified, it's using a lot of 'instanceof' operator and inner function, and it's not necessary for split array and object iteration.

comment:8 Changed 10 years ago by Martin Kou

Keywords: Review? added; Review- removed

Simplified the patch with Fred's suggestions.

comment:9 Changed 10 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:10 Changed 10 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

Fixed with [3704].

Click here for more info about our SVN system.

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