minor fixes
This commit is contained in:
parent
c568f1f51d
commit
a77413f9f7
1 changed files with 15 additions and 8 deletions
|
@ -486,9 +486,16 @@ pandora.ui.list = function() { // fixme: remove view argument
|
||||||
} else {
|
} else {
|
||||||
image = drag.action == 'copy' ? 'symbolAdd' : 'symbolRemove';
|
image = drag.action == 'copy' ? 'symbolAdd' : 'symbolRemove';
|
||||||
text = Ox.toTitleCase(drag.action) + ' ' + (
|
text = Ox.toTitleCase(drag.action) + ' ' + (
|
||||||
Ox.isString(drag.item) ? '"' + drag.item + '"' : drag.item + ' '
|
Ox.isString(drag.item)
|
||||||
+ pandora.site.itemName[drag.item == 1 ? 'singular' : 'plural'].toLowerCase()
|
? '"' + drag.item + '"'
|
||||||
) + '</br> to ' + (drag.target ? 'the list "' + drag.target.name + '"' : 'another list');
|
: drag.item + ' ' + pandora.site.itemName[
|
||||||
|
drag.item == 1 ? 'singular' : 'plural'
|
||||||
|
].toLowerCase()
|
||||||
|
) + '</br> to ' + (
|
||||||
|
drag.target && !drag.target.selected
|
||||||
|
? 'the list "' + drag.target.name + '"'
|
||||||
|
: 'another list'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return $('<div>')
|
return $('<div>')
|
||||||
.append(
|
.append(
|
||||||
|
@ -612,7 +619,11 @@ pandora.ui.list = function() { // fixme: remove view argument
|
||||||
},
|
},
|
||||||
draganddropend: function(data) {
|
draganddropend: function(data) {
|
||||||
Ox.print(data, drag, '------------');
|
Ox.print(data, drag, '------------');
|
||||||
if (drag.target && drag.target.editable) {
|
Ox.UI.$window.unbind({
|
||||||
|
keydown: keydown,
|
||||||
|
keyup: keyup
|
||||||
|
});
|
||||||
|
if (drag.target && drag.target.editable && !drag.target.selected) {
|
||||||
if (drag.action == 'copy' || (
|
if (drag.action == 'copy' || (
|
||||||
drag.action == 'move' && drag.source.editable
|
drag.action == 'move' && drag.source.editable
|
||||||
)) {
|
)) {
|
||||||
|
@ -655,10 +666,6 @@ pandora.ui.list = function() { // fixme: remove view argument
|
||||||
cleanup(0);
|
cleanup(0);
|
||||||
}
|
}
|
||||||
function cleanup(ms) {
|
function cleanup(ms) {
|
||||||
Ox.UI.$window.unbind({
|
|
||||||
keydown: keydown,
|
|
||||||
keyup: keyup
|
|
||||||
});
|
|
||||||
drag = {};
|
drag = {};
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('.OxDroppable').removeClass('OxDroppable');
|
$('.OxDroppable').removeClass('OxDroppable');
|
||||||
|
|
Loading…
Reference in a new issue