Roo.bootstrap.CardUploader = function(config){
- if (test) {
- //code
- }
+
Roo.bootstrap.CardUploader.superclass.constructor.call(this, config);
getAutoCreate : function()
{
- var btn = Roo.bootstrap.Button.getAutoCreate.prototype.call(this);
+ var btn = Roo.bootstrap.Button.prototype.getAutoCreate.call(this);
var cfg = {
cls : 'roo-card-uploader-wrap',
btn,
{
tag : 'input',
- cls : 'd=none roo-card-upload-selector',
+ cls : 'd-none roo-card-upload-selector',
type : 'file',
multiple : 'multiple'
},
initEvents : function()
{
+ Roo.bootstrap.Button.prototype.initEvents.call(this);
this.urlAPI = (window.createObjectURL && window) ||
(window.URL && URL.revokeObjectURL && URL) ||
(window.webkitURL && webkitURL);
this.selectorEl = this.el.select('.roo-card-upload-selector', true).first();
- this.bodyEl.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) {
},
- beforeSelectFile : function(e)
+ onClick : function(e)
{
e.preventDefault();
// view..
}
},
- cn : [
+ items : [
{
xns : Roo.bootstrap,
xtype : 'CardFooter',
- cn: [
+ items: [
{
xns : Roo.bootstrap,
xtype : 'Element',
- html : data.title
- },
- {
- xns : Roo.bootstrap,
- xtype : 'Button',
- html : 'Delete',
- fa : 'cross'
+ cls : 'd-flex',
+ items : [
+
+ {
+ xns : Roo.bootstrap,
+ xtype : 'Link',
+ html : String.format("<small>{0}</small>", data.title),
+ cls : 'p-9'
+ },
+ {
+ xns : Roo.bootstrap,
+ xtype : 'Button',
+ html : 'Delete',
+ size : 'sm',
+ cls : 'ml-auto p-3',
+ fa : 'times'
+ }
+ ]
}
],