added limit methods to user, more work on post views

This commit is contained in:
albert
2010-03-12 15:18:30 -05:00
parent 9f29ffc8c3
commit 9eb578927c
18 changed files with 282 additions and 108 deletions

View File

@@ -0,0 +1,13 @@
$(document).ready(function() {
var img = $("#image-preview img");
if (img) {
var height = img.attr("height");
var width = img.attr("width");
if (height > 400) {
var ratio = 400.0 / height;
img.attr("height", height * ratio);
img.attr("width", width * ratio);
$("#scale").val("Scaled " + parseInt(100 * ratio) + "%");
}
}
});