rename a variable in files view

This commit is contained in:
rolux 2012-09-15 10:14:17 +00:00
parent 38e75d90eb
commit 18f8b1a1f4

View file

@ -341,7 +341,7 @@ pandora.ui.filesView = function(options, self) {
}); });
}); });
self.$checkbox = Ox.Checkbox({ self.$switch = Ox.Checkbox({
id: 'go', id: 'go',
title: 'Switch to this ' title: 'Switch to this '
+ pandora.site.itemName.singular.toLowerCase() + pandora.site.itemName.singular.toLowerCase()
@ -356,7 +356,7 @@ pandora.ui.filesView = function(options, self) {
self.$directorInput, self.$directorInput,
self.$yearInput, self.$yearInput,
self.$idInput, self.$idInput,
self.$checkbox self.$switch
], ],
width: 240 width: 240
}) })
@ -445,7 +445,7 @@ pandora.ui.filesView = function(options, self) {
&& pandora.user.ui.itemView == 'files' && pandora.user.ui.itemView == 'files'
) { ) {
Ox.Request.clearCache(); // fixme: remove Ox.Request.clearCache(); // fixme: remove
if (self.$checkbox.value()) { if (self.$switch.value()) {
pandora.UI.set({item: result.data.itemId}); pandora.UI.set({item: result.data.itemId});
} else { } else {
Ox.Log('', 'moved', self.selected, result.data.itemId); Ox.Log('', 'moved', self.selected, result.data.itemId);
@ -485,13 +485,13 @@ 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.value(); self.wasChecked = self.$switch.value();
self.$checkbox.options({ self.$switch.options({
disabled: true, disabled: true,
value: true value: true
}); });
} else { } else {
self.$checkbox.options({ self.$switch.options({
disabled: false, disabled: false,
value: self.wasChecked value: self.wasChecked
}); });