5 show : function(data, cb)
19 this.dialog = Roo.factory({
21 xtype : 'LayoutDialog',
26 xtype : 'LayoutRegion'
30 xtype: 'ContentPanel',
35 xtype : 'UploadCropbox',
42 cls : 'btn-group roo-upload-cropbox-picture',
47 cls : 'btn btn-default',
48 html : '<i class="fa fa-picture-o"></i>'
54 render : function (_self)
56 console.log("RENDER");
57 _this.cropbox = _self;
59 loadcanvas : function (_self, imageEl)
61 console.log("LOADCANVAS");
64 if(imageEl.OriginWidth < 720) {
65 console.log("Image width should be at least 720");
104 show : function(data, cb)
118 this.dialog = Roo.factory({
120 xtype : 'LayoutDialog',
125 xtype : 'LayoutRegion'
138 xtype : 'ColumnModel',
154 click : function () {
155 uploadCropbox.show();
156 document.body.onfocus = function(e) {
157 document.body.onfocus = null;
158 if(!uploadCropbox.cropbox.selectorEl.dom.files.length) {
159 uploadCropbox.dialog.hide();
162 uploadCropbox.cropbox.selectorEl.dom.click();
175 Roo.onReady(function() {
177 Roo.get('show-dialog-btn').on('click',function () {