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.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) {
},
- beforeSelectFile : function(e)
+ onClick : function(e)
{
e.preventDefault();
closeable : true,
header_image : data.src,
data : data,
-
+ html : false,
listeners : {
click : function() {
// 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 : '',
+ items : [
+
+ {
+ xns : Roo.bootstrap,
+ xtype : 'Button',
+ html : String.format("<small>{0}</small>", data.title),
+ cls : 'col-8 text-left',
+ size: 'sm',
+ weight: 'info',
+ fa : 'download',
+ listeners : {
+ click : function() {
+ // download
+ }
+ }
+ },
+ {
+ xns : Roo.bootstrap,
+ xtype : 'Element',
+ cls : 'col-1'
+ },
+ {
+ xns : Roo.bootstrap,
+ xtype : 'Button',
+ html : 'Delete',
+ size : 'sm',
+ weight: 'danger',
+ cls : 'col-3',
+ fa : 'times'
+ }
+ ]
}
],