1
0
Fork 0
forked from 0x2620/oxjs

exclusively handle selectability of text via .OxSelectable and body.OxDragging (to be set/unset in dragstart/dragend handlers)

This commit is contained in:
rlx 2013-07-19 08:42:25 +00:00
commit 564ce69a78
17 changed files with 53 additions and 39 deletions

View file

@ -424,6 +424,7 @@ Ox.List = function(options, self) {
|| $parent.is('.OxTarget') // table lists
|| $parent.parent().is('.OxTarget') // table lists with div inside cell
) && !$target.is('.OxSpecialTarget')) {
Ox.$body.addClass('OxDragging');
self.drag = {
ids: self.options.selected
};
@ -466,6 +467,7 @@ Ox.List = function(options, self) {
function dragend(data) {
if (self.drag) {
Ox.$body.removeClass('OxDragging');
that.triggerEvent('draganddropend', {
event: data,
ids: self.drag.ids
@ -933,6 +935,7 @@ Ox.List = function(options, self) {
}
function movestart(data) {
Ox.$body.addClass('OxDragging');
var pos = findItemPosition(data),
$items = self.$items.filter(function($item, i) {
if ($item.is('.OxSelected')) {
@ -973,6 +976,7 @@ Ox.List = function(options, self) {
function moveend(data) {
var ids = [];
Ox.$body.removeClass('OxDragging');
self.$items.forEach(function($item) {
$item.removeClass('OxDrag');
ids.push($item.options('data')[self.options.unique]);