diff --git a/static/js/pandora/ui/eventsDialog.js b/static/js/pandora/ui/eventsDialog.js index a32be08fd..a68671ff9 100644 --- a/static/js/pandora/ui/eventsDialog.js +++ b/static/js/pandora/ui/eventsDialog.js @@ -1,4 +1,5 @@ // vim: et:ts=4:sw=4:sts=4:ft=javascript + pandora.ui.eventsDialog = function() { var height = Math.round((window.innerHeight - 48) * 0.9), width = Math.round(window.innerWidth * 0.9), @@ -14,44 +15,7 @@ pandora.ui.eventsDialog = function() { }) ], closeButton: true, - content: pandora.$ui.eventsElement = Ox.TextList({ - columns: [ - { - id: 'id', - title: 'ID', - operator: '+', - unique: true, - visible: false, - width: 16 - }, - { - id: 'name', - title: 'Name', - operator: '+', - visible: true, - width: 256 - }, - { - id: 'start', - operator: '+', - visible: true, - width: 256 - }, - { - id: 'end', - operator: '+', - visible: true, - width: 256 - } - ], - items: function(data, callback) { - pandora.api.findEvents(data, callback); - }, - keys: ['name', 'start', 'end'], - sort: [ - {key: 'name', operator: '+'} - ] - }), + content: Ox.Element(), height: height, maximizeButton: true, minHeight: 256, @@ -60,6 +24,26 @@ pandora.ui.eventsDialog = function() { title: 'Manage Events', width: width }); + + pandora.api.findEvents({ + query: {conditions: [], operator: '&'} + }, function(result) { + pandora.api.findEvents({ + query: {conditions: [], operator: '&'}, + keys: [], + range: [0, result.data.items], + sort: [{key: 'name', operator: '+'}] + }, function(result) { + that.options({ + content: Ox.ListCalendar({ + height: height - 48, + events: result.data.items, + width: width + }) + }); + }) + }) + return that; }; diff --git a/static/js/pandora/ui/placesDialog.js b/static/js/pandora/ui/placesDialog.js index 2743437bf..a9e7668f1 100644 --- a/static/js/pandora/ui/placesDialog.js +++ b/static/js/pandora/ui/placesDialog.js @@ -1,4 +1,5 @@ // vim: et:ts=4:sw=4:sts=4:ft=javascript + pandora.ui.placesDialog = function() { var height = Math.round((window.innerHeight - 48) * 0.9), width = Math.round(window.innerWidth * 0.9), @@ -14,7 +15,7 @@ pandora.ui.placesDialog = function() { }) ], closeButton: true, - content: pandora.$ui.placesElement = Ox.ListMap({ + content: Ox.ListMap({ height: height - 48, places: function(data, callback) { return pandora.api.findPlaces(Ox.extend({ diff --git a/static/js/pandora/ui/usersDialog.js b/static/js/pandora/ui/usersDialog.js index fc1a91f5d..3074c8798 100644 --- a/static/js/pandora/ui/usersDialog.js +++ b/static/js/pandora/ui/usersDialog.js @@ -4,10 +4,11 @@ pandora.ui.usersDialog = function() { var height = Math.round((window.innerHeight - 48) * 0.9), width = Math.round(window.innerWidth * 0.9), levelColors = { - 'member': [128, 128, 0], - 'friend': [0, 128, 0], - 'staff': [0, 128, 128], - 'admin': [0, 0, 128] + 'guest': [64, 0, 0], + 'member': [64, 64, 0], + 'friend': [0, 64, 0], + 'staff': [0, 64, 64], + 'admin': [0, 0, 64] }, numberOfUsers = 0, userLevels = ['member', 'friend', 'staff', 'admin'], @@ -100,8 +101,8 @@ pandora.ui.usersDialog = function() { $list = Ox.TextList({ columns: [ { - clickable: true, format: function(value) { + Ox.print('&&', value) return $('') .attr({ src: Ox.UI.getImageURL('symbolCheck') @@ -153,22 +154,24 @@ pandora.ui.usersDialog = function() { { align: 'center', format: function(value) { + var dark = 'rgb(' + levelColors[value].map(function(color) { + return color.toString() + }).join(', ') + ')', + light = 'rgb(' + levelColors[value].map(function(color) { + return (color + 128).toString() + }).join(', ') + ')'; return $('