From bbe906f77f7f9e901ba108428cdfe97d46a09af7 Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Tue, 8 Oct 2013 17:24:00 -0400 Subject: [PATCH] Studio: changes drag and drop container to new .wrapper-dnd on outline/subsection views --- cms/static/js/views/overview.js | 2 +- cms/templates/edit_subsection.html | 8 +- cms/templates/overview.html | 151 +++++++++++++++-------------- 3 files changed, 83 insertions(+), 78 deletions(-) diff --git a/cms/static/js/views/overview.js b/cms/static/js/views/overview.js index ea4a55e158..1425bb5333 100644 --- a/cms/static/js/views/overview.js +++ b/cms/static/js/views/overview.js @@ -284,7 +284,7 @@ define(["domReady", "jquery", "jquery.ui", "gettext", "js/views/feedback_notific $(ele).data('child-selector', type); var draggable = new Draggabilly(ele, { handle: handleClass, - axis: 'y' + containment: '.wrapper-dnd' }); draggable.on('dragStart', _.bind(overviewDragger.onDragStart, overviewDragger)); draggable.on('dragMove', _.bind(overviewDragger.onDragMove, overviewDragger)); diff --git a/cms/templates/edit_subsection.html b/cms/templates/edit_subsection.html index 364411b01c..3ed4f6552e 100644 --- a/cms/templates/edit_subsection.html +++ b/cms/templates/edit_subsection.html @@ -21,9 +21,11 @@ -
- - ${units.enum_units(subsection, subsection_units=subsection_units)} +
+
+ + ${units.enum_units(subsection, subsection_units=subsection_units)} +
diff --git a/cms/templates/overview.html b/cms/templates/overview.html index f075fd4e17..cfdb603107 100644 --- a/cms/templates/overview.html +++ b/cms/templates/overview.html @@ -138,87 +138,90 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v
-
- % for section in sections: -
- <%include file="widgets/_ui-dnd-indicator-before.html" /> +
+
+ % for section in sections: +
-
- + <%include file="widgets/_ui-dnd-indicator-before.html" /> -
-

- -
+
+ -
- - -
-
-
- -
    - % for subsection in section.get_children(): - - % endfor -
  1. - <%include file="widgets/_ui-dnd-indicator-initial.html" /> -
  2. -
-
+
+ + +
+
+
+ +
    + % for subsection in section.get_children(): +
- % endfor -
+ <%include file="widgets/_ui-dnd-indicator-before.html" /> + + + ${units.enum_units(subsection)} + + <%include file="widgets/_ui-dnd-indicator-after.html" /> + + % endfor +
  • + <%include file="widgets/_ui-dnd-indicator-initial.html" /> +
  • + +
    + + <%include file="widgets/_ui-dnd-indicator-after.html" /> +
    + % endfor +
    +