').css({
+ background: 'rgb(0, 0, 0)', // FIXME: make themes
+ borderRadius: '32px',
+ height: '128px',
+ width: '128px'
+ }).appendTo($preview);
+ if (data.image) {
+ $image = $('
').attr({
+ src: data.image
+ }).css({
+ borderRadius: '32px',
+ height: '128px',
+ width: '128px'
+ }).appendTo($imageContainer)
+ }
+ Ox.EditableContent({
+ placeholder: '
' + Ox._('Title') + '',
+ value: data.title
+ })
+ .bindEvent({
+ submit: function(data) {
+ editItem('title', data.value);
+ }
+ }).appendTo($preview);
+ Ox.EditableContent({
+ placeholder: '
' + Ox._('Text') + '',
+ value: data.text
+ })
+ .bindEvent({
+ submit: function(data) {
+ editItem('text', data.value);
+ }
+ }).appendTo($preview);
+ return $item;
+ }
+
+ function renderList(items) {
+ console.log('LIST', items)
+ var $list = Ox.TableList({
+ columns: [
+ {
+ id: 'image',
+ format: function(value) {
+ return $('
').attr({
+ src: value
+ }).css({
+ borderRadius: '4px',
+ height: '14px',
+ margin: '0 0 0 -2px',
+ width: '14px',
+ })
+ },
+ visible: true,
+ width: 16,
+ },
+ {
+ id: 'title',
+ visible: true,
+ width: 224
+ },
+ {
+ id: 'active',
+ format: function(value) {
+ return value ? $('
').attr({
+ src: Ox.UI.getImageURL('symbolCheck')
+ }).css({
+ width: '10px',
+ height: '10px',
+ padding: '3px'
+ }) : ''
+ },
+ visible: true,
+ width: 16
+ }
+ ],
+ items: items,
+ max: 1,
+ sort: [{key: 'index', operator: '+'}],
+ sortable: true,
+ unique: 'id'
+ })
+ .bindEvent({
+ select: function() {
+
+ }
+ })
+ .css({
+ width: '256px'
+ });
+ return $list;
+ }
+
+ return that;
+
+};
\ No newline at end of file
diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js
index 54c0df3e5..4e19ead8d 100644
--- a/static/js/mainMenu.js
+++ b/static/js/mainMenu.js
@@ -230,6 +230,7 @@ pandora.ui.mainMenu = function() {
{ id: 'places', title: Ox._('Manage Places...'), disabled: !pandora.site.capabilities.canManagePlacesAndEvents[pandora.user.level] },
{ id: 'events', title: Ox._('Manage Events...'), disabled: !pandora.site.capabilities.canManagePlacesAndEvents[pandora.user.level] },
{},
+ { id: 'managehome', title: Ox._('Manage Home...'), disabled: !pandora.site.capabilities.canManageHome[pandora.user.level] },
{ id: 'users', title: Ox._('Manage Users...'), disabled: !pandora.site.capabilities.canManageUsers[pandora.user.level] },
{ id: 'statistics', title: Ox._('Statistics...'), disabled: !pandora.site.capabilities.canManageUsers[pandora.user.level] },
{},
@@ -626,6 +627,8 @@ pandora.ui.mainMenu = function() {
(pandora.$ui.eventsDialog || (
pandora.$ui.eventsDialog = pandora.ui.eventsDialog()
)).open();
+ } else if (data.id == 'managehome') {
+ pandora.$ui.homeDialog = pandora.ui.homeDialog().open();
} else if (data.id == 'users') {
pandora.$ui.usersDialog = pandora.ui.usersDialog().open();
} else if (data.id == 'statistics') {