pandora/static/js/rightPanel.js

67 lines
3.3 KiB
JavaScript
Raw Permalink Normal View History

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();
2015-04-08 11:43:20 +00:00
pandora.$ui.list && pandora.$ui.list.size();
if (pandora.user.ui.listView == 'clips') {
2015-04-08 11:43:20 +00:00
if (pandora.$ui.list) {
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') {
2015-04-08 11:43:20 +00:00
pandora.$ui.list && pandora.$ui.list.options({width: data.size});
2011-09-26 16:46:31 +00:00
} else if (pandora.user.ui.listView == 'map') {
2015-04-08 11:43:20 +00:00
pandora.$ui.map && pandora.$ui.map.resizeMap();
2011-09-26 16:46:31 +00:00
} else if (pandora.user.ui.listView == 'calendar') {
2015-04-08 11:43:20 +00:00
pandora.$ui.calendar && pandora.$ui.calendar.resizeCalendar();
} else if (pandora.user.ui.listView == 'video') {
2015-04-08 11:43:20 +00:00
pandora.$ui.list && pandora.$ui.list.resize();
2011-05-25 19:42:45 +00:00
}
} else {
2015-04-08 11:43:20 +00:00
pandora.$ui.browser && pandora.$ui.browser.scrollToSelection();
if (pandora.user.ui.itemView == 'documents') {
2015-04-08 11:43:20 +00:00
pandora.$ui.documents && pandora.$ui.documents.updateSize();
} else if (pandora.user.ui.itemView == 'clips') {
2015-04-08 11:43:20 +00:00
pandora.$ui.clipList && pandora.$ui.clipList.size();
2012-04-17 08:03:11 +00:00
} else if (pandora.user.ui.itemView == 'timeline') {
2015-04-08 11:43:20 +00:00
pandora.$ui.timeline && pandora.$ui.timeline.options({width: data.size});
} else if (pandora.user.ui.itemView == 'player') {
2015-04-08 11:43:20 +00:00
pandora.$ui.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') {
2015-04-08 11:43:20 +00:00
pandora.$ui.map && pandora.$ui.map.resizeMap();
2011-10-30 21:05:57 +00:00
} else if (pandora.user.ui.listView == 'calendar') {
2015-04-08 11:43:20 +00:00
pandora.$ui.calendar && pandora.$ui.calendar.resizeCalendar();
} else if (pandora.user.ui.listView == 'video') {
2015-04-08 11:43:20 +00:00
pandora.$ui.list && pandora.$ui.list.size();
}
2011-05-25 19:42:45 +00:00
}
}
});
return that;
};