Ticket #3758 (closed New Feature: fixed)

Opened 5 years ago

Last modified 5 years ago

Add support to change the dialog definition in selected editor

Reported by: wwalc Owned by: martinkou
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

3758.patch (1.4 KB) - added by wwalc 5 years ago.
Patch added by Martin in #3673
3758_2.patch (2.9 KB) - added by martinkou 5 years ago.
3758_3.patch (2.2 KB) - added by martinkou 5 years ago.

Change History

Changed 5 years ago by wwalc

Patch added by Martin in #3673

comment:1 Changed 5 years ago by martinkou

  • Keywords Review? added

comment:2 Changed 5 years ago by martinkou

  • Status changed from new to assigned
  • Owner set to martinkou

comment:3 Changed 5 years ago by fredck

  • 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 5 years ago by martinkou

comment:4 Changed 5 years ago by martinkou

  • Keywords Review? added; Review- removed

comment:5 Changed 5 years ago by martinkou

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 5 years ago by martinkou

  • Keywords Doc? added

Changed 5 years ago by martinkou

comment:7 Changed 5 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 5 years ago by martinkou

  • Keywords Review? added; Review- removed

Simplified the patch with Fred's suggestions.

comment:9 Changed 5 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:10 Changed 5 years ago by martinkou

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

Fixed with [3704].

Click here for more info about our SVN system.

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