use new form element syntax

This commit is contained in:
rolux 2011-12-22 07:27:48 +00:00
parent e86d25fd55
commit f945b91907
6 changed files with 19 additions and 17 deletions

View file

@ -31,7 +31,6 @@ pandora.ui.findElement = function() {
? {
id: key.id,
title: 'Find: ' + key.title,
checked: findKey == key.id
} : null;
}),
[{}, {
@ -41,6 +40,7 @@ pandora.ui.findElement = function() {
}]
),
overlap: 'right',
value: findKey,
width: 112
})
.bindEvent({

View file

@ -39,7 +39,7 @@ pandora.ui.folders = function() {
{ id: 'editlist', title: 'Edit Selected List...', disabled: !pandora.user.ui._list },
{ id: 'deletelist', title: 'Delete Selected List...', disabled: !pandora.user.ui._list }
],
title: 'set',
title: 'edit',
tooltip: 'Manage Personal Lists',
type: 'image'
})
@ -190,7 +190,7 @@ pandora.ui.folders = function() {
{},
{ id: 'import', title: 'Import Movies...', disabled: true }
],
title: 'set',
title: 'edit',
tooltip: 'Manage Volumes',
type: 'image'
})

View file

@ -3,12 +3,13 @@
pandora.ui.sectionButtons = function() {
var that = Ox.ButtonGroup({
buttons: [
{id: 'items', selected: pandora.user.ui.section == 'items', title: pandora.site.itemName.plural},
{id: 'edits', selected: pandora.user.ui.section == 'edits', title: 'Edits', disabled: true},
{id: 'texts', selected: pandora.user.ui.section == 'texts', title: 'Texts', disabled: true}
{id: 'items', title: pandora.site.itemName.plural},
{id: 'edits', title: 'Edits', disabled: true},
{id: 'texts', title: 'Texts', disabled: true}
],
id: 'sectionButtons',
selectable: true
selectable: true,
value: pandora.user.ui.section
}).css({
float: 'left',
margin: '4px'

View file

@ -5,10 +5,11 @@ pandora.ui.sectionSelect = function() {
var that = Ox.Select({
id: 'sectionSelect',
items: [
{checked: pandora.user.ui.section == 'items', id: 'items', title: pandora.site.itemName.plural},
{checked: pandora.user.ui.section == 'edits', id: 'edits', title: 'Edits', disabled: true},
{checked: pandora.user.ui.section == 'texts', id: 'texts', title: 'Texts', disabled: true}
]
{id: 'items', title: pandora.site.itemName.plural},
{id: 'edits', title: 'Edits', disabled: true},
{id: 'texts', title: 'Texts', disabled: true}
],
value: pandora.user.ui.section
}).css({
float: 'left',
margin: '4px'

View file

@ -21,7 +21,6 @@ pandora.ui.sortSelect = function(isNavigationView) {
items = Ox.merge(items, Ox.map(pandora.site.sortKeys, function(key) {
return Ox.getPositionById(items, key.id) == -1
? Ox.extend(Ox.clone(key), {
checked: key.id == pandora.user.ui[sortKey][0].key,
title: 'Sort by ' + key.title
})
: null;
@ -30,6 +29,7 @@ pandora.ui.sortSelect = function(isNavigationView) {
that = Ox.Select({
id: 'sortSelect',
items: items,
value: pandora.user.ui[sortKey][0].key,
width: isNavigationView ? 128 : 144
})
.css({
@ -45,10 +45,10 @@ pandora.ui.sortSelect = function(isNavigationView) {
}]);
},
pandora_listsort: function(data) {
that.selectItem(data.value[0].key);
that.value(data.value[0].key);
},
pandora_itemsort: function(data) {
that.selectItem(data.value[0].key);
that.value(data.value[0].key);
}
});
return that;

View file

@ -13,11 +13,11 @@ pandora.ui.viewSelect = function() {
|| ['data', 'files'].indexOf(view.id) == -1
|| pandora.site.capabilities.canSeeExtraItemViews[pandora.user.level]
? Ox.extend(Ox.clone(view), {
checked: view.id == ui[viewKey],
title: 'View ' + view.title
})
: null;
}),
value: ui[viewKey],
width: !ui.item ? 144 : 128
})
.css({
@ -29,10 +29,10 @@ pandora.ui.viewSelect = function() {
pandora.UI.set(viewKey, data.value);
},
pandora_listview: function(data) {
that.selectItem(data.value);
that.value(data.value);
},
pandora_itemview: function(data) {
that.selectItem(data.value);
that.value(data.value);
}
});
return that;