Smart file component(html5smartfile) not working

I have been working on developing a custom extjs console to enable author drop an asset using html5smartfile component. But somehow, the html5smartfile component is not working the way it should. The Area where an author can drop an asset is not displaying. The same is working fine if I am creating a CQ5 dialog. But in my case where i have created a window it's not working.

I have declared my smartfile component like this:

var assetLinkDropField = {
xtype: 'html5smartfile',
fieldLabel: 'Asset Link',
ddAccept: 'video/.*',
ddGroups: 'media',
fileReferenceParameter: './linkUrl',
name: './linkUrl',
allowUpload: false,
allowFileNameEditing: false,
allowFileReference: true,
transferFileName: false
};

But this is rendering like this:

After a lot of work, I found out that the CQ5 dialog updates the view for the component but in case of my window, I have to update it myself. Thus, with a slight manipulation, i just succeeded in displaying the drag area by tweaking the declaration like this:

var assetLinkDropField = {
xtype: 'html5smartfile',
fieldLabel: 'Asset Link',
ddAccept: 'video/.*',
ddGroups: 'media',
fileReferenceParameter: './linkUrl',
name: './linkUrl',
allowUpload: false,
allowFileNameEditing: false,
allowFileReference: true,
transferFileName: false,
listeners: {
    afterlayout: function () {
        this.updateView();
    }
}
}

So now the panel looks like:

But still the Drag and Drop is not working. My Window declaration is like this:

win = new CQ.Ext.Window({
                height          : 750,
                width           : 700,
                layout          : 'anchor',
                // animateTarget   : btn.el,
                closeAction     : 'close', // Prevent destruction on Close
                id              : 'manageLinkWindow',
                title           : '<b>Multi Link Widget Dialog</b>',
                frame           : true,
                draggable       : false,
                modal           : false, //Mask entire page
                constrain       : true,
                buttonAlign     : 'center',
                items : [assetLinkDropField]
              });
        }

Answers


I think you should not use ddAccept: 'video/.*', This allows only videos from the content finder to be dragged and dropped. It should be "image/".

Verify your other extjs properties / configs for html5smartfile if the above doesn't resolves your problem.


Need Your Help

Kohana Routing Issue

php routes kohana kohana-3

I know that there are countless threads about this, but I would appreciate a quick pointer to explain what I am missing here. I have a controller called Controller_Index_Orders which resides in

Existing WCF service of xml transformation , need to integrate with MEF?

wcf mef

My application is in WCF of xml transformation. now need to change to integrate with MEF. which is the best way to implement MEF or which type of architecture should i use to implement with less ef...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.