safari, 크롬등에서 img 의 width속성값이 없을 경우 크기를 구하지 못하는 문제로 크기를 구하지 못하면 resize 하지 않도록 resize_image 애드온의 동작을 변경

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6429 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-05-27 23:06:17 +00:00
parent 900f6982a7
commit 9944e9e367

View file

@ -166,6 +166,7 @@ $(document).ready(function(){
var img = $(this);
var width = img.attr("width");
if(!width) width = img.width();
if(!width) return;
img.attr("orig_width",width);
img.attr("width",1);
});
@ -173,6 +174,7 @@ $(document).ready(function(){
$(this).find("img").each(function(){
var img = $(this);
if(!img.attr("orig_width")) return;
var src = img.attr("src");
img.attr("width",img.attr("orig_width"));
img.removeAttr("orig_width",'');