Skip to content
Permalink
Browse files

Sortable: Style updates

Ref #14246
Ref gh-1588
  • Loading branch information
arschmitz committed Aug 21, 2015
1 parent 2626be4 commit d86ac025ee021728bccecb04b1b16f965e7dcc9f
Showing with 12 additions and 12 deletions.
  1. +1 −1 tests/unit/sortable/common.js
  2. +1 −1 tests/unit/sortable/events.js
  3. +2 −2 tests/unit/sortable/options.js
  4. +8 −8 ui/widgets/sortable.js
@@ -33,7 +33,7 @@ common.testWidget( "sortable", {
tolerance: "intersect",
zIndex: 1000,

// callbacks
// Callbacks
activate: null,
beforeStop: null,
change: null,
@@ -25,7 +25,7 @@ test("start", function() {
ok(hash.item, "UI hash includes: item");
ok(!hash.sender, "UI hash does not include: sender");

// todo: see if these events should actually have sane values in them
// Todo: see if these events should actually have sane values in them
ok("position" in hash, "UI hash includes: position");
ok("offset" in hash, "UI hash includes: offset");
});
@@ -136,15 +136,15 @@ test( "#8792: issues with floated items in connected lists", function() {

element = $( "#qunit-fixture li:eq(0)" );

// move the first li to the right of the second li in the first ul
// Move the first li to the right of the second li in the first ul
element.simulate( "drag", {
dx: 55,
moves: 15
});

equal( changeCount, 1, "change fired only once (no jitters) when dragging a floated sortable in it's own container" );

// move the first li ( which is now in the second spot )
// Move the first li ( which is now in the second spot )
// through the first spot in the second ul to the second spot in the second ul
element.simulate( "drag", {
dx: 100,
@@ -62,7 +62,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
tolerance: "intersect",
zIndex: 1000,

// callbacks
// Callbacks
activate: null,
beforeStop: null,
change: null,
@@ -258,7 +258,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
if( o.cursor && o.cursor !== "auto" ) { // cursor option
body = this.document.find( "body" );

// support: IE
// Support: IE
this.storedCursor = body.css( "cursor" );
body.css( "cursor", o.cursor );

@@ -400,7 +400,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
continue;
}

// cannot intersect with itself
// Cannot intersect with itself
// no useless actions that have been done before
// no action if the item moved is the parent of the item checked
if (itemElement !== this.currentItem[0] &&
@@ -860,17 +860,17 @@ return $.widget("ui.sortable", $.ui.mouse, {
innermostContainer = null,
innermostIndex = null;

// get innermost container that intersects with item
// Get innermost container that intersects with item
for (i = this.containers.length - 1; i >= 0; i--) {

// never consider a container that's located within the item itself
// Never consider a container that's located within the item itself
if($.contains(this.currentItem[0], this.containers[i].element[0])) {
continue;
}

if(this._intersectsWith(this.containers[i].containerCache)) {

// if we've already found a container and it's more "inner" than this, then continue
// If we've already found a container and it's more "inner" than this, then continue
if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
continue;
}
@@ -888,12 +888,12 @@ return $.widget("ui.sortable", $.ui.mouse, {

}

// if no intersecting containers found, return
// If no intersecting containers found, return
if(!innermostContainer) {
return;
}

// move the item into the container if it's not there already
// Move the item into the container if it's not there already
if(this.containers.length === 1) {
if (!this.containers[innermostIndex].containerCache.over) {
this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));

0 comments on commit d86ac02

Please sign in to comment.
You can’t perform that action at this time.