Opened 16 years ago
Closed 16 years ago
#2852 closed Task (fixed)
Move link dialog to v3 trunk.
Reported by: | Martin Kou | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | SVN (FCKeditor) - Retired |
Keywords: | Review+ | Cc: |
Attachments (10)
Change History (26)
Changed 16 years ago by
Attachment: | 2852.patch added |
---|
Changed 16 years ago by
Attachment: | 2852_fakeobjects.patch added |
---|
comment:1 Changed 16 years ago by
Keywords: | Review? added |
---|---|
Status: | new → assigned |
Changed 16 years ago by
Attachment: | 2852_2.patch added |
---|
comment:3 Changed 16 years ago by
Updated the patch to use the new fakeobjects system, with some related fixes and additions to the fakeobjects system:
- Added CKEDITOR.editor::restoreRealElement() in fakeobjects plugin to convert a fake object back to the real element so that dialogs can edit the real element.
- Added a new argument "realElementType" in CKEDITOR.editor::createFakeElement() in fakeobjects plugin for specifying the element type to display instead of "img" in the element path bar.
- Modified the pagebreak plugin so that page breaks are displayed as "div" elements in the element path bar when selected, instead of "img".
- Fixed erroneous detection of anchors in the document in the Link dialog.
Changed 16 years ago by
Attachment: | 2852_3.patch added |
---|
comment:4 Changed 16 years ago by
comment:5 Changed 16 years ago by
Keywords: | Review? removed |
---|
Retracted review request... Still some IE bugs to be fixed (e.g. setting name attribute to an <a> does not work in IE the usual way).
Changed 16 years ago by
Attachment: | 2852_4.patch added |
---|
comment:6 Changed 16 years ago by
- Fixed <a> name change bugs in IE.
- Added CSS styles for non-empty anchors.
comment:7 Changed 16 years ago by
Keywords: | Review? added |
---|
Changed 16 years ago by
Attachment: | 2852_5.patch added |
---|
comment:9 Changed 16 years ago by
Component: | UI : Dialogs → General |
---|---|
Keywords: | Review- added; Review? removed |
- The changes at htmlparser/element.js:
- There is no need to lower case the attribute name. It will always be lowercased.
- There is no need to trim the replace. It's enough to change the reges to: ckeClassRegex = /(|\s+)cke_[\s]*/g. It also makes the regex more correct.
- The regex declaration is reusing the multiline "var" statement for sortAttribs, which is to be avoided. Having several "var"s one after the other is automatically optimized by the packager.
- The "defaultValues" are to be removed from the configurations. See #2792. The uploadTab, showAdvancedTab and showTargetTab should also be removed in favor of the API features.
- The plugin configurations must not go under the CKEDITOR.config.link object, but directly under CKEDITOR.config. Maybe prefixed with "link_". See #2822.
- Reusing a single "var" statement for all local functions in the link dialog make it a big mess. Multiline variable declarations should have its own "var" statement.
- It's a pity to see all the logic being done inside the onOk function. That's is not the way to go, but that's the way it will be as we don't have time to change it now. This dialog is be rewritten later, and hopefully we'll not have that much people basing their custom plugins on it.
comment:10 Changed 16 years ago by
/(^|\s+)cke_[^\s]*/g
alone wouldn't work. Let's say I have "cke_sth sth_else" as the class attribute, if I run replace with that and an empty string I'd end up with " sth_else", which is wrong because there's an extra space in front of the value. If trim() is not called then a second regex would still be needed to fix that, which is just doing the same thing as a trim anyway.
Changed 16 years ago by
Attachment: | 2852_6.patch added |
---|
comment:11 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
Ok. The following are fixed:
- defaultValues is removed.
- Config sub-namespaces are removed. Now link related configs are named as config.linkCamelCase, following the naming conventions in config.js.
- Multi-line var declarations are changed to conform to the coding style guidelines.
- ckeClassRegex is changed to
/(^|\s+)cke_[^\s]*/g }}}, but after replacing with it an ltrim() is still done. 5. Removed unnecessary toLowerCase() in htmlparse/element.js.
Changed 16 years ago by
Attachment: | 2852_7.patch added |
---|
comment:12 Changed 16 years ago by
Ok, another patch posted. The previous patch missed the newly added files and had a lot of unnecessary newline changes.
Changed 16 years ago by
Attachment: | 2852_8.patch added |
---|
comment:13 Changed 16 years ago by
New patch with pushDefault() and popDefault() removed due to #2803.
Changed 16 years ago by
Attachment: | 2852_9.patch added |
---|
comment:14 Changed 16 years ago by
Fixed a remaining reference to config.link sub-namespace in the link plugin.
comment:15 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
Please don't forget the images when committing (they were not included into the patch, obviously).
Temporary fakeobjects plugin for making the patch work.