Opened 7 years ago

Last modified 7 years ago

#1554 new enhancement

Clean up and refactor shared "createlink" code and logic

Reported by: ejucovy Owned by: ejucovy
Priority: normal Milestone:
Component: Xinha Core Version: trunk
Severity: minor Keywords:
Cc:

Description

Per #1553:

Further cleanup would be nice - the two linky plugins both
define some functions with identical logic that could be
moved to core, and I think the same could be said of the
default logic for the anchor-double-clicker. But those can
be addressed separately, and are not essential.

Specifically:

  • The pluginMethod.js scripts in Linker and CreateLink both define a _getSelectedAnchor method which seem to be identical. Can/should this be moved to core? (http://trac.xinha.org/browser/trunk/modules/CreateLink/pluginMethods.js)
  • Linker and CreateLink use confusingly different names for their various functions -- Linker._createLink vs CreateLink._show vs Linker.Dialog.show ... vs editor._createLink! It would be nice to rename the functions in Linker and CreateLink to be a bit more uniform. Would this break any backwards compatibility promises? (I doubt it, I don't think these plugins advertise anything as API.)
  • Does it make sense to define the anchor-double-clicker somewhere more stable than dblclickList? (http://trac.xinha.org/browser/trunk/XinhaCore.js#L1186) It seems like a shame that the DoubleClick plugin needs to rewrite this when it redefines the dblclickList because it's not necessarily obvious code.

Change History (1)

comment:1 Changed 7 years ago by ejucovy

  • Owner changed from gogo to ejucovy
Note: See TracTickets for help on using tickets.