projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d5f27d8
)
Roo/bootstrap/CardUploader.js
author
Alan Knowles
<alan@roojs.com>
Mon, 23 Nov 2020 07:33:18 +0000
(15:33 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 23 Nov 2020 07:33:18 +0000
(15:33 +0800)
Roo/bootstrap/CardUploader.js
patch
|
blob
|
history
diff --git
a/Roo/bootstrap/CardUploader.js
b/Roo/bootstrap/CardUploader.js
index
a16a062
..
d847473
100644
(file)
--- a/
Roo/bootstrap/CardUploader.js
+++ b/
Roo/bootstrap/CardUploader.js
@@
-63,7
+63,7
@@
Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Input, {
cls : 'd-none'
},
{
cls : 'd-none'
},
{
- cls : 'roo-card-uploader-button-container'
+ cls : 'roo-card-uploader-button-container
w-100 mb-2
'
},
{
cls : 'card-columns roo-card-uploader-container'
},
{
cls : 'card-columns roo-card-uploader-container'
@@
-73,35
+73,21
@@
Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Input, {
};
};
- var input = Roo.bootstrap.Input.prototype.getAutoCreate.call(this);
-
-
- btn.cls += ' w-100 mb-2';
- var cfg = {
- cls : 'roo-card-uploader-wrap',
- cn : [
- btn,
- {
- tag : 'input',
- cls : 'd-none roo-card-upload-selector',
- type : 'file',
- multiple : 'multiple'
- },
-
- ]
-
- }
-
+
return cfg;
},
getChildContainer : function() /// what children are added to.
return cfg;
},
getChildContainer : function() /// what children are added to.
+ {
+ return this.containerEl;
+ },
+
+ getButtonContainer : function() /// what children are added to.
{
return this.el;
},
{
return this.el;
},
-
initEvents : function()
{
initEvents : function()
{
@@
-109,9
+95,16
@@
Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Input, {
this.addxtype({
xns: Roo.bootstrap,
this.addxtype({
xns: Roo.bootstrap,
+
xtype : 'Button',
xtype : 'Button',
-
-
+ container_method : 'getButtonContainer' ,
+ title : 'Upload File / Images', // fix changable?
+ cls : 'w-100',
+ listeners : {
+ 'click' : function(e) {
+ this.onClick(e);
+ }
+ }
})
})
@@
-126,7
+119,7
@@
Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Input, {
this.selectorEl = this.el.select('.roo-card-upload-selector', true).first();
this.selectorEl = this.el.select('.roo-card-upload-selector', true).first();
-
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) {