Commit cf07582b authored by jgould's avatar jgould

reset file picker

parent 46a0632c
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -625,9 +625,11 @@ morpheus.FormBuilder.prototype = { ...@@ -625,9 +625,11 @@ morpheus.FormBuilder.prototype = {
multiselect: isMultiple multiselect: isMultiple
}; };
Dropbox.choose(options); Dropbox.choose(options);
that.$form.find('[name=' + name + '_picker]').selectpicker('val', '');
} else if ('My Computer' === val) { } else if ('My Computer' === val) {
that.$form.find('[name=' + name + '_file]') that.$form.find('[name=' + name + '_file]')
.click(); .click();
that.$form.find('[name=' + name + '_picker]').selectpicker('val', '');
} }
that.$form.find('[name=' + name + '_text]') that.$form.find('[name=' + name + '_text]')
.css('display', .css('display',
...@@ -652,6 +654,7 @@ morpheus.FormBuilder.prototype = { ...@@ -652,6 +654,7 @@ morpheus.FormBuilder.prototype = {
}); });
// browse file selected // browse file selected
that.$form.on('change', '[name=' + name + '_file]', function (evt) { that.$form.on('change', '[name=' + name + '_file]', function (evt) {
var files = evt.target.files; // FileList object var files = evt.target.files; // FileList object
that.setValue(name, isMultiple ? files : files[0]); that.setValue(name, isMultiple ? files : files[0]);
that.trigger('change', { that.trigger('change', {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment