Quantcast
Channel: Adobe Community : Popular Discussions - CQ5 (read only)
Viewing all articles
Browse latest Browse all 12476

Create a new xtype containing html5smartimage

$
0
0

Hi all

 

I'm trying to create an xtype that contains an html5smartimage element.

 

Apart from adding the html5smartimage to a Panel, is there anything else required?

 

The following is rendered to my dialog, but this doesn't contain the Crop / Resize / Map icons or the placeholder text.

image-xtype.png

When dropping images from ContentFinder to this area, I get the following error:

image-error.png

CODE

this.newPanel = new CQ.Ext.Panel({

 

    cls: "test",

 

    layout: "fit",

    border: true,

    autoHeight: true,

    items: {

        xtype: "panel",

        layout: "form",

        border: false,

        autoHeight: true,

        defaults: {

            labelWidth: 70,

            anchor: "100%"

        },

        items:[

            {

                 xtype: "panel",

                 border: false,

                 items: [{

                     height: 150,

                    title:"Image",

                    ddGroups: ["media"],

                    ddAccept: ["image/.*"],

                    border: true,

                    disableZoom: true,

                    allowUpload: false,

                    fileNameParameter:"./fileName",

                    fileReferenceParameter:"./fileReference",

                    cropParameter:"./imageCrop",

                    mapParameter:"./imageMap",

                    requestSuffix:".img.png",

                    rotateParameter:"./imageRotate",

                    name:"./file",

                    uploadUrl:"/tmp/upload/*",

                    xtype: "html5smartimage"

                 }]

            }

        ]

    }

});


Viewing all articles
Browse latest Browse all 12476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>