its an inbox
This commit is contained in:
parent
b1215fbc1b
commit
aac3e66f7b
8 changed files with 58 additions and 54 deletions
|
|
@ -316,7 +316,7 @@ oml.enableDragAndDrop = function($list, canMove) {
|
|||
|
||||
$list.bindEvent({
|
||||
draganddropstart: function(data) {
|
||||
var $lists = oml.$ui.libraryList.concat(oml.$ui.publicList).concat(oml.$ui.folderList);
|
||||
var $lists = oml.$ui.libraryList.concat(oml.$ui.inboxList).concat(oml.$ui.folderList);
|
||||
drag.action = 'copy';
|
||||
drag.ids = $list.options('selected');
|
||||
drag.item = drag.ids.length == 1
|
||||
|
|
@ -335,9 +335,9 @@ oml.enableDragAndDrop = function($list, canMove) {
|
|||
&& drag.source.user != ''
|
||||
&& data.user == ''
|
||||
) || (
|
||||
data.type == 'static'
|
||||
&& data.name == 'Public'
|
||||
data.type == 'library'
|
||||
&& drag.source.user == ''
|
||||
&& data.user != ''
|
||||
),
|
||||
selected: data.id == ui._list
|
||||
}, data);
|
||||
|
|
@ -492,8 +492,12 @@ oml.enableDragAndDrop = function($list, canMove) {
|
|||
text = Ox._('You cannot move books<br>out of a smart list.');
|
||||
}
|
||||
} else if (drag.target) {
|
||||
console.log(drag.target)
|
||||
targetText = drag.target.type == 'libraries' ? Ox._('a library')
|
||||
: drag.target.type == 'library' ? Ox._('your library')
|
||||
: drag.target.type == 'library' ?
|
||||
drag.target.user == ''
|
||||
? Ox._('your library')
|
||||
: Ox._('{0}\'s library', [Ox.encodeHTMLEntities(Ox.truncate(drag.target.user, 32))])
|
||||
: Ox._('the list "{0}"', [Ox.encodeHTMLEntities(Ox.truncate(drag.target.name, 32))]);
|
||||
if (
|
||||
(
|
||||
|
|
@ -507,7 +511,7 @@ oml.enableDragAndDrop = function($list, canMove) {
|
|||
Ox._(itemText[0] == '"' ? '' : 'These ') + itemText,
|
||||
targetText
|
||||
]);
|
||||
} else if (drag.target.user != '' && drag.target.name != 'Public') {
|
||||
} else if (drag.target.user != '' && drag.target.type != 'library') {
|
||||
text = Ox._(
|
||||
'You can only {0} books<br>to your own {1}.',
|
||||
[actionText, drag.target.type == 'library' ? 'library' : 'lists']
|
||||
|
|
@ -992,7 +996,7 @@ oml.resizeListFolders = function() {
|
|||
oml.$ui.libraryList[index]
|
||||
.css({width: width + 'px'})
|
||||
.resizeColumn('name', columnWidth);
|
||||
oml.$ui.publicList[index]
|
||||
oml.$ui.inboxList[index] && oml.$ui.inboxList[index]
|
||||
.css({width: width + 'px'})
|
||||
.resizeColumn('name', columnWidth);
|
||||
oml.$ui.folderList[index]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue