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), .appendTo(that),
$receiptCheckbox = Ox.Checkbox({ $receiptCheckbox = Ox.Checkbox({
checked: pandora.user.level != 'guest',
id: 'receipt', id: 'receipt',
title: 'Send a receipt to ' + pandora.user.email, title: 'Send a receipt to ' + pandora.user.email,
value: pandora.user.level != 'guest',
width: width - 136 width: width - 136
}) })
.css({float: 'left', margin: '8px 4px 8px 0'}) .css({float: 'left', margin: '8px 4px 8px 0'})

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -10,7 +10,6 @@ pandora.ui.sortSelect = function(isNavigationView) {
if (isClipView) { if (isClipView) {
items = pandora.site.clipKeys.map(function(key) { items = pandora.site.clipKeys.map(function(key) {
return Ox.extend(Ox.clone(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 title: 'Sort by ' + (!pandora.user.ui.item ? 'Clip ' : '') + key.title
}); });
}); });