// Token: 0x06002813 RID: 10259 RVA: 0x000E2D05 File Offset: 0x000E0F05 protected void RenderCategories() { if (base.Item != null) { CategorySwatch.RenderCategories(base.OwaContext, base.SanitizingResponse, base.Item); } }
// Token: 0x06002AA5 RID: 10917 RVA: 0x000EF53C File Offset: 0x000ED73C protected void RenderData() { if (base.HasCategories) { this.isSectionStarted = false; this.sectionHeader = LocalizedStrings.GetHtmlEncoded(-2125925114); this.sectionId = "spnSCat"; this.RenderSectionStart(false); base.Response.Write("<div class=\"\">"); CategorySwatch.RenderCategories(base.OwaContext, base.SanitizingResponse, base.Item); base.Response.Write("</div></div>"); } this.isSectionStarted = false; this.sectionHeader = LocalizedStrings.GetHtmlEncoded(447307630); this.sectionId = "spnSCt"; this.isFirstLine = true; this.RenderEmailSubsectionData(); this.RenderPhoneSubsectionData(); this.RenderPersonalSubsectionData(); this.isFirstLine = true; this.RenderProfileSectionData(); this.isFirstLine = true; this.RenderAddressSectionData(); this.isFirstLine = true; this.RenderSecureMessaging(); this.isFirstLine = true; this.RenderDetailsSectionData(); }
// Token: 0x060027FB RID: 10235 RVA: 0x000E2860 File Offset: 0x000E0A60 protected void RenderCategories() { base.SanitizingResponse.Write("<div id=\"divWellCategories\""); if (!base.HasCategories) { base.SanitizingResponse.Write(" style=\"display:none\""); } base.SanitizingResponse.Write("><div id=\"divFieldCategories\">"); if (base.Item != null) { CategorySwatch.RenderCategories(base.OwaContext, base.SanitizingResponse, base.Item); } base.SanitizingResponse.Write("</div></div>"); }
public void CreateCategory() { base.ThrowIfCannotActAsOwner(); string text = (string)base.GetParameter("nm"); if (text.Length > 255) { throw new OwaInvalidRequestException("Category name cannot be longer than 255 characters."); } int color = (int)base.GetParameter("clr"); if (!CategorySwatch.IsValidCategoryColor(color)) { throw new OwaInvalidRequestException("Category color must be in the range [-1, 24]."); } text = text.Trim(); if (text.Length == 0) { RenderingUtilities.RenderError(base.UserContext, this.Writer, 1243373352); return; } if (text.Contains(",") || text.Contains(";") || text.Contains("؛") || text.Contains("﹔") || text.Contains(";")) { RenderingUtilities.RenderError(base.UserContext, this.Writer, 1243373352); return; } if (CategoryEventHandler.guidRegEx.IsMatch(text)) { RenderingUtilities.RenderError(base.UserContext, this.Writer, 1243373352); return; } MasterCategoryList masterCategoryList = base.UserContext.GetMasterCategoryList(true); if (masterCategoryList.Contains(text)) { RenderingUtilities.RenderError(base.UserContext, this.Writer, -210070156); return; } Category category = Category.Create(text, color, false); masterCategoryList.Add(category); ManageCategoriesDialog.RenderCategory(this.Writer, category); masterCategoryList.Save(); }
public override string GetCssClassName(int index) { string text = "noClrCal"; bool flag = false; string[] categories = base.GetCategories(index); if (categories != null && 0 < categories.Length) { MasterCategoryList masterCategoryList = this.userContext.GetMasterCategoryList(this.folderId); if (masterCategoryList != null) { for (int i = 0; i < categories.Length; i++) { Category category = masterCategoryList[categories[i]]; if (category != null && category.Color != -1) { flag = true; text = CategorySwatch.GetCategoryClassName(category); break; } } } } int num; if (!flag && base.TryGetPropertyValue <int>(index, CalendarItemBaseSchema.AppointmentColor, out num)) { if (num < 0 || num >= CalendarDataSource.categoryColorOldLabelsToColors.Length) { num = 0; } text = CategorySwatch.GetCategoryClassNameFromColor(CalendarDataSource.categoryColorOldLabelsToColors[num]); } if (StringComparer.OrdinalIgnoreCase.Compare(text, "noClr") == 0) { text = "noClrCal"; } return(text); }
public void ModifyCategories() { this.ThrowIfWebPartsCannotActAsOwner(); string[] addCategories = (string[])base.GetParameter("catAdd"); string[] removeCategories = (string[])base.GetParameter("catRem"); using (Item item = this.GetItem()) { CategoryContextMenu.ModifyCategories(item, addCategories, removeCategories); MeetingMessage meetingMessage = item as MeetingMessage; if (meetingMessage != null) { CalendarItemBase calendarItemBase = MeetingUtilities.TryGetCorrelatedItem(meetingMessage); if (calendarItemBase != null) { CategoryContextMenu.ModifyCategories(calendarItemBase, addCategories, removeCategories); Utilities.SaveItem(calendarItemBase); } } Utilities.SaveItem(item, true, SaveMode.FailOnAnyConflict); item.Load(); this.Writer.Write("var sCats = \""); StringBuilder stringBuilder = new StringBuilder(); StringWriter stringWriter = new StringWriter(stringBuilder); CategorySwatch.RenderCategories(base.OwaContext, stringWriter, item); stringWriter.Close(); Utilities.JavascriptEncode(stringBuilder.ToString(), this.Writer); this.Writer.Write("\";"); this.Writer.Write("a_rgCats = "); CategorySwatch.RenderCategoriesJavascriptArray(this.SanitizingWriter, item); this.Writer.Write(";"); this.Writer.Write("a_sId = \""); Utilities.JavascriptEncode(Utilities.GetIdAsString(item), this.Writer); this.Writer.Write("\";"); this.Writer.Write("a_sCK = \""); Utilities.JavascriptEncode(item.Id.ChangeKeyAsBase64String(), this.Writer); this.Writer.Write("\";"); } }
public void ChangeCategoryColor() { base.ThrowIfCannotActAsOwner(); string text = (string)base.GetParameter("nm"); if (string.IsNullOrEmpty(text)) { throw new OwaInvalidRequestException("Category name cannot be null or empty."); } int color = (int)base.GetParameter("clr"); if (!CategorySwatch.IsValidCategoryColor(color)) { throw new OwaInvalidRequestException("Category color must be in the range [-1, 24]."); } MasterCategoryList masterCategoryList = base.UserContext.GetMasterCategoryList(true); if (!masterCategoryList.Contains(text)) { throw new OwaInvalidRequestException("Category does not exist"); } masterCategoryList[text].Color = color; masterCategoryList.Save(); }
// Token: 0x06002814 RID: 10260 RVA: 0x000E2D26 File Offset: 0x000E0F26 protected void RenderCategoriesJavascriptArray() { CategorySwatch.RenderCategoriesJavascriptArray(base.SanitizingResponse, base.Item); }
protected void RenderCategories() { CategorySwatch.RenderCategories(base.OwaContext, base.SanitizingResponse, this.post); }