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 loadcanvas : function (_self, imageEl)
57 if(imageEl.OriginWidth < 720) {
60 msg: "Image width should be at least 720",
63 _this.cropbox.selectorEl.dom.value = '';
64 _this.cropbox.selectorEl.dom.click();
70 arrange : function (_self, formData)
72 formData.append("onid", "43024");
73 formData.append("ontable", "pressrelease_boilerplate");
80 xtype : 'ContentPanel',
84 activate : function (_self)
86 var style = 'font:bold 16px sans serif,tahoma,verdana,helvetica; color:rgba(0, 0, 0, 0.5);';
87 this.setContent("<div style='width:100%; height:50px; display:flex; flex-direction:column; align-items:center; justify-content:center'>"
88 + "<h3 style='" + style + "'>Scroll the mouse wheel to resize the image</h3>"
89 + "<h3 style='" + style + "'>Drag the image to move the image</h3></div>");
100 click : function () {
101 _this.cropbox.crop();
111 click : function () {
126 show : function(data, cb)
140 this.dialog = Roo.factory({
142 xtype : 'LayoutDialog',
147 xtype : 'LayoutRegion'
160 xtype : 'ColumnModel',
176 click : function () {
177 uploadCropbox.show();
178 document.body.onfocus = function(e) {
179 if(!uploadCropbox.cropbox.selectorEl.dom.files.length) {
180 uploadCropbox.dialog.hide();
183 uploadCropbox.cropbox.selectorEl.dom.click();
196 Roo.onReady(function() {
198 Roo.get('show-dialog-btn').on('click',function () {