make find all movies / find this list switch work
This commit is contained in:
parent
84f06d50b5
commit
ae28b99ae8
5 changed files with 27 additions and 39 deletions
|
@ -60,6 +60,7 @@ pandora.UI = (function() {
|
|||
add['lists.' + that.encode(list)] = {};
|
||||
}
|
||||
if (list != self.previousUI._list) {
|
||||
Ox.print('FIND HAS CHANGED LIST')
|
||||
if (!pandora.user.ui.lists[list]) {
|
||||
add['lists.' + that.encode(list)] = {};
|
||||
}
|
||||
|
|
|
@ -77,34 +77,19 @@ pandora.ui.findElement = function() {
|
|||
var findInList = pandora.user.ui._list
|
||||
&& pandora.$ui.findListSelect.value() == 'list',
|
||||
key = pandora.$ui.findSelect.value(),
|
||||
conditions = data.value ? [{
|
||||
key: key,
|
||||
value: data.value,
|
||||
operator: '='
|
||||
}] : [];
|
||||
if (findInList) {
|
||||
pandora.UI.set('find', {
|
||||
conditions: Ox.merge([{
|
||||
conditions = Ox.merge(
|
||||
findInList ? [{
|
||||
key: 'list',
|
||||
value: pandora.user.ui._list,
|
||||
operator: '=='
|
||||
}], conditions),
|
||||
operator: '&'
|
||||
});
|
||||
// fixme: what was this?
|
||||
// data.value && findIndex == 0 && pandora.user.ui.find.conditions.reverse();
|
||||
} else {
|
||||
if (pandora.user.ui._list) {
|
||||
Ox.forEach(pandora.$ui.folderList, function($list) {
|
||||
$list.options({selected: []});
|
||||
});
|
||||
pandora.UI.set({list: ''});
|
||||
}
|
||||
pandora.UI.set('find', {
|
||||
conditions: conditions,
|
||||
operator: '&'
|
||||
});
|
||||
}
|
||||
}] : [],
|
||||
data.value ? [{
|
||||
key: key,
|
||||
value: data.value,
|
||||
operator: '='
|
||||
}] : []
|
||||
);
|
||||
pandora.UI.set('find', {conditions: conditions, operator: '&'});
|
||||
}
|
||||
})
|
||||
]),
|
||||
|
|
|
@ -308,8 +308,15 @@ pandora.ui.folders = function() {
|
|||
}
|
||||
});
|
||||
}
|
||||
that.toggle = function() {
|
||||
|
||||
};
|
||||
that.bindEvent({
|
||||
pandora_find: function() {
|
||||
var previousUI = pandora.UI.getPrevious();
|
||||
if (!pandora.user.ui._list && previousUI._list) {
|
||||
Ox.forEach(pandora.$ui.folderList, function($list) {
|
||||
$list.options({selected: []});
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
return that;
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ pandora.ui.mainPanel = function() {
|
|||
.bindEvent({
|
||||
pandora_find: function() {
|
||||
var previousUI = pandora.UI.getPrevious();
|
||||
if (pandora.user.ui._list == previousUI._list && pandora.$ui.list) {
|
||||
if (!pandora.user.ui.item && pandora.user.ui._list == previousUI._list) {
|
||||
if (['map', 'calendar'].indexOf(pandora.user.ui.listView) > -1) {
|
||||
pandora.$ui.contentPanel.replaceElement(1,
|
||||
pandora.ui.navigationView(pandora.user.ui.listView)
|
||||
|
|
|
@ -13,16 +13,11 @@ pandora.ui.toolbar = function() {
|
|||
that.append(
|
||||
pandora.$ui.viewSelect = pandora.ui.viewSelect()
|
||||
);
|
||||
if (!ui.item && pandora.isClipView()) {
|
||||
that.append(
|
||||
!ui.item && that.append(
|
||||
pandora.$ui.sortSelect = pandora.ui.sortSelect()
|
||||
);
|
||||
}
|
||||
if (!ui.item && pandora.isClipView()) {
|
||||
that.append(
|
||||
).append(
|
||||
pandora.$ui.orderButton = pandora.ui.orderButton()
|
||||
);
|
||||
}
|
||||
that.append(
|
||||
pandora.$ui.findElement = pandora.ui.findElement()
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue