pandora/static/js/pandora/rightPanel.js

63 lines
2.6 KiB
JavaScript
Raw Normal View History

2011-07-29 18:37:11 +00:00
// vim: et:ts=4:sw=4:sts=4:ft=javascript
2011-05-25 19:42:45 +00:00
pandora.ui.rightPanel = function() {
var that;
if (pandora.user.ui.section == 'items') {
2011-06-19 17:49:25 +00:00
that = Ox.SplitPanel({
2011-05-25 19:42:45 +00:00
elements: [
{
2011-06-06 15:48:11 +00:00
element: pandora.$ui.toolbar = pandora.ui.toolbar(),
2011-05-25 19:42:45 +00:00
size: 24
},
{
2011-06-06 15:48:11 +00:00
element: pandora.$ui.contentPanel = pandora.ui.contentPanel()
2011-05-25 19:42:45 +00:00
},
{
2011-06-06 15:48:11 +00:00
element: pandora.$ui.statusbar = pandora.ui.statusbar(),
2011-05-25 19:42:45 +00:00
size: 16
}
],
id: 'rightPanel',
orientation: 'vertical'
})
.bindEvent({
2011-09-17 17:40:15 +00:00
resize: function(data) {
2011-06-06 15:48:11 +00:00
if (!pandora.user.ui.item) {
pandora.resizeGroups();
2011-06-06 15:48:11 +00:00
pandora.$ui.list.size();
if (pandora.user.ui.listView == 'clips') {
var clipsItems = pandora.getClipsItems();
previousClipsItems = pandora.getClipsItems(pandora.$ui.list.options('width'));
pandora.$ui.list.options({width: data.size});
if (clipsItems != previousClipsItems) {
Ox.Request.clearCache(); // fixme
pandora.$ui.list.reloadList(true);
}
} else if (pandora.user.ui.listView == 'timelines') {
pandora.$ui.list.options({width: data.size});
2011-09-26 16:46:31 +00:00
} else if (pandora.user.ui.listView == 'map') {
2011-06-06 15:48:11 +00:00
pandora.$ui.map.resizeMap();
2011-09-26 16:46:31 +00:00
} else if (pandora.user.ui.listView == 'calendar') {
pandora.$ui.calendar.resizeCalendar();
2011-05-25 19:42:45 +00:00
}
} else {
2011-06-06 15:48:11 +00:00
pandora.$ui.browser.scrollToSelection();
if (pandora.user.ui.itemView == 'clips') {
2011-10-30 15:36:14 +00:00
pandora.$ui.clipList.size();
} else if (pandora.user.ui.itemView == 'video') {
pandora.$ui.player.options({width: data.size});
} else if (pandora.user.ui.itemView == 'timeline') {
pandora.$ui.editor.options({width: data.size});
2011-10-30 21:05:57 +00:00
} else if (pandora.user.ui.listView == 'map') {
pandora.$ui.map.resizeMap();
} else if (pandora.user.ui.listView == 'calendar') {
pandora.$ui.calendar.resizeCalendar();
}
2011-05-25 19:42:45 +00:00
}
}
});
}
return that;
};