Issue 160 in neologism: Ext JS breaks Drupal's drag-and-drop widgets

0 views
Skip to first unread message

neol...@googlecode.com

unread,
Feb 13, 2011, 3:37:26 PM2/13/11
to neolog...@googlegroups.com
Status: Accepted
Owner: rich...@cyganiak.de
Labels: Type-Defect Priority-High Usability

New issue 160 by rich...@cyganiak.de: Ext JS breaks Drupal's drag-and-drop
widgets
http://code.google.com/p/neologism/issues/detail?id=160

One persistent problem caused by Ext JS is that all widgets that allow
drag-and-drop reordering are broken. The “drag” part works, but then it
doesn't “drop”, the grabbed item just gets stuck to the mouse pointer with
no way of releasing it.

A hack to temporarily work around the problem is to rename the
modules/ext/ext directory to something different. Then the javascript files
are not found and can't mess with Drupal's JS.

One solution could be to include the Ext JS javascript files (and CSS
files, see Issue 136) only on pages where they're actually needed, that is,
the vocabulary overview page, and the class and property forms.

neol...@googlecode.com

unread,
Feb 13, 2011, 4:16:37 PM2/13/11
to neolog...@googlegroups.com

Comment #1 on issue 160 by lin.w.cl...@gmail.com: Ext JS breaks Drupal's
drag-and-drop widgets
http://code.google.com/p/neologism/issues/detail?id=160

One way to enact the second solution is to use drupal_add_js to add the Ext
files in a preprocess function that checks whether you're on a page that
needs it.

http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_add_js/6

In D7, you can also do this in hook_menu (or hook_menu_alter) and in the
Forms API using the '#attached' element, but that isn't available in D6.

neol...@googlecode.com

unread,
Feb 14, 2011, 9:58:08 AM2/14/11
to neolog...@googlegroups.com
Updates:
Status: Started

Comment #2 on issue 160 by rich...@cyganiak.de: Ext JS breaks Drupal's
drag-and-drop widgets
http://code.google.com/p/neologism/issues/detail?id=160

There's a call to ext_load_library() in hook_init() for the
evocwidget_dynamic module. This is what causes ext to be included
everywhere. Removing that, and replacing it with a call to the same
function on only the appropriate pages (neologism_export_html() and
neologism_form_alter()) should actually solve this problem.

Reply all
Reply to author
Forward
0 new messages