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'
};
- 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 this.containerEl;
+ },
+
+ getButtonContainer : function() /// what children are added to.
{
return this.el;
},
-
initEvents : function()
{
this.addxtype({
xns: Roo.bootstrap,
+
xtype : 'Button',
-
-
+ container_method : 'getButtonContainer' ,
+ title : 'Upload File / Images', // fix changable?
+ cls : 'w-100',
+ listeners : {
+ 'click' : function(e) {
+ this.onClick(e);
+ }
+ }
})
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) {