Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesjQuery UI sortable in EditModejQuery UI sortable in EditMode
Previous
 
Next
New Post
2/26/2019 4:56 AM
 

Hi guys,

following problem: I have a module control with sortable form items, the simple test looks like this:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Test.ascx.cs" Inherits="DotNetNuke.Modules.Test.Test" %>
<%@ Register Src="~/controls/labelcontrol.ascx" TagName="Label" TagPrefix="dnn" %>
<%@ Register TagPrefix="dnn" TagName="JavaScriptLibraryInclude" Src="~/admin/Skins/JavaScriptLibraryInclude.ascx" %>

<dnn:JavaScriptLibraryInclude runat="server" Name="jQuery" />
<dnn:JavaScriptLibraryInclude runat="server" Name="jQuery-UI" />

<div class="dnnForm TestForm">
   <fieldset id="TestFieldSet">
      <div class="dnnFormItem">
         <dnn:Label ID="Label1" runat="server" ControlName="TextBox1" ResourceKey="Label1" Suffix=":" />
         <asp:TextBox ID="TextBox1" runat="server" />
      </div>
      <div class="dnnFormItem">
         <dnn:Label ID="Label2" runat="server" ControlName="TextBox2" ResourceKey="Label2" Suffix=":" />
         <asp:TextBox ID="TextBox2" runat="server" />
      </div>
      <div class="dnnFormItem">
         <dnn:Label ID="Label3" runat="server" ControlName="TextBox3" ResourceKey="Label3" Suffix=":" />
         <asp:TextBox ID="TextBox3" runat="server" />
      </div>
   </fieldset>
</div>

<script>
   $( function() {
      $( "#TestFieldSet" ).sortable();
      $( "#TestFieldSet" ).disableSelection();
   });
</script>

Works great - but when I change to Edit mode, I can move an item and as soon as I drop it the circle showing that something happens does not stop. The control is not marked as supporting partial rendering.

In the console I get the following error:

TypeError: $(...).data(...) is null ContentEditor.js:295:13
refreshContent http://dnndev.me/DesktopModules/admin/Dnn.EditBar/Resources/ContentEditorManager/Js/ContentEditor.js:295:13
dnn.ContentEditorManager.sortStop http://dnndev.me/DesktopModules/admin/Dnn.EditBar/Resources/ContentEditorManager/Js/ContentEditor.js:301:9
_trigger http://dnndev.me/Resources/libraries/jQuery-UI/01_12_01/jquery-ui.js:697:4
_trigger http://dnndev.me/Resources/libraries/jQuery-UI/01_12_01/jquery-ui.js:6718:8
$.widget/ _clear http://dnndev.me/Resources/libraries/jQuery-UI/01_12_01/jquery-ui.js:6709:4
$.widget/ _mouseStop http://dnndev.me/Resources/libraries/jQuery-UI/01_12_01/jquery-ui.js:5694:4
$.widget/ _mouseUp http://dnndev.me/Resources/libraries/jQuery-UI/01_12_01/jquery-ui.js:1905:4
$.widget/ _mouseDown/this._mouseUpDelegate http://dnndev.me/Resources/libraries/jQuery-UI/01_12_01/jquery-ui.js:1834:11
dispatch http://dnndev.me/Resources/libraries/jQuery/03_02_01/jquery.js:5205:16
add/elemData.handle http://dnndev.me/Resources/libraries/jQuery/03_02_01/jquery.js:5014:6

Any ideas?

Happy DNNing!
Michael


Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
2/26/2019 10:16 AM
 
Hi all,

I think it is a conflict with the dragable component that allows to move containers (modules) from one pane to another.

But: How to solve this?

Happy DNNing!
Michael

Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
2/27/2019 1:23 AM
 
Hi Michael,

Probably you get jQuery conflict. If DNN detect's that jQuery is already loaded, it will not load jQuery from your custom module. It will use core version, which was loaded first. Then if both library versions varies, your module can't do the job.
Are all packets returns HTTP 200 code?
 
New Post
2/27/2019 2:18 AM
 
Barry,

thanks for the answer.

When I leave the registration of jQuery and jQueryUI away, it is still working in View mode (which leads to the conclusion that those resources are already loaded), but it still does not work in Edit mode. Anyway, there are no different versions as I load the standard libraries, therefore it should not come to a "double" load.

All requests return HTTP 200.

Happy DNNing!
Michael

Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
3/21/2019 9:57 AM
 
Hi DNNizens,

I think it has to do with the fact that modules are movable when in edit mode, and then comes to some conflicts as they the same widget.

Any ideas how to resolve this conflict?

Happy DNNing!
Michael

Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesjQuery UI sortable in EditModejQuery UI sortable in EditMode


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out