Opened 15 years ago
Closed 14 years ago
#5531 closed Bug (fixed)
All IDs and classes should all have the 'cke_' prefix
Reported by: | Sa'ar Zac Elias | Owned by: | Sa'ar Zac Elias |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.4 |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
While I was reading the code I've noticed that not all IDs (e.g. in dialogs) and classes (e.g. in the colordialog plugin) uses the 'cke_' prefix, some of them are quite common IDs such as 'picker'. This can lead to collision and make the integration problematic.
Attachments (3)
Change History (15)
comment:1 Changed 15 years ago by
Keywords: | Confirmed added |
---|---|
Milestone: | → CKEditor 3.4 |
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
Another thing that should be changed, the dialog UI generates IDs like '91_uiElement'.
comment:5 Changed 14 years ago by
Owner: | set to Tobiasz Cudnik |
---|---|
Status: | new → assigned |
comment:6 Changed 14 years ago by
Owner: | changed from Tobiasz Cudnik to Sa'ar Zac Elias |
---|
Changed 14 years ago by
Attachment: | 5531.patch added |
---|
comment:7 Changed 14 years ago by
Status: | assigned → review |
---|
Changed 14 years ago by
Attachment: | 5531_2.patch added |
---|
comment:9 Changed 14 years ago by
Status: | review → review_failed |
---|
- I still can see several improper ids in the dialogs.
- We can see that most of the ids are build with the same formula: 'cke_' + CKEDITOR.tools.getNextNumber(). It makes sense introducing a new CKEDITOR.tools.getNextId() function which makes the code simpler, shorter, and guarantees the results are uniform.
Also, just to be sure, let's target it to the 3.4.x branch.
Changed 14 years ago by
Attachment: | 5531_3.patch added |
---|
comment:10 Changed 14 years ago by
Keywords: | Confirmed removed |
---|---|
Status: | review_failed → review |
I used a tool script to list all elements without the 'cke_' prefix this time.
comment:11 Changed 14 years ago by
Status: | review → review_passed |
---|
That's cool :)
Later we can also consider removing all those suffixes, as they don't bring anything useful, other than making the code bigger.
comment:12 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [5758].
Has a relation with #5138, so maybe both bugs will be handled in one patch.
Maybe a generic function should be created to get IDs with the 'cke_' prefix and at the same time get the IDs in the same convention (e.g. all letters lowercase or capitalize).