0 Replies Latest reply on May 14, 2013 3:27 AM by isingh2003

    Smart file component(html5smartfile) not working

    isingh2003

      votefavorite

      I have been working on developing a custom extjs console to enable author drop an asset usinghtml5smartfile 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:-

      first.jpg

      i have tried a lot, after working for 8-10 hours, 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 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:-

      second.jpg

      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] });

      }

      Can anyone please look into this issue. I am stuck here for 3 days. Thanks in Advance.