use 'value', not 'checked'

This commit is contained in:
rolux 2011-12-23 00:00:03 +05:30
parent 416307f4ef
commit cd610436db
7 changed files with 18 additions and 17 deletions

View file

@ -72,9 +72,9 @@ pandora.ui.contactForm = function() {
.appendTo(that),
$receiptCheckbox = Ox.Checkbox({
checked: pandora.user.level != 'guest',
id: 'receipt',
title: 'Send a receipt to ' + pandora.user.email,
value: pandora.user.level != 'guest',
width: width - 136
})
.css({float: 'left', margin: '8px 4px 8px 0'})

View file

@ -315,11 +315,11 @@ pandora.ui.filesView = function(options, self) {
});
self.$checkbox = Ox.Checkbox({
checked: false,
id: 'go',
title: 'Switch to this '
+ pandora.site.itemName.singular.toLowerCase()
+ ' after moving files',
value: false,
width: 240
});
@ -444,15 +444,15 @@ pandora.ui.filesView = function(options, self) {
function updateForm() {
if (self.selected.length == self.numberOfItems) {
self.wasChecked = self.$checkbox.options('checked');
self.wasChecked = self.$checkbox.value();
self.$checkbox.options({
checked: true,
disabled: true
disabled: true,
value: true
});
} else {
self.$checkbox.options({
checked: self.wasChecked,
disabled: false
disabled: false,
value: self.wasChecked
});
}
self.$moveButton.options({

View file

@ -159,14 +159,14 @@ pandora.ui.filter = function(id) {
Ox.Select({
items: pandora.site.filters.map(function(filter) {
return {
checked: filter.id == id,
id: filter.id,
title: filter.title
}
}),
max: 1,
min: 1,
type: 'image'
type: 'image',
value: id,
})
.bindEvent('change', function(data) {
var filters = Ox.clone(pandora.user.ui.filters),

View file

@ -9,10 +9,11 @@ pandora.ui.findElement = function() {
pandora.$ui.findListSelect = Ox.Select({
items: [
{id: 'all', title: 'Find: All ' + pandora.site.itemName.plural},
{id: 'list', title: 'Find: This List', checked: true}
{id: 'list', title: 'Find: This List'}
],
overlap: 'right',
type: 'image'
type: 'image',
value: 'list'
})
.bindEvent({
change: function(data) {
@ -36,7 +37,6 @@ pandora.ui.findElement = function() {
[{}, {
id: 'advanced',
title: 'Find: Advanced',
checked: findKey == 'advanced'
}]
),
overlap: 'right',

View file

@ -183,11 +183,12 @@ pandora.ui.listGeneralPanel = function(listData) {
.appendTo(that)
: Ox.Select({
items: [
{id: 'private', title: 'Private', checked: listData.status == 'private'},
{id: 'public', title: 'Public', checked: listData.status == 'public'}
{id: 'private', title: 'Private'},
{id: 'public', title: 'Public'}
],
label: 'Status',
labelWidth: 80,
value: listData.status,
width: 320
})
.css({position: 'absolute', left: '160px', top: '64px'})

View file

@ -9,13 +9,14 @@ pandora.ui.logsDialog = function() {
$findSelect = Ox.Select({
items: [
{id: 'all', title: 'Find: All', checked: true},
{id: 'all', title: 'Find: All'},
{id: 'user', title: 'Find: User'},
{id: 'url', title: 'Find: URL'},
{id: 'text', title: 'Find: Text'}
],
overlap: 'right',
type: 'image'
type: 'image',
value: 'all'
})
.bindEvent({
change: function(data) {

View file

@ -10,7 +10,6 @@ pandora.ui.sortSelect = function(isNavigationView) {
if (isClipView) {
items = pandora.site.clipKeys.map(function(key) {
return Ox.extend(Ox.clone(key), {
checked: key.id == pandora.user.ui[sortKey][0].key,
title: 'Sort by ' + (!pandora.user.ui.item ? 'Clip ' : '') + key.title
});
});