Pman.Dialog.CoreEmail.bjs
authoredward <edward@roojs.com>
Tue, 10 Nov 2015 06:48:10 +0000 (14:48 +0800)
committeredward <edward@roojs.com>
Tue, 10 Nov 2015 06:48:10 +0000 (14:48 +0800)
Pman.Dialog.CoreEmail.js

Pman.Dialog.CoreEmail.bjs
Pman.Dialog.CoreEmail.js

index d28a4c0..311f625 100644 (file)
          "xtype" : "ColumnModel",
          "header" : "Filename",
          "width" : 300,
-         "$ renderer" : "function(v,x,r)\n{\n    var width = r.data.width;\n    var height = r.data.height;\n    \n    if(width > 50){\n        width = 50;\n        Roo.log(height);\n        Roo.log(50 / width);\n        Roo.log(height * 50 / width);\n        height = Math.round(height * 50 / width);\n    }\n    \n   return '<img src=\"' + baseURL + '/Images/' + r.data.id + '/' + r.data.filename + '\" width=\"' + width + '\" height=\"' + height + '\" />';\n}",
+         "$ renderer" : "function(v,x,r)\n{\n    var width = r.data.width;\n    var height = r.data.height;\n    \n    if(width > 50){\n        height = Math.round(height * 50 / width);\n        width = 50;\n    }\n    \n   return '<img src=\"' + baseURL + '/Images/' + r.data.id + '/' + r.data.filename + '\" width=\"' + width + '\" height=\"' + height + '\" />';\n}",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
          "dataIndex" : "filename"
index 29dbf42..8e7bdcd 100644 (file)
@@ -1221,11 +1221,8 @@ Pman.Dialog.CoreEmail = {
              var height = r.data.height;
              
              if(width > 50){
-                 width = 50;
-                 Roo.log(height);
-                 Roo.log(50 / width);
-                 Roo.log(height * 50 / width);
                  height = Math.round(height * 50 / width);
+                 width = 50;
              }
              
             return '<img src="' + baseURL + '/Images/' + r.data.id + '/' + r.data.filename + '" width="' + width + '" height="' + height + '" />';