projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
77306d4
)
Roo/bootstrap/CardUploader.js
author
Alan Knowles
<alan@roojs.com>
Fri, 20 Nov 2020 06:24:42 +0000
(14:24 +0800)
committer
Alan Knowles
<alan@roojs.com>
Fri, 20 Nov 2020 06:24:42 +0000
(14:24 +0800)
Roo/bootstrap/CardUploader.js
patch
|
blob
|
history
diff --git
a/Roo/bootstrap/CardUploader.js
b/Roo/bootstrap/CardUploader.js
index
086bbf4
..
18f7cdc
100644
(file)
--- a/
Roo/bootstrap/CardUploader.js
+++ b/
Roo/bootstrap/CardUploader.js
@@
-70,6
+70,7
@@
Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Button, {
initEvents : function()
{
initEvents : function()
{
+ Roo.bootstrap.Button.prototype.initEvents.call(this);
this.urlAPI = (window.createObjectURL && window) ||
(window.URL && URL.revokeObjectURL && URL) ||
(window.webkitURL && webkitURL);
this.urlAPI = (window.createObjectURL && window) ||
(window.URL && URL.revokeObjectURL && URL) ||
(window.webkitURL && webkitURL);
@@
-79,8
+80,7
@@
Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Button, {
this.selectorEl = this.el.select('.roo-card-upload-selector', true).first();
this.selectorEl = this.el.select('.roo-card-upload-selector', true).first();
- this.el.on('click', this.beforeSelectFile, this);
- this.selectorEl.on('change', this.onFileSelected, this);
+ this.selectorEl.on('change', this.onFileSelected, this);
if (this.images) {
var t = this;
this.images.forEach(function(img) {
if (this.images) {
var t = this;
this.images.forEach(function(img) {
@@
-94,7
+94,7
@@
Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Button, {
},
},
-
beforeSelectFile
: function(e)
+
onClick
: function(e)
{
e.preventDefault();
{
e.preventDefault();