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)
59 loadcanvas : function (_self, imageEl)
61 if(imageEl.OriginWidth < 720) {
64 msg: "Image width should be at least 720",
67 _this.cropbox.selectorEl.dom.value = '';
68 _this.cropbox.selectorEl.dom.click();
74 arrange : function (_self, formData)
76 formData.append("onid", "43024");
77 formData.append("ontable", "pressrelease_boilerplate");
84 xtype : 'ContentPanel',
88 activate : function (_self)
90 var style = 'font:bold 16px sans serif,tahoma,verdana,helvetica; color:rgba(0, 0, 0, 0.5);';
91 this.setContent("<div style='width:100%; height:50px; display:flex; flex-direction:column; align-items:center; justify-content:center'>"
92 + "<h3 style='" + style + "'>Scroll the mouse wheel to resize the image</h3>"
93 + "<h3 style='" + style + "'>Drag the image to move the image</h3></div>");
104 click : function () {
105 _this.cropbox.crop();
115 click : function () {
130 show : function(data, cb)
144 this.dialog = Roo.factory({
146 xtype : 'LayoutDialog',
151 xtype : 'LayoutRegion'
164 xtype : 'ColumnModel',
180 click : function () {
181 uploadCropbox.show();
182 document.body.onfocus = function(e) {
183 if(!uploadCropbox.cropbox.selectorEl.dom.files.length) {
184 uploadCropbox.dialog.hide();
187 uploadCropbox.cropbox.selectorEl.dom.click();
200 Roo.onReady(function() {
202 Roo.get('show-dialog-btn').on('click',function () {