public ContentMenu(CalendarSecurityService calendarSecurity, IHttpContextAccessor httpContextAccessor) { var httpContext = httpContextAccessor.HttpContext; var returnUrl = httpContext.Request.GetRelativeUrlEncoded(); var validation = "" + " function(button){ " + " if (button != 'save') " + " { " + " return true; " + " } " + " " + " return saveEvent(function() { }); " + " } "; MenuItems = new List <IMenuItem>() { new MenuItemSecureCustom() { Title = "Calendar Event", Url = "javascript: void $.dialog('/admin/calendar/EventEdit',{}, " + validation + ").done(function (button) { " + " });", // "/admin/calendar/EventEdit", // "javascript: ShowEventEditContainer();", Icon = IconType.Calendar, AuthorizeCallback = user => { return(calendarSecurity.AuthorizeForCreate()); } } }; }
public CalendarWidgetGroups(CalendarQueryService calendarQueryService, IContextAccessor <UserContext> userContextAccessor, SiteContext siteContext, CalendarSecurityService calendarSecurity) { _calendarQueryService = calendarQueryService; _userContextAccessor = userContextAccessor; _siteContext = siteContext; _calendarSecurity = calendarSecurity; }
public EventMenu(CalendarSecurityService calendarSecurity, IHttpContextAccessor httpContextAccessor) { var httpContext = httpContextAccessor.HttpContext; var returnUrl = httpContext.Request.Headers["Referer"].ToString(); var validation = "" + " function(button){ " + " if (button != 'save') " + " { " + " return true; " + " } " + " " + " return saveEvent(function() { }); " + " } "; MenuItems = new List <IMenuItem>() { new MenuItemSecureCustom() { Title = "Delete Event", Url = "javascript: void $('#calendareventform').form().delete('/api/content/calendar/deletecalendarevent?eventId=[eventid]').done(function () { window.location = '" + returnUrl + "' });", // "/admin/calendar/EventEdit", // "javascript: ShowEventEditContainer();", Icon = IconType.Trashcan, AuthorizeCallback = user => { return(calendarSecurity.AuthorizeForCreate()); } }, new MenuItemSecureCustom() { Title = "Edit Event", Url = "javascript: void $.dialog('/admin/calendar/EventEdit?id=[eventid]',{}, " + validation + ").done(function (button) { " + " if (button === 'save') window.location = '" + returnUrl + "' });", Icon = IconType.Pencil, AuthorizeCallback = user => { return(calendarSecurity.AuthorizeForCreate()); } }, new MenuItemSecureCustom() { Title = "Add To Google", Url = "javascript: void window.open('https://www.google.com/calendar/render?action=TEMPLATE&text=[title]&location=&dates=[startdate]/[enddate]&details=[description]&sf=true&output=xml', '_blank');", // "/admin/calendar/EventEdit", // "javascript: ShowEventEditContainer();", Icon = IconType.GooglePlus, AuthorizeCallback = user => { return(true); } }, new MenuItemSecureCustom() { Title = "Add To Outlook", Url = "javascript: void window.open('/sys/content/calendar/createoutlookevent?id=[eventid]', '_blank');", // "/admin/calendar/EventEdit", // "javascript: ShowEventEditContainer();", Icon = IconType.Windows, AuthorizeCallback = user => { return(true); } }, }; }
public UpcomingEventsWidgetGroupForm ( CategoryManager categoryManager, CalendarDbContext blogDb, CalendarQueryService calendarQueryService, CalendarWidgetService calendarWidgetService, CalendarSecurityService calendarSecurity, IContextAccessor <UserContext> userContextAccessor ) { _calendarDb = blogDb; _calendarWidgetService = calendarWidgetService; _calendarQueryService = calendarQueryService; _calendarSecurity = calendarSecurity; _categoryManager = categoryManager; _userContextAccessor = userContextAccessor; }
public CalendarDataController(CategoryManager categoryManager, CalendarQueryService calendarqueryService, CalendarWidgetService calendarWidget, UpcomingEventsWidgetService upcomingEventsWidget, IContextAccessor <UserContext> userContextAccessor, SiteContext siteContext, CalendarSecurityService calendarSecurity, UserManager userManager) { _calendarQueryService = calendarqueryService; _calendarWidget = calendarWidget; _upcomingEventsWidget = upcomingEventsWidget; _categoryManager = categoryManager; _userContextAccessor = userContextAccessor; _siteContext = siteContext; _calendarSecurity = calendarSecurity; _userManager = userManager; }
public CalendarEventGroups(CalendarQueryService calendarQueryService, IContextAccessor <UserContext> userContextAccessor, CalendarSecurityService calendarSecurity) { _calendarQueryService = calendarQueryService; _userContextAccessor = userContextAccessor; _calendarSecurity = calendarSecurity; }
public CalendarRenderCalendarWidget(CalendarSecurityService calendarSecurity) { _calendarSecurity = calendarSecurity; }