diff --git a/static/js/pandora/ui/item.js b/static/js/pandora/ui/item.js index d68c385..5a417bf 100644 --- a/static/js/pandora/ui/item.js +++ b/static/js/pandora/ui/item.js @@ -9,7 +9,7 @@ pandora.ui.item = function() { } else if (pandora.user.ui.itemView == 'calendar') { pandora.$ui.contentPanel.replaceElement(1, Ox.Element().html('Calendar')); } else if (pandora.user.ui.itemView == 'clips') { - pandora.$ui.contentPanel.replaceElement(1, Ox.IconList({ + pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.clips = Ox.IconList({ item: function(data, sort, size) { size = size || 128; var ratio = result.data.stream.aspectRatio, @@ -40,6 +40,14 @@ pandora.ui.item = function() { size: 128, sort: pandora.user.ui.lists[pandora.user.ui.list].sort, unique: 'id' + }).bindEvent({ + open: function(event, data) { + var id = data.ids[0], + item = pandora.user.ui.item, + position = pandora.$ui.clips.value(id, 'in'); + pandora.UI.set('videoPosition|' + item, position); + pandora.URL.set(item + '/timeline'); + } })); } else if (pandora.user.ui.itemView == 'info') { //Ox.print('result.data', result.data) @@ -164,6 +172,14 @@ pandora.ui.item = function() { size: 128, sort: pandora.user.ui.lists[pandora.user.ui.list].sort, unique: 'id' + }).bindEvent({ + open: function(event, data) { + var id = data.ids[0], + item = pandora.user.ui.item, + position = pandora.$ui.clips.value(id, 'in'); + pandora.UI.set('videoPosition|' + item, position); + pandora.URL.set(item + '/timeline'); + } }), id: 'place', size: 144 + Ox.UI.SCROLLBAR_SIZE diff --git a/static/js/pandora/ui/list.js b/static/js/pandora/ui/list.js index 67338ab..c60f15c 100644 --- a/static/js/pandora/ui/list.js +++ b/static/js/pandora/ui/list.js @@ -130,6 +130,14 @@ pandora.ui.list = function(view) { // fixme: remove view argument size: 128, sort: pandora.user.ui.lists[pandora.user.ui.list].sort, unique: 'id' + }).bindEvent({ + open: function(event, data) { + var id = data.ids[0], + item = that.value(id, 'item'), + position = that.value(id, 'in'); + pandora.UI.set('videoPosition|' + item, position); + pandora.URL.set(item + '/timeline'); + } }); } else if (view == 'map') { that = Ox.SplitPanel({ @@ -191,6 +199,14 @@ pandora.ui.list = function(view) { // fixme: remove view argument size: 128, sort: pandora.user.ui.lists[pandora.user.ui.list].sort, unique: 'id' + }).bindEvent({ + open: function(event, data) { + var id = data.ids[0], + item = pandora.$ui.clips.value(id, 'item'), + position = pandora.$ui.clips.value(id, 'in'); + pandora.UI.set('videoPosition|' + item, position); + pandora.URL.set(item + '/timeline'); + } }), id: 'place', size: 144 + Ox.UI.SCROLLBAR_SIZE