[SSE] Pivot settings: drag and drop (fix style of insert)
This commit is contained in:
parent
ef84781e99
commit
23817335de
|
@ -216,12 +216,12 @@ define([
|
||||||
|
|
||||||
onDragItemEnter: function (item, index, event) {
|
onDragItemEnter: function (item, index, event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
item.$el.css({'border-top-color': '#b7b7b7'});
|
item.$el.addClass('insert');
|
||||||
this.indexMoveTo = index;
|
this.indexMoveTo = index;
|
||||||
},
|
},
|
||||||
|
|
||||||
onDragItemLeave: function (item, index, event) {
|
onDragItemLeave: function (item, index, event) {
|
||||||
item.$el.css({'border-top-color': '#fafafa'});
|
item.$el.removeClass('insert');
|
||||||
this.indexMoveTo = undefined;
|
this.indexMoveTo = undefined;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ define([
|
||||||
} else {
|
} else {
|
||||||
event.preventDefault(); // Necessary. Allows us to drop.
|
event.preventDefault(); // Necessary. Allows us to drop.
|
||||||
event.originalEvent.dataTransfer.dropEffect = 'move';
|
event.originalEvent.dataTransfer.dropEffect = 'move';
|
||||||
item.$el.css({'border-top-color': '#b7b7b7'});
|
item.$el.addClass('insert');
|
||||||
this.indexMoveTo = index;
|
this.indexMoveTo = index;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -248,13 +248,13 @@ define([
|
||||||
} else {
|
} else {
|
||||||
event.preventDefault(); // Necessary. Allows us to drop.
|
event.preventDefault(); // Necessary. Allows us to drop.
|
||||||
event.originalEvent.dataTransfer.dropEffect = 'move';
|
event.originalEvent.dataTransfer.dropEffect = 'move';
|
||||||
listview.$el.find('.item').last().css({'border-bottom-color': '#b7b7b7'});
|
listview.$el.find('.item').last().addClass('insert last');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onDragLeave: function (listview, event) {
|
onDragLeave: function (listview, event) {
|
||||||
listview.$el.find('.item').css({'border-top-color': '#fafafa', 'border-bottom-color': '#ddd'});
|
listview.$el.find('.item').removeClass('insert last');
|
||||||
},
|
},
|
||||||
|
|
||||||
onDrop: function (event) {
|
onDrop: function (event) {
|
||||||
|
|
|
@ -388,8 +388,18 @@ button:active:not(.disabled) .btn-change-shape {background-position: -56px -
|
||||||
width: 95px;
|
width: 95px;
|
||||||
height: 130px;
|
height: 130px;
|
||||||
|
|
||||||
.item {
|
.listview:not(.disabled) > .item {
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
|
border-top: none;
|
||||||
|
&.insert {
|
||||||
|
background: linear-gradient(to bottom, #656565, #fff 5%);
|
||||||
|
&.last {
|
||||||
|
background: linear-gradient(to top, #656565, #fff 5%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
border-top: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-item > div:nth-child(1) {
|
.list-item > div:nth-child(1) {
|
||||||
|
|
Loading…
Reference in a new issue