Item14372: JQueryPlugin ui-draggable got dropped from Config.spec.

Priority: Urgent
Current State: Waiting for Release
Released In: 2.1.4
Target Release: patch
Applies To: Extension
Component: JQueryPlugin
Branches: Release02x01 master Item14288
Reported By: LynnwoodBrown
Waiting For:
Last Change By: GeorgeClark
It appears to have occurred inadvertently with this checkin: distro:1396af420112

Just need to add back around line 211:
# **BOOLEAN LABEL="UI::Draggable"**
$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Draggable'}{Enabled} = 1;

-- LynnwoodBrown - 07 Apr 2017

ui-draggable has not been dropped from JQueryPlugin, nor the other UI components removed from Config.spec they are all still part of jquery-ui. That's how they are shipped upstream anyway. Above checkin indended to simplify the use of jquery-ui ... as well as its maintenance.

In order to make use of ui-draggable, please do load ui. The only thing you might probably be missing is the initializers ... which I am very unsure they are of any use anyway. If you like to have them back, go ahead and add the entries back to Config.spec

-- MichaelDaum - 10 Apr 2017

But it's not configurable any more: grep UI: lib/Foswiki/Plugins/JQueryPlugin/Config.spec and it's missing from the list of components.

-- GeorgeClark - 10 Apr 2017

I started looking into this because I had jquery ui loaded (along with ui:sortable which was working) but was getting error message saying that there was no such plugin as draggable and it was not working. So I'm not sure it is available without the configure piece.

-- LynnwoodBrown - 10 Apr 2017

Lynnwood, could you please be a bit clearer here: which error message are you talking about?

-- MichaelDaum - 01 May 2017

Michael - apologies for lack of clarity on the error message. It's the error message that's displayed at top of page when one references a jquery plugin using JQREQUIRE or require attribute with ADDTOZONE - but the referenced plugin is either not installed or enabled.

However, I just double checked and the rest of the report above is valid:
  • The checkin distro:1396af420112 removed from Config.spec the UI for enabling/disabling UI::Draggable.
  • In a clean install of Foswiki 2.1.3, UI::Draggable can not be used or enabled until the code listed above is manually inserted back into Config.spec.

-- LynnwoodBrown - 01 May 2017

Could you also explain how you make use of ui::draggable, please? As I noted above, the feature is still part of jquery-ui before and after...

-- MichaelDaum - 01 May 2017

I am making use of it in conjunction with ui::sortable. I invoked it via jquery selector and ".sortable(config)." In order to make sure the jquery code loaded in correct order, I had included the "require" parameter and referenced ui::draggable. However, if that component was not enabled in configure, it would not work and that's what prompted this task.

However, I did some experimentation and found that if I did not require draggable or sortable but merely jquery::ui, it does work, so I guess that's what you're trying to tell me. If I require either draggable or sortable then the feature fails unless the corresponding widget is also enabled in configure - which of course required having the enabling checkbox there. So I guess the only remaining question is what is the distinction between jquery::ui "widgets" that do have the configure ui (accordion, autocomplete, etc) versus those that don't. Is there a reason why you removed the configure checkbox for enabling ui::draggable?

-- LynnwoodBrown - 02 May 2017
Topic revision: r12 - 05 May 2017, GeorgeClark - This page was cached on 25 May 2017 - 12:09.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License