private string AddAlbumItem(AlbumItem albumItem, bool isFace) { StringBuilder sb = new StringBuilder(); if (countItems != 0 && countItems % 3 == 0) { sb.Append("</div>"); } if (countItems % 3 == 0) { sb.Append("<div class=\"borderLight tintMediumLight clearFix\" style=\"padding:20px; border-left:none;border-right:none;margin-bottom:8px;\">"); } sb.Append("<div style='float:left;margin-bottom:5px;" + (countItems % 3 == 0 ? "" : "margin-left:22px; ") + "'>"); sb.Append("<span>"); sb.Append("<input name=\"" + ASC.PhotoManager.PhotoConst.PARAM_EDIT_ITEMID + countItems + "\" name=\"" + ASC.PhotoManager.PhotoConst.PARAM_EDIT_ITEMID + countItems + "\" type=\"hidden\" value=\"" + albumItem.Id + "\" />"); sb.Append("<div style=\"width: 200px;height:200px;background-color: #EBF0F4;padding:5px;\">" + ImageHTMLHelper.GetHTMLThumb(ImageHTMLHelper.GetImageUrl(albumItem.ExpandedStorePreview, store), 200, albumItem.PreviewSize.Width, albumItem.PreviewSize.Height) + "</div>"); sb.Append("<div class='textBigDescribe clearFix' style=\" padding-left:5px;padding-top:5px;width:200px;\">"); sb.Append("<div style=\"padding-top: 5px; float: left;\">" + PhotoManagerResource.EditPhotoNameTitle + "</div>"); sb.Append("<div style=\"float: right;\">"); sb.Append("<label class='textMediumDescribe' for=\"face_" + countItems + "\">"); sb.Append(PhotoManagerResource.AlbumCoverTitle + "</label><input type=\"radio\" id=\"face_" + countItems + "\" name=\"album_face\" value=\"" + albumItem.Id + "\" " + (isFace ? "checked" : "") + " /></div></div>"); sb.Append("<div><input class=\"textEdit\" style=\"width:200px;margin-top:5px;\" maxlength=\"255\" name=\"" + ASC.PhotoManager.PhotoConst.PARAM_EDIT_NAME + countItems + "\" id=\"" + ASC.PhotoManager.PhotoConst.PARAM_EDIT_NAME + countItems + "\" value='" + HttpUtility.HtmlEncode(albumItem.Name) + "' type=\"text\"/></div>"); sb.Append("</span>"); sb.Append("</div>"); countItems++; return(sb.ToString()); }
private string AddPreviewImage(string fileName, string imageName, long imageID, bool isAlbumFace, int imageNumber, int width, int height) { var sb = new StringBuilder(); sb.Append("<span><input name=\"image_id_" + imageNumber + "\" name=\"image_id_" + imageNumber + "\" type=\"hidden\" value=\"" + imageID + "\" />"); sb.Append("<div style=\"width: 200px;height:200px;background-color: #EBF0F4;padding:5px;\">" + ImageHTMLHelper.GetHTMLThumb(fileName, 200, width, height) + "</div><div></div>"); sb.Append("<div class='textBigDescribe clearFix' style=\"padding-left:5px;padding-top:5px;width: 200px;\"><div style='padding-top: 5px;float:left'>" + PhotoManagerResource.EditPhotoNameTitle + "</div><div style='float:right'><label class='textMediumDescribe' for=\"face_" + imageNumber + "\">" + PhotoManagerResource.AlbumCoverTitle + "</label><input maxlength=\"255\" type=\"radio\" id=\"face_" + imageNumber + "\" name=\"album_face\" value=\"" + imageID + "\" " + (isAlbumFace ? "checked" : "") + " /></div></div><div><input class=\"textEdit\" style=\"width:200px;margin-top:5px;\" name=\"" + ASC.PhotoManager.PhotoConst.PARAM_EDIT_NAME + imageNumber + "\" id=\"" + ASC.PhotoManager.PhotoConst.PARAM_EDIT_NAME + imageNumber + "\" value='" + imageName + "' type=\"text\"/></div>"); sb.Append("</span>"); return(sb.ToString()); }