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)] = {};
|
add['lists.' + that.encode(list)] = {};
|
||||||
}
|
}
|
||||||
if (list != self.previousUI._list) {
|
if (list != self.previousUI._list) {
|
||||||
|
Ox.print('FIND HAS CHANGED LIST')
|
||||||
if (!pandora.user.ui.lists[list]) {
|
if (!pandora.user.ui.lists[list]) {
|
||||||
add['lists.' + that.encode(list)] = {};
|
add['lists.' + that.encode(list)] = {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,34 +77,19 @@ pandora.ui.findElement = function() {
|
||||||
var findInList = pandora.user.ui._list
|
var findInList = pandora.user.ui._list
|
||||||
&& pandora.$ui.findListSelect.value() == 'list',
|
&& pandora.$ui.findListSelect.value() == 'list',
|
||||||
key = pandora.$ui.findSelect.value(),
|
key = pandora.$ui.findSelect.value(),
|
||||||
conditions = data.value ? [{
|
conditions = Ox.merge(
|
||||||
key: key,
|
findInList ? [{
|
||||||
value: data.value,
|
|
||||||
operator: '='
|
|
||||||
}] : [];
|
|
||||||
if (findInList) {
|
|
||||||
pandora.UI.set('find', {
|
|
||||||
conditions: Ox.merge([{
|
|
||||||
key: 'list',
|
key: 'list',
|
||||||
value: pandora.user.ui._list,
|
value: pandora.user.ui._list,
|
||||||
operator: '=='
|
operator: '=='
|
||||||
}], conditions),
|
}] : [],
|
||||||
operator: '&'
|
data.value ? [{
|
||||||
});
|
key: key,
|
||||||
// fixme: what was this?
|
value: data.value,
|
||||||
// data.value && findIndex == 0 && pandora.user.ui.find.conditions.reverse();
|
operator: '='
|
||||||
} else {
|
}] : []
|
||||||
if (pandora.user.ui._list) {
|
);
|
||||||
Ox.forEach(pandora.$ui.folderList, function($list) {
|
pandora.UI.set('find', {conditions: conditions, operator: '&'});
|
||||||
$list.options({selected: []});
|
|
||||||
});
|
|
||||||
pandora.UI.set({list: ''});
|
|
||||||
}
|
|
||||||
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;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,7 +20,7 @@ pandora.ui.mainPanel = function() {
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
pandora_find: function() {
|
pandora_find: function() {
|
||||||
var previousUI = pandora.UI.getPrevious();
|
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) {
|
if (['map', 'calendar'].indexOf(pandora.user.ui.listView) > -1) {
|
||||||
pandora.$ui.contentPanel.replaceElement(1,
|
pandora.$ui.contentPanel.replaceElement(1,
|
||||||
pandora.ui.navigationView(pandora.user.ui.listView)
|
pandora.ui.navigationView(pandora.user.ui.listView)
|
||||||
|
|
|
@ -13,16 +13,11 @@ pandora.ui.toolbar = function() {
|
||||||
that.append(
|
that.append(
|
||||||
pandora.$ui.viewSelect = pandora.ui.viewSelect()
|
pandora.$ui.viewSelect = pandora.ui.viewSelect()
|
||||||
);
|
);
|
||||||
if (!ui.item && pandora.isClipView()) {
|
!ui.item && that.append(
|
||||||
that.append(
|
|
||||||
pandora.$ui.sortSelect = pandora.ui.sortSelect()
|
pandora.$ui.sortSelect = pandora.ui.sortSelect()
|
||||||
);
|
).append(
|
||||||
}
|
|
||||||
if (!ui.item && pandora.isClipView()) {
|
|
||||||
that.append(
|
|
||||||
pandora.$ui.orderButton = pandora.ui.orderButton()
|
pandora.$ui.orderButton = pandora.ui.orderButton()
|
||||||
);
|
);
|
||||||
}
|
|
||||||
that.append(
|
that.append(
|
||||||
pandora.$ui.findElement = pandora.ui.findElement()
|
pandora.$ui.findElement = pandora.ui.findElement()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue