allow for selecting more than one item in group

This commit is contained in:
rolux 2010-07-11 00:35:06 +02:00
parent 0964485900
commit 2bb866f1f2

View file

@ -681,12 +681,18 @@ $ui.statusbar = new Ox.Bar({
$ui.mainMenu.disableItem("openmovie");
}
if (data.ids.length == 1) {
setTimeout(function() {
if (data.ids[0] != ui.selectedMovies[0]) {
Ox.print("cancel after timeout...")
return;
}
$still = $("<img>")
.attr({
src: "http://0xdb.org/" + data.ids[0] + "/still.jpg"
})
.one("load", function() {
if (data.ids[0] != ui.selectedMovies[0]) {
Ox.print("cancel after load...")
return;
}
var image = $still[0],
@ -742,6 +748,7 @@ $ui.statusbar = new Ox.Bar({
});
});
*/
}, 100);
}
app.request("find", {
query: {
@ -850,8 +857,11 @@ $ui.statusbar = new Ox.Bar({
function constructQuery(groupId) {
var conditions = $.merge(!Ox.isUndefined(user.ui.find.key) ? [user.ui.find] : [], groups ? $.map(groups, function(v, i) {
if (v.id != groupId) {
return v.conditions;
if (v.id != groupId && v.conditions.length) {
return v.conditions.length == 1 ? v.conditions : {
conditions: v.conditions,
operator: "|"
};
}
}) : []);
return {