WIP installer refactor, update to image uploader, if width and height not supplied, skip crop step

[TFS Changeset #77163]
This commit is contained in:
starfighter83
2010-09-14 07:55:58 +00:00
parent 3319ded749
commit dcd73c5207

View File

@@ -36,8 +36,16 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule
{
Image1.ImageUrl = this.ResolveUrl("~/media/upload/" + g) + "/" + FileUpload1.FileName;
Image.Value = Image1.ImageUrl;
pnl_crop.Visible = true;
pnl_upload.Visible = false;
if (!string.IsNullOrEmpty(Request["w"]) && !string.IsNullOrEmpty(Request["h"]))
{
pnl_crop.Visible = true;
pnl_upload.Visible = false;
}
else
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "setimage", " $(function () { setImage(); })", true);
}
}
else
throw new Exception("Not a valid image");