private void ConfigureLightBox(DHXScheduler scheduler, List <ResourceViewModel> rooms) { var name = new LightboxText("text", "Name"); name.Height = 24; scheduler.Lightbox.Add(name); var roomsSelect = new LightboxSelect("room_number", "Room"); roomsSelect.AddOptions(rooms.ToList()); scheduler.Lightbox.Add(roomsSelect); //var status = new LightboxRadio("status", "Status"); //var statuses = new List<object>(); // new Repository<BookingStatus>().ReadAll().Select(s => new { key = s.Id, label = s.Title }); //status.AddOptions(statuses); //scheduler.Lightbox.Add(status); //scheduler.InitialValues.Add("status", statuses.First().key); var isPaid = new LightboxCheckbox("is_paid", "Paid"); scheduler.Lightbox.Add(isPaid); scheduler.InitialValues.Add("is_paid", false); var date = new LightboxMiniCalendar("time", "Time"); scheduler.Lightbox.Add(date); scheduler.InitialValues.Add("text", String.Empty); }
// GET: Calendar public ActionResult Index() { ApplicationDbContext db = new ApplicationDbContext(); var sched = new DHXScheduler(this); sched.Skin = DHXScheduler.Skins.Flat; sched.LoadData = true; sched.EnableDataprocessor = true; sched.InitialDate = new DateTime(); sched.Config.map_resolve_event_location = true; sched.Config.map_resolve_user_location = true; sched.Config.full_day = true; var check = new LightboxCheckbox("highlighting", "Important"); check.MapTo = "textColor"; check.CheckedValue = "red"; sched.Lightbox.Add(check); sched.Lightbox.Add(new LightboxText("text", "Description")); sched.Lightbox.Add(new LightboxText("event_location", "Location") { Height = 60 }); sched.Config.cascade_event_display = true; var map = new MapView { ApiKey = "AIzaSyClsFLXBrgtOmpD7C-gyY5tglRiVmlyhmk" }; sched.Views.Add(map); sched.LoadData = true; map.SectionLocation = "Location"; sched.DataAction = "Data"; if (User.IsInRole("Child")) { sched.Config.isReadonly = true; } return(View(sched)); }
public ActionResult Index() { var sched = new DHXScheduler(this); sched.Lightbox.Add(new LightboxText("text", "Description")); var check = new LightboxCheckbox("highlighting", "Important"); check.MapTo = "color";//checkbox will set value of 'color' property of the event check.CheckedValue = "#FE7510"; sched.Lightbox.Add(check); sched.LoadData = true; sched.EnableDataprocessor = true; //allows to postback changes from the server sched.UpdateFieldsAfterSave(); sched.InitialDate = new DateTime(2011, 9, 5); return View(sched); }
public ActionResult Index() { var sched = new DHXScheduler(this); sched.Lightbox.Add(new LightboxText("text", "Description")); var check = new LightboxCheckbox("highlighting", "Important"); check.MapTo = "color";//checkbox will set value of 'color' property of the event check.CheckedValue = "#FE7510"; sched.Lightbox.Add(check); sched.LoadData = true; sched.EnableDataprocessor = true; //allows to postback changes from the server sched.UpdateFieldsAfterSave(); sched.InitialDate = new DateTime(2011, 9, 5); return(View(sched)); }