cablegates
This commit is contained in:
parent
522e0302c0
commit
7b073b2f98
11 changed files with 376 additions and 19 deletions
|
|
@ -13,7 +13,7 @@ Ox.load('UI', {
|
|||
hideScreen: false,
|
||||
loadImages: true,
|
||||
showScreen: true,
|
||||
theme: 'modern'
|
||||
theme: 'classic'
|
||||
}, function(browserSupported) {
|
||||
|
||||
// fixme: use Ox.extend()
|
||||
|
|
@ -98,7 +98,7 @@ Ox.load('UI', {
|
|||
|
||||
Ox.UI.hideLoadingScreen();
|
||||
|
||||
Ox.Theme(pandora.user.ui.theme);
|
||||
//Ox.Theme(pandora.user.ui.theme);
|
||||
pandora.$ui.appPanel = pandora.ui.appPanel().display();
|
||||
|
||||
Ox.Request.requests() && pandora.$ui.loadingIcon.start();
|
||||
|
|
|
|||
19
static/js/pandora/ui/cable.js
Normal file
19
static/js/pandora/ui/cable.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
pandora.ui.cable = function(id) {
|
||||
var that = Ox.Element().addClass('OxSelectable').css({overflow: 'auto'});
|
||||
pandora.api.get({id: id, keys: []}, function(result) {
|
||||
var header = result.data.header,
|
||||
content = result.data.content;
|
||||
that.html('')
|
||||
.append($('<div>').css('padding', '8px')
|
||||
.addClass('OxSelectable')
|
||||
.append($('<pre>').html(header))
|
||||
.append($('<pre>').html(content)
|
||||
))
|
||||
.scrollTop(0);
|
||||
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
pandora.ui.contentPanel = function() {
|
||||
var that = Ox.SplitPanel({
|
||||
var that= Ox.SplitPanel({
|
||||
elements: !pandora.user.ui.item ? [
|
||||
{
|
||||
collapsed: !pandora.user.ui.showGroups,
|
||||
|
|
@ -12,7 +12,22 @@ pandora.ui.contentPanel = function() {
|
|||
tooltip: 'groups'
|
||||
},
|
||||
{
|
||||
element: pandora.$ui.list = pandora.ui.list()
|
||||
element: pandora.$ui.mainContent = Ox.SplitPanel({
|
||||
elements: [
|
||||
{
|
||||
element: pandora.$ui.list = pandora.ui.list()
|
||||
},
|
||||
{
|
||||
element: Ox.Element().addClass('OxSelectable'),
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
size: 600,
|
||||
resizable: true,
|
||||
resize: [200, 400, 600]
|
||||
}
|
||||
],
|
||||
orientation: 'horizontal'
|
||||
})
|
||||
}
|
||||
] : [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -637,6 +637,16 @@ pandora.ui.list = function() { // fixme: remove view argument
|
|||
select: function(data) {
|
||||
var $still, $timeline;
|
||||
pandora.UI.set(['lists', pandora.user.ui.list, 'selected'].join('|'), data.ids);
|
||||
if (data.ids.length) {
|
||||
pandora.$ui.mainContent.replaceElement(1,
|
||||
pandora.$ui.cable = pandora.ui.cable(data.ids[0]));
|
||||
if(pandora.$ui.mainContent.isCollapsed(1))
|
||||
pandora.$ui.mainContent.toggle(1);
|
||||
} else {
|
||||
if(!pandora.$ui.mainContent.isCollapsed(1))
|
||||
pandora.$ui.mainContent.toggle(1);
|
||||
}
|
||||
/*
|
||||
//pandora.user.ui.lists[pandora.user.ui.list].selected = data.ids;
|
||||
if (data.ids.length) {
|
||||
pandora.$ui.mainMenu.enableItem('copy');
|
||||
|
|
@ -660,6 +670,7 @@ pandora.ui.list = function() { // fixme: remove view argument
|
|||
}, function(result) {
|
||||
pandora.$ui.selected.html(pandora.ui.status('selected', result.data));
|
||||
});
|
||||
*/
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -43,5 +43,6 @@
|
|||
"js/pandora/ui/mediaView.js",
|
||||
"js/pandora/ui/home.js",
|
||||
"js/pandora/ui/preferencesDialog.js",
|
||||
"js/pandora/ui/siteDialog.js"
|
||||
"js/pandora/ui/siteDialog.js",
|
||||
"js/pandora/ui/cable.js"
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue