Skip to content

Commit

Permalink
TabPanel: Fix ASP Template demos (#3109)
Browse files Browse the repository at this point in the history
  • Loading branch information
marker-dao authored Jan 16, 2024
1 parent 3226d7e commit 392e668
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 48 deletions.
6 changes: 4 additions & 2 deletions MVCDemos/Controllers/TabPanelController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@

namespace DevExtreme.MVC.Demos.Controllers {
public class TabPanelController : Controller {
#region Overview
public ActionResult Overview() {
return View();
}

public ActionResult Templates() {
return View();
}

public ActionResult SortableClosableTabs() {
return View(SampleData.DataGridEmployees);
}
Expand All @@ -24,6 +27,5 @@ public ActionResult GetCompanies(DataSourceLoadOptions loadOptions) {
public ActionResult GetTabPanelItems(DataSourceLoadOptions loadOptions) {
return Content(JsonConvert.SerializeObject(DataSourceLoader.Load(TabPanelData.TabPanelItems, loadOptions)), "application/json");
}
#endregion
}
}
40 changes: 20 additions & 20 deletions MVCDemos/Models/SampleData/TabpanelData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,28 @@ public static class TabPanelData {
public static readonly IEnumerable<TaskItem> NotStartedTaskItems = new[] {
new TaskItem {
status = "Not Started",
priority = "hight",
priority = "high",
text = "Revenue Projections",
date = "2023/09/16",
assignedBy = "John Heart"
},
new TaskItem {
status = "Not Started",
priority = "hight",
priority = "high",
text = "New Brochures",
date = "2023/09/16",
assignedBy = "Samantha Bright"
},
new TaskItem {
status = "Not Started",
priority = "normal",
priority = "medium",
text = "Training",
date = "2023/09/16",
assignedBy = "Arthur Miller"
},
new TaskItem {
status = "Not Started",
priority = "normal",
priority = "medium",
text = "NDA",
date = "2023/09/16",
assignedBy = "Robert Reagan"
Expand Down Expand Up @@ -105,14 +105,14 @@ public static class TabPanelData {
},
new TaskItem {
status = "Help Needed",
priority = "hight",
priority = "high",
text = "Shippers",
date = "2023/09/16",
assignedBy = "Ed Holmes"
},
new TaskItem {
status = "Help Needed",
priority = "normal",
priority = "medium",
text = "Hardware Upgrade",
date = "2023/09/16",
assignedBy = "Barb Banks"
Expand All @@ -122,14 +122,14 @@ public static class TabPanelData {
public static readonly IEnumerable<TaskItem> InProgressTaskItems = new[] {
new TaskItem {
status = "In Progress",
priority = "normal",
priority = "medium",
text = "Online Sales",
date = "2023/09/16",
assignedBy = "Cindy Stanwick"
},
new TaskItem {
status = "In Progress",
priority = "normal",
priority = "medium",
text = "New Website Design",
date = "2023/09/16",
assignedBy = "Sammy Hill"
Expand All @@ -143,7 +143,7 @@ public static class TabPanelData {
},
new TaskItem {
status = "In Progress",
priority = "normal",
priority = "medium",
text = "Support",
date = "2023/09/16",
assignedBy = "Victor Norris"
Expand All @@ -160,28 +160,28 @@ public static class TabPanelData {
public static readonly IEnumerable<TaskItem> DeferredTaskItems = new[] {
new TaskItem {
status = "Deferred",
priority = "normal",
priority = "medium",
text = "New Database",
date = "2023/09/16",
assignedBy = "Samantha Bright"
},
new TaskItem {
status = "Deferred",
priority = "hight",
priority = "high",
text = "Automation Server",
date = "2023/09/16",
assignedBy = "Arthur Miller"
},
new TaskItem {
status = "Deferred",
priority = "normal",
priority = "medium",
text = "Retail Sales",
date = "2023/09/16",
assignedBy = "Robert Reagan"
},
new TaskItem {
status = "Deferred",
priority = "normal",
priority = "medium",
text = "Shipping Labels",
date = "2023/09/16",
assignedBy = "Greta Sims"
Expand All @@ -191,28 +191,28 @@ public static class TabPanelData {
public static readonly IEnumerable<TaskItem> RejectedTaskItems = new[] {
new TaskItem {
status = "Rejected",
priority = "hight",
priority = "high",
text = "Schedule Meeting with Sales Team",
date = "2023/09/16",
assignedBy = "Sandra Johnson"
},
new TaskItem {
status = "Rejected",
priority = "normal",
priority = "medium",
text = "Confirm Availability for Sales Meeting",
date = "2023/09/16",
assignedBy = "Ed Holmes"
},
new TaskItem {
status = "Rejected",
priority = "normal",
priority = "medium",
text = "Reschedule Sales Team Meeting",
date = "2023/09/16",
assignedBy = "Barb Banks"
},
new TaskItem {
status = "Rejected",
priority = "hight",
priority = "high",
text = "Update Database with New Leads",
date = "2023/09/16",
assignedBy = "Kevin Carter"
Expand All @@ -229,7 +229,7 @@ public static class TabPanelData {
public static readonly IEnumerable<TaskItem> CompletedTaskItems = new[] {
new TaskItem {
status = "Completed",
priority = "normal",
priority = "medium",
text = "Territory Sales Breakdown Report",
date = "2023/09/16",
assignedBy = "Sammy Hill"
Expand All @@ -243,14 +243,14 @@ public static class TabPanelData {
},
new TaskItem {
status = "Completed",
priority = "hight",
priority = "high",
text = "Staff Productivity Report",
date = "2023/09/16",
assignedBy = "Victor Norris"
},
new TaskItem {
status = "Completed",
priority = "normal",
priority = "medium",
text = "Review HR Budget Company Wide",
date = "2023/09/16",
assignedBy = "Mary Stern"
Expand Down
4 changes: 2 additions & 2 deletions MVCDemos/Views/TabPanel/Overview.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
.Height(418)
.AnimationEnabled(true)
.SwipeEnabled(true)
.TabsPosition(Position.Top)
.TabsPosition(Position.Left)
.StylingMode(TabsStyle.Secondary)
.IconPosition(TabsIconPosition.Top)
.ItemTemplate(new JS("tabPanelTemplate"))
Expand Down Expand Up @@ -108,7 +108,7 @@
}
function getTabPanelInstance() {
return $("#tabpanel-container").dxTabPanel("instance");
return $("#tabpanel").dxTabPanel("instance");
}
function tabsPositionChanged({ value }) {
Expand Down
6 changes: 4 additions & 2 deletions NetCoreDemos/Controllers/TabPanelController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@

namespace DevExtreme.NETCore.Demos.Controllers {
public class TabPanelController : Controller {
#region Overview
public ActionResult Overview() {
return View();
}

public ActionResult Templates() {
return View();
}

public ActionResult SortableClosableTabs() {
return View(SampleData.DataGridEmployees);
}
Expand All @@ -24,6 +27,5 @@ public ActionResult GetCompanies(DataSourceLoadOptions loadOptions) {
public ActionResult GetTabPanelItems(DataSourceLoadOptions loadOptions) {
return Content(JsonConvert.SerializeObject(DataSourceLoader.Load(TabPanelData.TabPanelItems, loadOptions)), "application/json");
}
#endregion
}
}
40 changes: 20 additions & 20 deletions NetCoreDemos/Models/SampleData/TabPanelData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,28 @@ public static class TabPanelData {
public static readonly IEnumerable<TaskItem> NotStartedTaskItems = new[] {
new TaskItem {
status = "Not Started",
priority = "hight",
priority = "high",
text = "Revenue Projections",
date = "2023/09/16",
assignedBy = "John Heart"
},
new TaskItem {
status = "Not Started",
priority = "hight",
priority = "high",
text = "New Brochures",
date = "2023/09/16",
assignedBy = "Samantha Bright"
},
new TaskItem {
status = "Not Started",
priority = "normal",
priority = "medium",
text = "Training",
date = "2023/09/16",
assignedBy = "Arthur Miller"
},
new TaskItem {
status = "Not Started",
priority = "normal",
priority = "medium",
text = "NDA",
date = "2023/09/16",
assignedBy = "Robert Reagan"
Expand Down Expand Up @@ -106,14 +106,14 @@ public static class TabPanelData {
},
new TaskItem {
status = "Help Needed",
priority = "hight",
priority = "high",
text = "Shippers",
date = "2023/09/16",
assignedBy = "Ed Holmes"
},
new TaskItem {
status = "Help Needed",
priority = "normal",
priority = "medium",
text = "Hardware Upgrade",
date = "2023/09/16",
assignedBy = "Barb Banks"
Expand All @@ -123,14 +123,14 @@ public static class TabPanelData {
public static readonly IEnumerable<TaskItem> InProgressTaskItems = new[] {
new TaskItem {
status = "In Progress",
priority = "normal",
priority = "medium",
text = "Online Sales",
date = "2023/09/16",
assignedBy = "Cindy Stanwick"
},
new TaskItem {
status = "In Progress",
priority = "normal",
priority = "medium",
text = "New Website Design",
date = "2023/09/16",
assignedBy = "Sammy Hill"
Expand All @@ -144,7 +144,7 @@ public static class TabPanelData {
},
new TaskItem {
status = "In Progress",
priority = "normal",
priority = "medium",
text = "Support",
date = "2023/09/16",
assignedBy = "Victor Norris"
Expand All @@ -161,28 +161,28 @@ public static class TabPanelData {
public static readonly IEnumerable<TaskItem> DeferredTaskItems = new[] {
new TaskItem {
status = "Deferred",
priority = "normal",
priority = "medium",
text = "New Database",
date = "2023/09/16",
assignedBy = "Samantha Bright"
},
new TaskItem {
status = "Deferred",
priority = "hight",
priority = "high",
text = "Automation Server",
date = "2023/09/16",
assignedBy = "Arthur Miller"
},
new TaskItem {
status = "Deferred",
priority = "normal",
priority = "medium",
text = "Retail Sales",
date = "2023/09/16",
assignedBy = "Robert Reagan"
},
new TaskItem {
status = "Deferred",
priority = "normal",
priority = "medium",
text = "Shipping Labels",
date = "2023/09/16",
assignedBy = "Greta Sims"
Expand All @@ -192,28 +192,28 @@ public static class TabPanelData {
public static readonly IEnumerable<TaskItem> RejectedTaskItems = new[] {
new TaskItem {
status = "Rejected",
priority = "hight",
priority = "high",
text = "Schedule Meeting with Sales Team",
date = "2023/09/16",
assignedBy = "Sandra Johnson"
},
new TaskItem {
status = "Rejected",
priority = "normal",
priority = "medium",
text = "Confirm Availability for Sales Meeting",
date = "2023/09/16",
assignedBy = "Ed Holmes"
},
new TaskItem {
status = "Rejected",
priority = "normal",
priority = "medium",
text = "Reschedule Sales Team Meeting",
date = "2023/09/16",
assignedBy = "Barb Banks"
},
new TaskItem {
status = "Rejected",
priority = "hight",
priority = "high",
text = "Update Database with New Leads",
date = "2023/09/16",
assignedBy = "Kevin Carter"
Expand All @@ -230,7 +230,7 @@ public static class TabPanelData {
public static readonly IEnumerable<TaskItem> CompletedTaskItems = new[] {
new TaskItem {
status = "Completed",
priority = "normal",
priority = "medium",
text = "Territory Sales Breakdown Report",
date = "2023/09/16",
assignedBy = "Sammy Hill"
Expand All @@ -244,14 +244,14 @@ public static class TabPanelData {
},
new TaskItem {
status = "Completed",
priority = "hight",
priority = "high",
text = "Staff Productivity Report",
date = "2023/09/16",
assignedBy = "Victor Norris"
},
new TaskItem {
status = "Completed",
priority = "normal",
priority = "medium",
text = "Review HR Budget Company Wide",
date = "2023/09/16",
assignedBy = "Mary Stern"
Expand Down
Loading

0 comments on commit 392e668

Please sign in to comment.