Skip to content

Commit 1143bfe

Browse files
Merge pull request #2831 from syncfusion-content/EJ2-0000-undoredo
874394: alignment issues in undoredo
2 parents 3605c32 + 2662515 commit 1143bfe

File tree

5 files changed

+57
-28
lines changed

5 files changed

+57
-28
lines changed

ej2-asp-core-mvc/code-snippet/gantt/undo-redo/clear/razor

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@
33

44
@Html.EJS().Button("ClearRedoCollection").Content("Clear Redo Collection").CssClass("e-primary").Render()
55

6-
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)ViewBag.DataSource).Height("450px").Toolbar(new List<string>()
7-
{ "Add", "Edit", "Update", "Delete", "Search", "ZoomIn", "ZoomOut", "ZoomToFit","Indent","Outdent",
8-
"PrevTimeSpan", "NextTimeSpan","Undo","Redo"}).EnableUndoRedo(true).UndoRedoActions(new List<string>() { "Sorting", "Add", "ColumnReorder", "ColumnResize", "ColumnState", "Delete", "Edit", "Filtering", "Indent", "Outdent", "NextTimeSpan", "PreviousTimeSpan", "RowDragAndDrop", "Search", "ZoomIn", "ZoomOut", "ZoomToFit" }).TaskFields(ts =>
9-
ts.Id("TaskId").Name("TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")
10-
).EditSettings(es=>es.AllowEditing(true).AllowAdding(true).AllowDeleting(true).AllowRowDragAndDrop(true).ShowColumnMenu(true)).Render()
6+
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)ViewBag.DataSource).
7+
Height("450px").
8+
Toolbar(new List<string>(){ "Add", "Edit", "Update", "Delete", "Search", "ZoomIn", "ZoomOut", "ZoomToFit",
9+
"Indent","Outdent","PrevTimeSpan", "NextTimeSpan","Undo","Redo"}).
10+
EnableUndoRedo(true).
11+
UndoRedoActions(new List<string>() { "Sorting", "Add", "ColumnReorder", "ColumnResize", "ColumnState", "Delete", "Edit",
12+
"Filtering", "Indent", "Outdent", "NextTimeSpan", "PreviousTimeSpan", "RowDragAndDrop", "Search", "ZoomIn", "ZoomOut", "ZoomToFit" }).
13+
TaskFields(ts =>ts.Id("TaskId").Name("TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")).
14+
EditSettings(es=>es.AllowEditing(true).AllowAdding(true).AllowDeleting(true)).
15+
ShowColumnMenu(true).Render()
1116

1217
<script>
1318
document.getElementById('ClearUndoCollection').addEventListener('click', function (args) {
@@ -18,4 +23,4 @@
1823
var ganttObj = document.getElementById('Gantt').ej2_instances[0];
1924
ganttObj.clearRedoCollection();
2025
});
21-
</script>
26+
</script>

ej2-asp-core-mvc/code-snippet/gantt/undo-redo/dynamic/razor

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22

33
@Html.EJS().Button("Redo").Content("Redo").CssClass("e-primary").Render()
44

5-
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)ViewBag.DataSource).Height("450px").Toolbar(new List<string>()
6-
{ "Add", "Edit", "Update", "Delete", "Search", "ZoomIn", "ZoomOut", "ZoomToFit","Indent","Outdent",
7-
"PrevTimeSpan", "NextTimeSpan","Undo","Redo"}).EnableUndoRedo(true).UndoRedoActions(new List<string>() { "Sorting", "Add", "ColumnReorder", "ColumnResize", "ColumnState", "Delete", "Edit", "Filtering", "Indent", "Outdent", "NextTimeSpan", "PreviousTimeSpan", "RowDragAndDrop", "Search", "ZoomIn", "ZoomOut", "ZoomToFit" }).TaskFields(ts =>
8-
ts.Id("TaskId").Name("TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")
9-
).EditSettings(es=>es.AllowEditing(true).AllowAdding(true).AllowDeleting(true).AllowRowDragAndDrop(true).ShowColumnMenu(true)).Render()
5+
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)ViewBag.DataSource).
6+
Height("450px").
7+
Toolbar(new List<string>(){ "Add", "Edit", "Update", "Delete", "Search", "ZoomIn", "ZoomOut", "ZoomToFit","Indent","Outdent",
8+
"PrevTimeSpan", "NextTimeSpan","Undo","Redo"}).
9+
EnableUndoRedo(true).
10+
AllowRowDragAndDrop(true).
11+
UndoRedoActions(new List<string>() { "Sorting", "Add", "ColumnReorder", "ColumnResize", "ColumnState", "Delete", "Edit",
12+
"Filtering", "Indent", "Outdent", "NextTimeSpan", "PreviousTimeSpan", "RowDragAndDrop", "Search", "ZoomIn", "ZoomOut", "ZoomToFit" }).
13+
TaskFields(ts =>ts.Id("TaskId").Name("TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")).
14+
EditSettings(es=>es.AllowEditing(true).AllowAdding(true).AllowDeleting(true)).
15+
ShowColumnMenu(true).Render()
1016

1117
<script>
1218
document.getElementById('Undo').addEventListener('click', function (args) {
@@ -17,4 +23,4 @@
1723
var ganttObj = document.getElementById('Gantt').ej2_instances[0];
1824
ganttObj.redo();
1925
});
20-
</script>
26+
</script>

ej2-asp-core-mvc/code-snippet/gantt/undo-redo/retrieve/razor

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33

44
@Html.EJS().Button("GetRedoCollection").Content("Get Redo Collection").CssClass("e-primary").Render()
55

6-
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)ViewBag.DataSource).Height("450px").Toolbar(new List<string>()
7-
{ "Add", "Edit", "Update", "Delete", "Search", "ZoomIn", "ZoomOut", "ZoomToFit","Indent","Outdent",
8-
"PrevTimeSpan", "NextTimeSpan","Undo","Redo"}).EnableUndoRedo(true).UndoRedoActions(new List<string>() { "Sorting", "Add", "ColumnReorder", "ColumnResize", "ColumnState", "Delete", "Edit", "Filtering", "Indent", "Outdent", "NextTimeSpan", "PreviousTimeSpan", "RowDragAndDrop", "Search", "ZoomIn", "ZoomOut", "ZoomToFit" }).TaskFields(ts =>
9-
ts.Id("TaskId").Name("TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")
10-
).EditSettings(es=>es.AllowEditing(true).AllowAdding(true).AllowDeleting(true).AllowRowDragAndDrop(true).ShowColumnMenu(true)).Render()
6+
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)ViewBag.DataSource).
7+
Height("450px").
8+
Toolbar(new List<string>(){ "Add", "Edit", "Update", "Delete", "Search", "ZoomIn", "ZoomOut", "ZoomToFit",
9+
"Indent","Outdent","PrevTimeSpan", "NextTimeSpan","Undo","Redo"}).
10+
EnableUndoRedo(true).
11+
AllowRowDragAndDrop(true).
12+
UndoRedoActions(new List<string>() { "Sorting", "Add", "ColumnReorder", "ColumnResize", "ColumnState", "Delete",
13+
"Edit", "Filtering", "Indent", "Outdent", "NextTimeSpan", "PreviousTimeSpan", "RowDragAndDrop", "Search", "ZoomIn", "ZoomOut", "ZoomToFit" }).
14+
TaskFields(ts =>ts.Id("TaskId").Name("TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")).
15+
EditSettings(es=>es.AllowEditing(true).AllowAdding(true).AllowDeleting(true)).
16+
ShowColumnMenu(true).Render()
1117

1218
<script>
1319
document.getElementById('GetUndoCollection').addEventListener('click', function (args) {
@@ -18,4 +24,4 @@
1824
var ganttObj = document.getElementById('Gantt').ej2_instances[0];
1925
console.log(ganttObj.getRedoActions());
2026
});
21-
</script>
27+
</script>
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)ViewBag.DataSource).Height("450px").Toolbar(new List<string>()
2-
{ "Add", "Edit", "Update", "Delete", "Search", "ZoomIn", "ZoomOut", "ZoomToFit","Indent","Outdent",
3-
"PrevTimeSpan", "NextTimeSpan","Undo","Redo"}).UndoRedoStepsCount(5).EnableUndoRedo(true).UndoRedoActions(new List<string>() { "Sorting", "Add", "ColumnReorder", "ColumnResize", "ColumnState", "Delete", "Edit", "Filtering", "Indent", "Outdent", "NextTimeSpan", "PreviousTimeSpan", "RowDragAndDrop", "Search", "ZoomIn", "ZoomOut", "ZoomToFit" }).TaskFields(ts =>
4-
ts.Id("TaskId").Name("TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")
5-
).EditSettings(es=>es.AllowEditing(true).AllowAdding(true).AllowDeleting(true).AllowRowDragAndDrop(true).ShowColumnMenu(true)).Render()
1+
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)ViewBag.DataSource).
2+
Height("450px").
3+
Toolbar(new List<string>(){ "Add", "Edit", "Update", "Delete", "Search", "ZoomIn", "ZoomOut", "ZoomToFit",
4+
"Indent","Outdent","PrevTimeSpan", "NextTimeSpan","Undo","Redo"}).
5+
UndoRedoStepsCount(5).
6+
EnableUndoRedo(true).
7+
UndoRedoActions(new List<string>() { "Sorting", "Add", "ColumnReorder", "ColumnResize", "ColumnState", "Delete",
8+
"Edit", "Filtering", "Indent", "Outdent", "NextTimeSpan", "PreviousTimeSpan", "RowDragAndDrop", "Search", "ZoomIn", "ZoomOut", "ZoomToFit" }).
9+
TaskFields(ts =>ts.Id("TaskId").Name("TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")).
10+
EditSettings(es=>es.AllowEditing(true).AllowAdding(true).AllowDeleting(true)).
11+
AllowRowDragAndDrop(true).
12+
ShowColumnMenu(true).Render()
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)ViewBag.DataSource).Height("450px").Toolbar(new List<string>()
2-
{ "Add", "Edit", "Update", "Delete", "Search", "ZoomIn", "ZoomOut", "ZoomToFit","Indent","Outdent",
3-
"PrevTimeSpan", "NextTimeSpan","Undo","Redo"}).EnableUndoRedo(true).UndoRedoActions(new List<string>() { "Delete", "Edit" }).TaskFields(ts =>
4-
ts.Id("TaskId").Name("TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")
5-
).EditSettings(es=>es.AllowEditing(true).AllowAdding(true).AllowDeleting(true).AllowRowDragAndDrop(true).ShowColumnMenu(true)).Render()
1+
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)ViewBag.DataSource).
2+
Height("450px").
3+
Toolbar(new List<string>(){ "Add", "Edit", "Update", "Delete", "Search", "ZoomIn", "ZoomOut", "ZoomToFit",
4+
"Indent","Outdent","PrevTimeSpan", "NextTimeSpan","Undo","Redo"}).
5+
AllowRowDragAndDrop(true).
6+
UndoRedoActions(new List<string>() { "Delete", "Edit" }).
7+
EnableUndoRedo(true).
8+
TaskFields(ts =>ts.Id("TaskId").Name("TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")).
9+
EditSettings(es=>es.AllowEditing(true).AllowAdding(true).AllowDeleting(true)).
10+
ShowColumnMenu(true).Render()

0 commit comments

Comments
 (0)