fix a bug in Ox.FileButton

This commit is contained in:
rlx 2012-03-24 11:12:24 +00:00
parent 826eb5548d
commit 8c67bf9462
2 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,6 @@
Ox.load('UI', function() { Ox.load('UI', function() {
var files = [], var files,
$menu = Ox.MainMenu({ $menu = Ox.MainMenu({
menus: [ menus: [
@ -140,6 +140,7 @@ Ox.load('UI', function() {
} }
}) })
), ),
keys: {enter: 'upload', escape: 'cancel'},
title: 'Files', title: 'Files',
width: 288 + Ox.UI.SCROLLBAR_SIZE, width: 288 + Ox.UI.SCROLLBAR_SIZE,
height: 129 height: 129

View file

@ -38,6 +38,7 @@ Ox.FileButton = function(options, self) {
function selectFiles(e) { function selectFiles(e) {
var filelist = e.target.files, var filelist = e.target.files,
files = []; files = [];
self.files = [];
Ox.loop(filelist.length, function(i) { Ox.loop(filelist.length, function(i) {
files.push(filelist.item(i)); files.push(filelist.item(i));
}); });