Permalink
Browse files

Merge branch 'SAKIII-5162' of git://github.com/croby/3akai-ux into SA…

…KIII-5162

* 'SAKIII-5162' of git://github.com/croby/3akai-ux:
  SAKIII-5162 Reformatting while I was in there
  SAKIII-5162 Fix the li selector to not include the contentauthoring_row
  • Loading branch information...
Nicolaas Matthijs
Nicolaas Matthijs committed Mar 4, 2012
2 parents 41611e3 + b37c450 commit ac055f85bcfdc06a04bbb01ea2f72c2fb81d5024
Showing with 14 additions and 10 deletions.
  1. +14 −10 dev/lib/sakai/sakai.api.util.js
@@ -2484,24 +2484,28 @@ define(
$(window).trigger($(this).data('stopdragevent'), sakai_util.Draggable.getDraggableData(ui.helper));
}
},
- start: function(event, ui){
+ start: function(event, ui) {
$('body').append('<div class="s3d-draggable-draggingitems">' + sakai_util.Draggable.getDraggableMessage($(ui.helper).children().length) + '</div>');
$(window).trigger('start.drag.sakai');
if ($(this).data('startdragevent')) {
$(window).trigger($(this).data('startdragevent'), sakai_util.Draggable.getDraggableData(ui.helper));
}
},
- helper: function(){
- var selected = $('.s3d-draggable-select:checked').parents('li');
- if (selected.length === 0) {
- selected = $(this);
+ helper: function() {
+ var $selected = $('.s3d-draggable-select:checked')
+ .parents('li:not(.contentauthoring_row_container)');
+ if ($selected.length === 0) {
+ $selected = $(this);
}
- var container = $('<div/>').attr('id', 's3d-draggeditems-container');
- container.append(selected.clone());
- return container;
+ var $container = $('<div/>').attr('id', 's3d-draggeditems-container');
+ $container.append($selected.clone());
+ return $container;
},
- drag: function(ev, data){
- $('.s3d-draggable-draggingitems').offset({left:data.offset.left - 10,top:data.offset.top - 12});
+ drag: function(ev, data) {
+ $('.s3d-draggable-draggingitems').offset({
+ left: data.offset.left - 10,
+ top: data.offset.top - 12
+ });
}
};
},

0 comments on commit ac055f8

Please sign in to comment.