pandora/static/js/rightPanel.js

67 lines
3 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-11-05 17:04:10 +00:00
'use strict';
2011-05-25 19:42:45 +00:00
pandora.ui.rightPanel = function() {
var 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
}
],
id: 'rightPanel',
orientation: 'vertical'
})
.bindEvent({
2011-09-17 17:40:15 +00:00
resize: function(data) {
2011-11-06 22:03:24 +00:00
var clipsItems, previousClipsItems;
2011-06-06 15:48:11 +00:00
if (!pandora.user.ui.item) {
2011-11-06 08:28:10 +00:00
pandora.resizeFilters();
2011-06-06 15:48:11 +00:00
pandora.$ui.list.size();
if (pandora.user.ui.listView == 'clips') {
2011-11-06 22:03:24 +00:00
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();
} else if (pandora.user.ui.listView == 'video') {
pandora.$ui.list.resize();
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 == 'documents') {
pandora.$ui.documents.updateSize();
} else if (pandora.user.ui.itemView == 'clips') {
2011-10-30 15:36:14 +00:00
pandora.$ui.clipList.size();
2012-04-17 08:03:11 +00:00
} else if (pandora.user.ui.itemView == 'timeline') {
pandora.$ui.timeline.options({width: data.size});
} else if (pandora.user.ui.itemView == 'player') {
pandora.$ui.player.options({width: data.size});
} else if (pandora.user.ui.itemView == 'editor') {
2015-04-08 11:33:00 +00:00
pandora.$ui.editor && 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();
} else if (pandora.user.ui.listView == 'video') {
pandora.$ui.list.size();
}
2011-05-25 19:42:45 +00:00
}
}
});
return that;
};