fix clips query in clip view; rewind video icon on deselect
This commit is contained in:
parent
e2436aa7c3
commit
a7cc9acc63
5 changed files with 19 additions and 16 deletions
|
@ -118,6 +118,7 @@ pandora.UI = (function() {
|
|||
}
|
||||
*/
|
||||
// pandora.URL.update(Object.keys(trigger));
|
||||
Ox.print('isBooting?', !pandora.$ui.appPanel, Object.keys(args));
|
||||
pandora.URL.update(Object.keys(
|
||||
!pandora.$ui.appPanel ? args : trigger
|
||||
));
|
||||
|
|
|
@ -332,7 +332,8 @@ pandora.URL = (function() {
|
|||
if (url) {
|
||||
self.URL.push(null, '', url, setState);
|
||||
} else {
|
||||
alert('DO YOU REALLY WANT TO CALL PUSH WITHOUT URL?')
|
||||
// fixme
|
||||
//alert('DO YOU REALLY WANT TO CALL PUSH WITHOUT URL?')
|
||||
//self.URL.push(getState());
|
||||
}
|
||||
return that;
|
||||
|
@ -349,6 +350,7 @@ pandora.URL = (function() {
|
|||
};
|
||||
|
||||
that.update = function(keys) {
|
||||
Ox.print('update.........', keys)
|
||||
// this gets called from pandora.UI
|
||||
var action;
|
||||
if (self.isPopState) {
|
||||
|
|
|
@ -5,6 +5,7 @@ pandora.ui.clipList = function(videoRatio) {
|
|||
var ui = pandora.user.ui,
|
||||
fixedRatio = !ui.item ? 16/9 : videoRatio,
|
||||
isClipView = !ui.item ? ui.listView == 'clip' : ui.itemView == 'clips',
|
||||
$selectedVideo,
|
||||
|
||||
that = Ox.IconList({
|
||||
fixedRatio: fixedRatio,
|
||||
|
@ -47,14 +48,9 @@ pandora.ui.clipList = function(videoRatio) {
|
|||
query = {conditions: [], operator: '&'};
|
||||
// if the item query contains a layer condition,
|
||||
// then this condition is added to the clip query
|
||||
// fixme: don't just check for 'subtitles'
|
||||
itemQuery.conditions.forEach(function(condition) {
|
||||
if (condition.key == 'subtitles') {
|
||||
query.conditions.push({
|
||||
key: 'value',
|
||||
value: condition.value,
|
||||
operator: condition.operator
|
||||
});
|
||||
if (Ox.getPositionById(pandora.site.layers, condition.key) > -1) {
|
||||
query.conditions.push(condition);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -158,6 +154,7 @@ pandora.ui.clipList = function(videoRatio) {
|
|||
$img.replaceWith($player.$element);
|
||||
$('.OxSelectedVideo').removeClass('OxSelectedVideo');
|
||||
$player.$element.addClass('OxSelectedVideo');
|
||||
$selectedVideo = $player;
|
||||
});
|
||||
} else if ($video.length) {
|
||||
// item select fires before video click
|
||||
|
@ -167,11 +164,15 @@ pandora.ui.clipList = function(videoRatio) {
|
|||
setTimeout(function() {
|
||||
$('.OxSelectedVideo').removeClass('OxSelectedVideo');
|
||||
$video.addClass('OxSelectedVideo');
|
||||
$selectedVideo = $video;
|
||||
}, 300);
|
||||
}
|
||||
!ui.item && pandora.UI.set('listSelection', [item]);
|
||||
} else {
|
||||
$('.OxSelectedVideo').removeClass('OxSelectedVideo');
|
||||
$selectedVideo && $selectedVideo.options({
|
||||
position: $selectedVideo.options('in')
|
||||
});
|
||||
!ui.item && pandora.UI.set('listSelection', []);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ pandora.ui.folderBrowserBar = function(id) {
|
|||
change: function(data) {
|
||||
var key = data.selected[0].id == 'user' ? 'user' : 'name',
|
||||
value = pandora.$ui.findListInput[id].value();
|
||||
value && updateItems(key, value);
|
||||
value && updateList(key, value);
|
||||
pandora.$ui.findListInput[id].options({
|
||||
placeholder: data.selected[0].title
|
||||
});
|
||||
|
@ -33,7 +33,7 @@ pandora.ui.folderBrowserBar = function(id) {
|
|||
change: function(data) {
|
||||
var key = pandora.$ui.findListSelect[id].value() == 'user' ? 'user' : 'name',
|
||||
value = data.value;
|
||||
updateItems(key, value);
|
||||
updateList(key, value);
|
||||
}
|
||||
})
|
||||
],
|
||||
|
@ -44,7 +44,7 @@ pandora.ui.folderBrowserBar = function(id) {
|
|||
align: 'right'
|
||||
})
|
||||
.appendTo(that);
|
||||
function updateItems(key, value) {
|
||||
function updateList(key, value) {
|
||||
pandora.$ui.folderList[id].options({
|
||||
items: function(data, callback) {
|
||||
var query = id == 'favorite' ? {conditions: [
|
||||
|
|
|
@ -68,7 +68,7 @@ pandora.ui.usersDialog = function() {
|
|||
change: function(data) {
|
||||
var key = data.selected[0].id,
|
||||
value = $findInput.value();
|
||||
value && updateItems(key, value);
|
||||
value && updateList(key, value);
|
||||
$findInput.options({
|
||||
placeholder: data.selected[0].title
|
||||
});
|
||||
|
@ -85,7 +85,7 @@ pandora.ui.usersDialog = function() {
|
|||
change: function(data) {
|
||||
var key = $findSelect.value(),
|
||||
value = data.value;
|
||||
updateItems(key, value);
|
||||
updateList(key, value);
|
||||
}
|
||||
}),
|
||||
|
||||
|
@ -396,7 +396,7 @@ pandora.ui.usersDialog = function() {
|
|||
|
||||
}
|
||||
|
||||
function updateItems(key, value) {
|
||||
function updateList(key, value) {
|
||||
var query = {
|
||||
conditions: Ox.merge(
|
||||
key != 'email' ? [{key: 'username', value: value, operator: '='}] : [],
|
||||
|
@ -410,8 +410,7 @@ pandora.ui.usersDialog = function() {
|
|||
query: query
|
||||
}), callback);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
return that;
|
||||
|
|
Loading…
Reference in a new issue