2011-07-29 18:37:11 +00:00
|
|
|
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
2011-08-17 09:29:42 +00:00
|
|
|
|
2011-11-05 17:04:10 +00:00
|
|
|
'use strict';
|
|
|
|
|
2011-05-25 19:42:45 +00:00
|
|
|
pandora.ui.rightPanel = function() {
|
2013-07-14 09:26:14 +00:00
|
|
|
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();
|
2011-10-20 16:49:01 +00:00
|
|
|
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'));
|
2011-10-20 16:49:01 +00:00
|
|
|
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') {
|
2011-09-23 10:44:54 +00:00
|
|
|
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();
|
2013-07-09 22:49:01 +00:00
|
|
|
} 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();
|
2014-02-02 13:40:01 +00:00
|
|
|
if (pandora.user.ui.itemView == 'documents') {
|
2014-02-17 11:44:16 +00:00
|
|
|
pandora.$ui.documents.updateSize();
|
2014-02-02 13:40:01 +00:00
|
|
|
} 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});
|
2012-04-17 07:06:19 +00:00
|
|
|
} else if (pandora.user.ui.itemView == 'player') {
|
2011-09-23 10:44:54 +00:00
|
|
|
pandora.$ui.player.options({width: data.size});
|
2012-04-17 07:06:19 +00:00
|
|
|
} 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();
|
2013-07-09 22:49:01 +00:00
|
|
|
} else if (pandora.user.ui.listView == 'video') {
|
|
|
|
pandora.$ui.list.size();
|
2011-09-23 10:44:54 +00:00
|
|
|
}
|
2011-05-25 19:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return that;
|
|
|
|
};
|
|
|
|
|