5 show : function(data, cb)
19 this.dialog = Roo.factory({
21 xtype : 'LayoutDialog',
26 xtype : 'LayoutRegion',
31 xtype : 'LayoutRegion'
35 xtype: 'ContentPanel',
40 xtype : 'UploadCropbox',
44 outputMaxWidth : 1200,
46 url: 'http://localhost/web.MediaOutreach/press.local.php/Roo/Images.php',
47 buttons: Roo.dialog.UploadCropbox.footer.CENTER,
49 render : function (_self)
51 _this.cropbox = _self;
52 _this.cropbox.bodyEl.dom.style.height = (parseInt(_this.cropbox.bodyEl.dom.parentNode.parentNode.parentNode.style.height) - 34) + 'px';
53 _this.cropbox.bodyEl.dom.style.maxHeight = (parseInt(_this.cropbox.bodyEl.dom.parentNode.parentNode.parentNode.style.height) - 34) + 'px';
55 beforeloadcanvas : function(self, src)
58 src = 'http://localhost/web.MediaOutreach/press.local.php/Images/Download/162632/2000x1000.png';
60 loadcanvas : function (_self, imageEl)
62 if(imageEl.OriginWidth < 720) {
65 msg: "Image width should be at least 720",
68 _this.cropbox.selectorEl.dom.value = '';
69 _this.cropbox.selectorEl.dom.click();
75 arrange : function (_self, formData)
77 formData.append("onid", "43024");
78 formData.append("ontable", "pressrelease_boilerplate");
85 xtype : 'ContentPanel',
89 activate : function (_self)
91 var style = 'font:bold 16px sans serif,tahoma,verdana,helvetica; color:rgba(0, 0, 0, 0.5);';
92 this.setContent("<div style='width:100%; height:50px; display:flex; flex-direction:column; align-items:center; justify-content:center'>"
93 + "<h3 style='" + style + "'>Scroll the mouse wheel to resize the image</h3>"
94 + "<h3 style='" + style + "'>Drag the image to move the image</h3></div>");
105 click : function () {
106 _this.cropbox.crop();
116 click : function () {
131 show : function(data, cb)
145 this.dialog = Roo.factory({
147 xtype : 'LayoutDialog',
152 xtype : 'LayoutRegion'
165 xtype : 'ColumnModel',
181 click : function () {
182 uploadCropbox.show();
183 document.body.onfocus = function(e) {
184 if(!uploadCropbox.cropbox.selectorEl.dom.files.length) {
185 uploadCropbox.dialog.hide();
188 uploadCropbox.cropbox.selectorEl.dom.click();
201 Roo.onReady(function() {
203 Roo.get('show-dialog-btn').on('click',function () {