This commit is contained in:
j 2011-10-27 11:42:12 +02:00
commit 671b730db5
4 changed files with 30 additions and 12 deletions

View file

@ -16,6 +16,7 @@
"canDeleteItems": {"admin": true}, "canDeleteItems": {"admin": true},
"canDownloadVideo": {"guest": 0, "member": 0, "friend": 4, "staff": 4, "admin": 4}, "canDownloadVideo": {"guest": 0, "member": 0, "friend": 4, "staff": 4, "admin": 4},
"canEditMetadata": {"staff": true, "admin": true}, "canEditMetadata": {"staff": true, "admin": true},
"canEditSitePages": {"staff": true, "admin": true},
"canEditUsers": {"admin": true}, "canEditUsers": {"admin": true},
"canPlayClips": {"guest": 2, "member": 2, "friend": 4, "staff": 4, "admin": 4}, "canPlayClips": {"guest": 2, "member": 2, "friend": 4, "staff": 4, "admin": 4},
"canPlayVideo": {"guest": 1, "member": 1, "friend": 4, "staff": 4, "admin": 4}, "canPlayVideo": {"guest": 1, "member": 1, "friend": 4, "staff": 4, "admin": 4},

View file

@ -626,10 +626,7 @@ pandora.ui.infoView = function(data) {
type: 'image' type: 'image'
}) })
.addClass('OxColor OxColorGradient') .addClass('OxColor OxColorGradient')
.css({ .css({background: $element.css('background')})
background: $element.css('background'),
color: $element.css('color')
})
.css('margin' + (canEdit ? 'Left' : 'Right'), '4px') .css('margin' + (canEdit ? 'Left' : 'Right'), '4px')
.data({OxColor: $element.data('OxColor')}) .data({OxColor: $element.data('OxColor')})
.appendTo($line); .appendTo($line);

View file

@ -141,7 +141,8 @@ pandora.ui.mainMenu = function() {
pandora.site.capabilities.canSeeDebugMenu[pandora.user.level] pandora.site.capabilities.canSeeDebugMenu[pandora.user.level]
? [ ? [
{ id: 'debugMenu', title: 'Debug', items: [ { id: 'debugMenu', title: 'Debug', items: [
{ id: 'clearcache', title: 'Clear cache'}, { id: 'clearcache', title: 'Clear Cache'},
{ id: 'reloadapplication', title: 'Reload Application'},
{ id: 'resetui', title: 'Reset UI Settings'} { id: 'resetui', title: 'Reset UI Settings'}
] } ] }
] ]
@ -248,12 +249,14 @@ pandora.ui.mainMenu = function() {
groups: pandora.site.user.ui.groups groups: pandora.site.user.ui.groups
}); });
pandora.$ui.contentPanel.replaceElement(0, pandora.$ui.browser = pandora.ui.browser()); pandora.$ui.contentPanel.replaceElement(0, pandora.$ui.browser = pandora.ui.browser());
} else if (data.id == 'clearcache') {
Ox.Request.clearCache();
} else if (data.id == 'reloadapplication') {
pandora.$ui.appPanel.reload();
} else if (data.id == 'resetui') { } else if (data.id == 'resetui') {
pandora.api.resetUI({}, function() { pandora.api.resetUI({}, function() {
pandora.$ui.appPanel.reload(); pandora.$ui.appPanel.reload();
}); });
} else if (data.id == 'clearcache') {
Ox.Request.clearCache();
} }
}, },
pandora_find: function() { pandora_find: function() {

View file

@ -8,12 +8,29 @@ pandora.ui.siteDialog = function(section) {
Ox.getObjectById(tabs, section).selected = true; Ox.getObjectById(tabs, section).selected = true;
var $tabPanel = Ox.TabPanel({ var $tabPanel = Ox.TabPanel({
content: function(id) { content: function(id) {
var content = Ox.Element().css({padding: '16px', overflowY: 'auto'}); var $content = Ox.Element().css({padding: '16px', overflowY: 'auto'});
if (id == 'contact') { if (id == 'contact') {
content.append(pandora.ui.contactForm()); $content.append(pandora.ui.contactForm());
} else { } else {
pandora.api.getPage({name:id}, function(result) { pandora.api.getPage({name: id}, function(result) {
content.html(result.data.body); Ox.print('DATA::', result.data)
Ox.Editable({
editable: pandora.site.capabilities.canEditSitePages[pandora.user.level],
tooltip: 'Doubleclick to edit',
type: 'textarea',
value: result.data.body
})
.css({width: '100%'})
.bindEvent({
submit: function(data) {
Ox.Request.clearCache('getPage');
pandora.api.editPage({
name: id,
body: data.value
});
}
})
.appendTo($content)
}); });
} }
return Ox.SplitPanel({ return Ox.SplitPanel({
@ -31,7 +48,7 @@ pandora.ui.siteDialog = function(section) {
size: 272 size: 272
}, },
{ {
element: content element: $content
} }
], ],
orientation: 'horizontal' orientation: 'horizontal'