use pandora.hasCapability

This commit is contained in:
j 2017-11-04 11:53:27 +02:00
parent 4a69de4a05
commit db2d37e2bb
32 changed files with 49 additions and 53 deletions

View file

@ -45,7 +45,7 @@ pandora.ui.addItemDialog = function(options) {
{ {
id: 'import', id: 'import',
title: Ox._('Import Video Files'), title: Ox._('Import Video Files'),
disabled: !pandora.site.capabilities.canImportItems[pandora.user.level], disabled: !pandora.hasCapability('canImportItems'),
selected: selected == 'import' selected: selected == 'import'
} }
] ]

View file

@ -213,7 +213,7 @@ pandora.ui.clipList = function(videoRatio) {
pandora.api.get({id: item, keys: ['durations', 'rightslevel', 'streams']}, function(result) { pandora.api.get({id: item, keys: ['durations', 'rightslevel', 'streams']}, function(result) {
var points = [that.value(id, 'in'), that.value(id, 'out')], var points = [that.value(id, 'in'), that.value(id, 'out')],
$player = Ox.VideoPlayer({ $player = Ox.VideoPlayer({
censored: pandora.site.capabilities.canPlayClips[pandora.user.level] < result.data.rightslevel censored: pandora.hasCapability('canPlayClips') < result.data.rightslevel
? [{'in': 0, out: points[1] - points[0]}] ? [{'in': 0, out: points[1] - points[0]}]
: [], : [],
censoredIcon: pandora.site.cantPlay.icon, censoredIcon: pandora.site.cantPlay.icon,

View file

@ -29,7 +29,7 @@ pandora.ui.collection = function() {
unique: 'id', unique: 'id',
columns: pandora.site.documentSortKeys.filter(function(key) { columns: pandora.site.documentSortKeys.filter(function(key) {
return !key.capability return !key.capability
|| pandora.site.capabilities[key.capability][pandora.user.level]; || pandora.hasCapability(key.capability);
}).map(function(key) { }).map(function(key) {
var position = ui.collectionColumns.indexOf(key.id); var position = ui.collectionColumns.indexOf(key.id);
return { return {

View file

@ -3,8 +3,8 @@
pandora.ui.documentInfoView = function(data) { pandora.ui.documentInfoView = function(data) {
var ui = pandora.user.ui, var ui = pandora.user.ui,
canEdit = pandora.site.capabilities.canEditMetadata[pandora.user.level] || data.editable, canEdit = pandora.hasCapability('canEditMetadata') || data.editable,
canRemove = pandora.site.capabilities.canRemoveItems[pandora.user.level], canRemove = pandora.hasCapability('canRemoveItems'),
css = { css = {
marginTop: '4px', marginTop: '4px',
textAlign: 'justify' textAlign: 'justify'
@ -485,7 +485,7 @@ pandora.ui.documentInfoView = function(data) {
.appendTo($line); .appendTo($line);
} }
capabilities.forEach(function(capability) { capabilities.forEach(function(capability) {
var hasCapability = pandora.site.capabilities[capability.name][userLevel] >= rightsLevel, var hasCapability = pandora.hasCapability(capability.name, userLevel) >= rightsLevel,
$element = Ox.Theme.formatColorLevel(hasCapability, ['', '']); $element = Ox.Theme.formatColorLevel(hasCapability, ['', '']);
Ox.Button({ Ox.Button({
tooltip: (canEdit ? Ox.toTitleCase(userLevel) : 'You') + ' ' tooltip: (canEdit ? Ox.toTitleCase(userLevel) : 'You') + ' '

View file

@ -10,7 +10,7 @@ pandora.ui.documentsDialog = function() {
// FIXME: user may not have the manage entites capability // FIXME: user may not have the manage entites capability
$switchButton = Ox.Button({ $switchButton = Ox.Button({
disabled: !pandora.site.entities.length disabled: !pandora.site.entities.length
|| !pandora.site.capabilities.canManageEntities[pandora.user.level], || !pandora.hasCapability('canManageEntities'),
title: Ox._('Manage Entities...') title: Ox._('Manage Entities...')
}) })
.bindEvent({ .bindEvent({

View file

@ -576,7 +576,7 @@ pandora.ui.documentsPanel = function(options) {
var $name, $description, $input, var $name, $description, $input,
item = $list.value($list.options('selected')[0]), item = $list.value($list.options('selected')[0]),
editable = item.user == pandora.user.username editable = item.user == pandora.user.username
|| pandora.site.capabilities.canEditDocuments[pandora.user.level] || pandora.hasCapability('canEditDocuments')
|| options.editable, || options.editable,
labelWidth = 80, labelWidth = 80,
width = ui.documentSize - 16 - Ox.UI.SCROLLBAR_SIZE; width = ui.documentSize - 16 - Ox.UI.SCROLLBAR_SIZE;

View file

@ -413,7 +413,7 @@ pandora.ui.editPanel = function(isEmbed) {
var $content = Ox.Element() var $content = Ox.Element()
.css({padding: '16px'}) .css({padding: '16px'})
.appendTo(that), .appendTo(that),
isEditable = pandora.site.capabilities.canEditSitePages[pandora.user.level]; isEditable = pandora.hasCapability('canEditSitePages');
Ox.EditableContent({ Ox.EditableContent({
editable: false, editable: false,
value: Ox._('{0} Edits', [pandora.site.site.name]), value: Ox._('{0} Edits', [pandora.site.site.name]),

View file

@ -20,9 +20,9 @@ pandora.ui.editor = function(data) {
clickLink: pandora.clickLink, clickLink: pandora.clickLink,
cuts: data.cuts || [], cuts: data.cuts || [],
duration: data.duration, duration: data.duration,
enableDownload: pandora.site.capabilities.canDownloadVideo[pandora.user.level] >= data.rightslevel || data.editable, enableDownload: pandora.hasCapability('canDownloadVideo') >= data.rightslevel || data.editable,
enableExport: pandora.site.capabilities.canExportAnnotations[pandora.user.level] || data.editable, enableExport: pandora.hasCapability('canExportAnnotations') || data.editable,
enableImport: pandora.site.capabilities.canImportAnnotations[pandora.user.level] || data.editable, enableImport: pandora.hasCapability('canImportAnnotations') || data.editable,
enableSetPosterFrame: !pandora.site.media.importFrames && data.editable, enableSetPosterFrame: !pandora.site.media.importFrames && data.editable,
enableSubtitles: ui.videoSubtitles, enableSubtitles: ui.videoSubtitles,
find: ui.itemFind, find: ui.itemFind,

View file

@ -190,8 +190,8 @@ Ox.load('UI', {
}); });
function getVideoOptions(data) { function getVideoOptions(data) {
var canPlayClips = data.editable || pandora.site.capabilities.canPlayClips[pandora.user.level] >= data.rightslevel, var canPlayClips = data.editable || pandora.hasCapability('canPlayClips') >= data.rightslevel,
canPlayVideo = data.editable || pandora.site.capabilities.canPlayVideo[pandora.user.level] >= data.rightslevel, canPlayVideo = data.editable || pandora.hasCapability('canPlayVideo') >= data.rightslevel,
options = {}, options = {},
subtitlesLayer = pandora.site.layers.filter(function(layer) { subtitlesLayer = pandora.site.layers.filter(function(layer) {
return layer.isSubtitles; return layer.isSubtitles;
@ -226,7 +226,7 @@ Ox.load('UI', {
annotation.duration = Math.abs(annotation.out - annotation['in']); annotation.duration = Math.abs(annotation.out - annotation['in']);
annotation.editable = annotation.editable annotation.editable = annotation.editable
|| annotation.user == pandora.user.username || annotation.user == pandora.user.username
|| pandora.site.capabilities['canEditAnnotations'][pandora.user.level]; || pandora.hasCapability('canEditAnnotations');
return annotation; return annotation;
}) })
}); });

View file

@ -10,7 +10,7 @@ pandora.ui.entityDialog = function() {
.css({overflowY: 'auto'}), .css({overflowY: 'auto'}),
that = Ox.Dialog({ that = Ox.Dialog({
buttons: (pandora.site.capabilities.canManageEntities[pandora.user.level] ? [ buttons: (pandora.hasCapability('canManageEntities') ? [
Ox.Button({ Ox.Button({
id: 'edit', id: 'edit',
title: Ox._('Edit Entity...') title: Ox._('Edit Entity...')

View file

@ -38,7 +38,7 @@ pandora.ui.errorDialog = function(data) {
setTimeout(function() { setTimeout(function() {
if ($('.OxErrorDialog').length == 0 && !pandora.isUnloading) { if ($('.OxErrorDialog').length == 0 && !pandora.isUnloading) {
showLogsButton = error == 'error' showLogsButton = error == 'error'
&& pandora.site.capabilities.canSeeDebugMenu[pandora.user.level] && pandora.hasCapability('canSeeDebugMenu')
that = pandora.ui.iconDialog({ that = pandora.ui.iconDialog({
buttons: (showLogsButton ? [ buttons: (showLogsButton ? [
Ox.Button({ Ox.Button({

View file

@ -35,7 +35,7 @@ pandora.ui.findElement = function() {
items: [].concat( items: [].concat(
pandora.site.findKeys.filter(function(key, i) { pandora.site.findKeys.filter(function(key, i) {
return (!key.capability return (!key.capability
|| pandora.site.capabilities[key.capability][pandora.user.level]) || pandora.hasCapability(key.capability))
&& !key.advanced; && !key.advanced;
}).map(function(key) { }).map(function(key) {
return { return {

View file

@ -7,7 +7,7 @@ pandora.ui.folderList = function(id, section) {
i = Ox.getIndexById(pandora.site.sectionFolders[section], id), i = Ox.getIndexById(pandora.site.sectionFolders[section], id),
folderItems = pandora.getFolderItems(section), folderItems = pandora.getFolderItems(section),
folderItem = folderItems.slice(0, -1), folderItem = folderItems.slice(0, -1),
canEditFeatured = pandora.site.capabilities['canEditFeatured' + folderItems][pandora.user.level], canEditFeatured = pandora.hasCapability('canEditFeatured' + folderItems),
$placeholder, $placeholder,
that; that;
var columns, items; var columns, items;

View file

@ -18,7 +18,7 @@ pandora.ui.folders = function(section) {
}[section]] || '').split(':')[0] == pandora.user.username, }[section]] || '').split(':')[0] == pandora.user.username,
folderItems = pandora.getFolderItems(section), folderItems = pandora.getFolderItems(section),
folderItem = folderItems.slice(0, -1), folderItem = folderItems.slice(0, -1),
canEditFeatured = pandora.site.capabilities['canEditFeatured' + folderItems][pandora.user.level], canEditFeatured = pandora.hasCapability('canEditFeatured' + folderItems),
initCounter = 0, initCounter = 0,
loadCounter = 0; loadCounter = 0;
pandora.$ui.allItems = pandora.ui.allItems(section).appendTo(that); pandora.$ui.allItems = pandora.ui.allItems(section).appendTo(that);

View file

@ -21,7 +21,7 @@ pandora.ui.groupsDialog = function(options) {
width: 584 + Ox.UI.SCROLLBAR_SIZE width: 584 + Ox.UI.SCROLLBAR_SIZE
}), }),
canManageGroups = pandora.site.capabilities.canManageUsers[pandora.user.level], canManageGroups = pandora.hasCapability('canManageUsers'),
isItem = options.type == 'item', isItem = options.type == 'item',
$content, $content,

View file

@ -215,7 +215,7 @@ pandora.ui.listInfo = function() {
: pandora.user.ui.section == 'documents' : pandora.user.ui.section == 'documents'
? pandora.user.ui._collection ? pandora.user.ui._collection
: ui[folderItem.toLowerCase()], : ui[folderItem.toLowerCase()],
canEditFeaturedLists = pandora.site.capabilities['canEditFeatured' + folderItems][pandora.user.level], canEditFeaturedLists = pandora.hasCapability('canEditFeatured' + folderItems),
that = Ox.Element().css({padding: '16px', textAlign: 'center'}), that = Ox.Element().css({padding: '16px', textAlign: 'center'}),
$icon = Ox.Element('<img>') $icon = Ox.Element('<img>')
.attr({ .attr({

View file

@ -6,8 +6,8 @@ pandora.ui.infoView = function(data) {
// when collapsing the movies browser, the info view should become a split panel // when collapsing the movies browser, the info view should become a split panel
var ui = pandora.user.ui, var ui = pandora.user.ui,
canEdit = pandora.site.capabilities.canEditMetadata[pandora.user.level], canEdit = pandora.hasCapability('canEditMetadata'),
canRemove = pandora.site.capabilities.canRemoveItems[pandora.user.level], canRemove = pandora.hasCapability('canRemoveItems'),
canSeeAllMetadata = pandora.user.level != 'guest', canSeeAllMetadata = pandora.user.level != 'guest',
css = { css = {
marginTop: '4px', marginTop: '4px',
@ -859,7 +859,7 @@ pandora.ui.infoView = function(data) {
.appendTo($line); .appendTo($line);
} }
capabilities.forEach(function(capability) { capabilities.forEach(function(capability) {
var hasCapability = pandora.site.capabilities[capability.name][userLevel] >= rightsLevel, var hasCapability = pandora.hasCapability(capability.name, userLevel) >= rightsLevel,
$element = Ox.Theme.formatColorLevel(hasCapability, ['', '']); $element = Ox.Theme.formatColorLevel(hasCapability, ['', '']);
Ox.Button({ Ox.Button({
tooltip: (canEdit ? Ox.toTitleCase(userLevel) : 'You') + ' ' tooltip: (canEdit ? Ox.toTitleCase(userLevel) : 'You') + ' '

View file

@ -3,8 +3,8 @@
pandora.ui.infoView = function(data) { pandora.ui.infoView = function(data) {
var ui = pandora.user.ui, var ui = pandora.user.ui,
canEdit = pandora.site.capabilities.canEditMetadata[pandora.user.level], canEdit = pandora.hasCapability('canEditMetadata'),
canRemove = pandora.site.capabilities.canRemoveItems[pandora.user.level], canRemove = pandora.hasCapability('canRemoveItems'),
canSeeAllMetadata = pandora.user.level != 'guest', canSeeAllMetadata = pandora.user.level != 'guest',
css = { css = {
marginTop: '4px', marginTop: '4px',
@ -65,7 +65,7 @@ pandora.ui.infoView = function(data) {
{ {
id: 'upload', id: 'upload',
title: Ox._('Upload Video...'), title: Ox._('Upload Video...'),
disabled: !pandora.site.capabilities.canAddItems[pandora.user.level] disabled: !pandora.hasCapability('canAddItems')
}, },
{}, {},
{ {
@ -904,7 +904,7 @@ pandora.ui.infoView = function(data) {
.appendTo($line); .appendTo($line);
} }
capabilities.forEach(function(capability) { capabilities.forEach(function(capability) {
var hasCapability = pandora.site.capabilities[capability.name][userLevel] >= rightsLevel, var hasCapability = pandora.hasCapability(capability.name, userLevel) >= rightsLevel,
$element = Ox.Theme.formatColorLevel(hasCapability, ['', '']); $element = Ox.Theme.formatColorLevel(hasCapability, ['', '']);
Ox.Button({ Ox.Button({
tooltip: Ox._('{0} ' tooltip: Ox._('{0} '

View file

@ -4,8 +4,8 @@ pandora.ui.infoView = function(data) {
var ui = pandora.user.ui, var ui = pandora.user.ui,
descriptions = [], descriptions = [],
canEdit = pandora.site.capabilities.canEditMetadata[pandora.user.level] || data.editable, canEdit = pandora.hasCapability('canEditMetadata') || data.editable,
canRemove = pandora.site.capabilities.canRemoveItems[pandora.user.level], canRemove = pandora.hasCapability('canRemoveItems'),
css = { css = {
marginTop: '4px', marginTop: '4px',
textAlign: 'justify' textAlign: 'justify'
@ -495,7 +495,7 @@ pandora.ui.infoView = function(data) {
.appendTo($line); .appendTo($line);
} }
capabilities.forEach(function(capability) { capabilities.forEach(function(capability) {
var hasCapability = pandora.site.capabilities[capability.name][userLevel] >= rightsLevel, var hasCapability = pandora.hasCapability(capability.name, userLevel) >= rightsLevel,
$element = Ox.Theme.formatColorLevel(hasCapability, ['', '']); $element = Ox.Theme.formatColorLevel(hasCapability, ['', '']);
Ox.Button({ Ox.Button({
tooltip: (canEdit ? Ox.toTitleCase(userLevel) : 'You') + ' ' tooltip: (canEdit ? Ox.toTitleCase(userLevel) : 'You') + ' '

View file

@ -3,8 +3,8 @@
pandora.ui.infoView = function(data) { pandora.ui.infoView = function(data) {
var ui = pandora.user.ui, var ui = pandora.user.ui,
canEdit = pandora.site.capabilities.canEditMetadata[pandora.user.level] || data.editable, canEdit = pandora.hasCapability('canEditMetadata') || data.editable,
canRemove = pandora.site.capabilities.canRemoveItems[pandora.user.level] || data.editable, canRemove = pandora.hasCapability('canRemoveItems') || data.editable,
css = { css = {
marginTop: '4px', marginTop: '4px',
textAlign: 'justify' textAlign: 'justify'
@ -665,7 +665,7 @@ pandora.ui.infoView = function(data) {
.appendTo($line); .appendTo($line);
} }
capabilities.forEach(function(capability) { capabilities.forEach(function(capability) {
var hasCapability = pandora.site.capabilities[capability.name][userLevel] >= rightsLevel, var hasCapability = pandora.hasCapability(capability.name, userLevel) >= rightsLevel,
$element = Ox.Theme.formatColorLevel(hasCapability, ['', '']); $element = Ox.Theme.formatColorLevel(hasCapability, ['', '']);
Ox.Button({ Ox.Button({
tooltip: Ox._('{0} ' tooltip: Ox._('{0} '

View file

@ -13,7 +13,7 @@ pandora.ui.item = function() {
pandora.api.get({ pandora.api.get({
id: pandora.user.ui.item, id: pandora.user.ui.item,
keys: isVideoView ? Ox.unique(pandora.VIDEO_OPTIONS_KEYS.concat(pandora.site.itemTitleKeys)) : [] keys: isVideoView ? Ox.unique(pandora.VIDEO_OPTIONS_KEYS.concat(pandora.site.itemTitleKeys)) : []
}, pandora.user.ui.itemView == 'info' && pandora.site.capabilities.canEditMetadata[pandora.user.level] ? 0 : -1, function(result) { }, pandora.user.ui.itemView == 'info' && pandora.hasCapability('canEditMetadata') ? 0 : -1, function(result) {
if (pandora.user.ui.item != item) { if (pandora.user.ui.item != item) {
return; return;

View file

@ -100,7 +100,7 @@ pandora.ui.itemClips = function(options) {
result.data.durations, points result.data.durations, points
), ),
$player = Ox.VideoPlayer({ $player = Ox.VideoPlayer({
censored: pandora.site.capabilities.canPlayClips[pandora.user.level] < result.data.rightslevel censored: pandora.hasCapability('canPlayClips') < result.data.rightslevel
? [{'in': partsAndPoints.points[0], out: partsAndPoints.points[1]}] ? [{'in': partsAndPoints.points[0], out: partsAndPoints.points[1]}]
: [], : [],
enableMouse: true, enableMouse: true,

View file

@ -55,7 +55,7 @@ pandora.ui.list = function() {
width: 16 width: 16
}], pandora.site.sortKeys.filter(function(key) { }], pandora.site.sortKeys.filter(function(key) {
return !key.capability return !key.capability
|| pandora.site.capabilities[key.capability][pandora.user.level]; || pandora.hasCapability(key.capability);
}).map(function(key) { }).map(function(key) {
var position = ui.listColumns.indexOf(key.id); var position = ui.listColumns.indexOf(key.id);
return { return {

View file

@ -4,7 +4,7 @@
pandora.ui.mediaView = function(options) { pandora.ui.mediaView = function(options) {
var canRemove = pandora.site.capabilities.canRemoveItems[pandora.user.level] || options.editable, var canRemove = pandora.hasCapability('canRemoveItems') || options.editable,
self = {}, self = {},
keys = ['title', 'director', 'year', 'id'], keys = ['title', 'director', 'year', 'id'],
listKeys = keys.filter(function(key) { listKeys = keys.filter(function(key) {

View file

@ -122,7 +122,7 @@ pandora.ui.navigationView = function(type, videoRatio) {
that.replaceElement(0, that.replaceElement(0,
$element = Ox.Map({ $element = Ox.Map({
// clickable: pandora.site.capabilities.canClickMap[pandora.user.level], // clickable: pandora.hasCapability('canClickMap'),
find: ui.mapFind, find: ui.mapFind,
// 20 px menu + 24 px toolbar + 1px resizbar + 16px statusbar (if !item) // 20 px menu + 24 px toolbar + 1px resizbar + 16px statusbar (if !item)
height: isEmbed ? window.innerHeight - 40 height: isEmbed ? window.innerHeight - 40

View file

@ -12,7 +12,7 @@ pandora.ui.news = function(width, height) {
backgroundColor = Ox.Theme() == 'oxlight' ? 'rgb(224, 224, 224)' backgroundColor = Ox.Theme() == 'oxlight' ? 'rgb(224, 224, 224)'
: Ox.Theme() == 'oxmedium' ? 'rgb(128, 128, 128)' : Ox.Theme() == 'oxmedium' ? 'rgb(128, 128, 128)'
: 'rgb(32, 32, 32)', : 'rgb(32, 32, 32)',
isEditable = pandora.site.capabilities.canEditSitePages[pandora.user.level], isEditable = pandora.hasCapability('canEditSitePages'),
items = [], items = [],
$text; $text;

View file

@ -21,7 +21,7 @@ pandora.ui.player = function(data) {
clickLink: pandora.clickLink, clickLink: pandora.clickLink,
cuts: data.cuts || [], cuts: data.cuts || [],
duration: data.duration, duration: data.duration,
enableDownload: pandora.site.capabilities.canDownloadVideo[pandora.user.level] >= data.rightslevel, enableDownload: pandora.hasCapability('canDownloadVideo') >= data.rightslevel,
enableSubtitles: ui.videoSubtitles, enableSubtitles: ui.videoSubtitles,
find: ui.itemFind, find: ui.itemFind,
getLargeTimelineURL: function(type, i) { getLargeTimelineURL: function(type, i) {

View file

@ -4,10 +4,10 @@
pandora.ui.siteDialog = function(section) { pandora.ui.siteDialog = function(section) {
var canSeeVersion = pandora.site.capabilities.canSeeSoftwareVersion[pandora.user.level], var canSeeVersion = pandora.hasCapability('canSeeSoftwareVersion'),
dialogHeight = Math.round((window.innerHeight - 48) * 0.75), dialogHeight = Math.round((window.innerHeight - 48) * 0.75),
dialogWidth = Math.round(window.innerWidth * 0.75), dialogWidth = Math.round(window.innerWidth * 0.75),
isEditable = pandora.site.capabilities.canEditSitePages[pandora.user.level], isEditable = pandora.hasCapability('canEditSitePages'),
tabs = Ox.clone(pandora.site.sitePages, true).map(function(page) { tabs = Ox.clone(pandora.site.sitePages, true).map(function(page) {
page.title = Ox._(page.title); page.title = Ox._(page.title);
return page; return page;

View file

@ -4,10 +4,10 @@
pandora.ui.siteDialog = function(section) { pandora.ui.siteDialog = function(section) {
var canSeeVersion = pandora.site.capabilities.canSeeSoftwareVersion[pandora.user.level], var canSeeVersion = pandora.hasCapability('canSeeSoftwareVersion'),
dialogHeight = Math.round((window.innerHeight - 48) * 0.75), dialogHeight = Math.round((window.innerHeight - 48) * 0.75),
dialogWidth = Math.round(window.innerWidth * 0.75), dialogWidth = Math.round(window.innerWidth * 0.75),
isEditable = pandora.site.capabilities.canEditSitePages[pandora.user.level], isEditable = pandora.hasCapability('canEditSitePages'),
tabs = Ox.clone(pandora.site.sitePages, true).map(function(page) { tabs = Ox.clone(pandora.site.sitePages, true).map(function(page) {
page.title = Ox._(page.title); page.title = Ox._(page.title);
return page; return page;

View file

@ -149,9 +149,7 @@ pandora.ui.tasksDialog = function(options) {
], ],
width: 128 width: 128
}).css({ }).css({
display: pandora.site.capabilities.canSeeAllTasks[ display: pandora.hasCapability('canSeeAllTasks') ? 'block' : 'none',
pandora.user.level
] ? 'block' : 'none',
margin: '8px 4px 4px 4px' margin: '8px 4px 4px 4px'
}).bindEvent({ }).bindEvent({
change: function(data) { change: function(data) {

View file

@ -9,9 +9,7 @@ pandora.ui.uploadVideoDialog = function(data) {
$.browser.version < '35' || Firefogg().version >= 334 $.browser.version < '35' || Firefogg().version >= 334
), ),
infoContent = Ox._('Please select the video file that you want to upload.'), infoContent = Ox._('Please select the video file that you want to upload.'),
itemView = pandora.site.capabilities.canSeeExtraItemViews[ itemView = pandora.hasCapability('canSeeExtraItemViews') ? 'media' : 'info',
pandora.user.level
] ? 'media' : 'info',
selectFile, selectFile,
$actionButton, $actionButton,
$closeButton, $closeButton,

View file

@ -14,7 +14,7 @@ pandora.ui.viewSelect = function() {
that; that;
if ( if (
viewKey == 'itemView' viewKey == 'itemView'
&& pandora.site.capabilities.canSeeExtraItemViews[pandora.user.level] && pandora.hasCapability('canSeeExtraItemViews')
) { ) {
items = items.concat([ items = items.concat([
{}, {},