From cd610436dbaa0a51da92b47f69456fef715a91aa Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 23 Dec 2011 00:00:03 +0530 Subject: [PATCH] use 'value', not 'checked' --- static/js/pandora/contactForm.js | 2 +- static/js/pandora/filesView.js | 12 ++++++------ static/js/pandora/filter.js | 4 ++-- static/js/pandora/findElement.js | 6 +++--- static/js/pandora/listDialog.js | 5 +++-- static/js/pandora/logsDialog.js | 5 +++-- static/js/pandora/sortSelect.js | 1 - 7 files changed, 18 insertions(+), 17 deletions(-) diff --git a/static/js/pandora/contactForm.js b/static/js/pandora/contactForm.js index ce7c0c6a..f304f42d 100644 --- a/static/js/pandora/contactForm.js +++ b/static/js/pandora/contactForm.js @@ -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'}) diff --git a/static/js/pandora/filesView.js b/static/js/pandora/filesView.js index 5bfa7cad..16406c20 100644 --- a/static/js/pandora/filesView.js +++ b/static/js/pandora/filesView.js @@ -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({ diff --git a/static/js/pandora/filter.js b/static/js/pandora/filter.js index ec93abd7..2257c1ef 100644 --- a/static/js/pandora/filter.js +++ b/static/js/pandora/filter.js @@ -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), diff --git a/static/js/pandora/findElement.js b/static/js/pandora/findElement.js index 6e1550b8..aaa69de2 100644 --- a/static/js/pandora/findElement.js +++ b/static/js/pandora/findElement.js @@ -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', diff --git a/static/js/pandora/listDialog.js b/static/js/pandora/listDialog.js index fc89f2e6..36bd463c 100644 --- a/static/js/pandora/listDialog.js +++ b/static/js/pandora/listDialog.js @@ -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'}) diff --git a/static/js/pandora/logsDialog.js b/static/js/pandora/logsDialog.js index 9fd25f61..4e46c156 100644 --- a/static/js/pandora/logsDialog.js +++ b/static/js/pandora/logsDialog.js @@ -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) { diff --git a/static/js/pandora/sortSelect.js b/static/js/pandora/sortSelect.js index 9457a140..c7a8d889 100644 --- a/static/js/pandora/sortSelect.js +++ b/static/js/pandora/sortSelect.js @@ -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 }); });