forked from 0x2620/pandora
add find element to item clips view
This commit is contained in:
parent
f2b401d69b
commit
84f06d50b5
2 changed files with 28 additions and 4 deletions
|
@ -69,9 +69,7 @@ pandora.ui.clipList = function(videoRatio) {
|
|||
conditions:[{key: 'id', value: ui.item, operator: '=='}],
|
||||
operator: '&'
|
||||
};
|
||||
// fixme: there is currently no way to add a clip query
|
||||
// we'll need something like itemFind (vs. listFind)
|
||||
query = {conditions: [], operator: '&'};
|
||||
query = pandora.user.ui.itemFind;
|
||||
}
|
||||
pandora.api.findClips(Ox.extend({
|
||||
itemsQuery: itemsQuery,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
pandora.ui.clipsView = function(videoRatio) {
|
||||
|
||||
var that = Ox.SplitPanel({
|
||||
|
@ -10,9 +12,33 @@ pandora.ui.clipsView = function(videoRatio) {
|
|||
.append(
|
||||
pandora.$ui.orderButton = pandora.ui.orderButton()
|
||||
)
|
||||
.append(
|
||||
Ox.Input({
|
||||
clear: true,
|
||||
placeholder: 'Find Clips',
|
||||
value: pandora.user.ui.itemFind.conditions[0]
|
||||
? pandora.user.ui.itemFind.conditions[0].value : '',
|
||||
width: 192
|
||||
})
|
||||
.css({float: 'right', margin: '4px'})
|
||||
.bindEvent({
|
||||
submit: function(data) {
|
||||
pandora.UI.set('itemFind', data.value ? {
|
||||
conditions: [{key: 'subtitles', value: data.value, operator: '='}],
|
||||
operator: '&'
|
||||
} : pandora.site.user.ui.itemFind);
|
||||
// since this is the only way itemFind can change,
|
||||
// there's no need for an event handler
|
||||
that.replaceElement(1,
|
||||
pandora.$ui.clipList = pandora.ui.clipList(videoRatio)
|
||||
);
|
||||
}
|
||||
})
|
||||
),
|
||||
size: 24
|
||||
},
|
||||
{
|
||||
element: pandora.$ui.clipList = pandora.ui.clipList(videoRatio);
|
||||
element: pandora.$ui.clipList = pandora.ui.clipList(videoRatio)
|
||||
}
|
||||
],
|
||||
orientation: 'vertical'
|
||||
|
|
Loading…
Reference in a new issue