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