Skip to content

Commit

Permalink
2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bantikyan committed Apr 15, 2018
1 parent 8d3d328 commit 41fbe51
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 20 deletions.
2 changes: 1 addition & 1 deletion dist/css/tablelist-mvc.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*TableList.Mvc 2.0.3*/
/*TableList.Mvc 2.0.4*/
.table.table-list-mvc > tbody > tr > td,
.table-list-mvc td {
vertical-align: middle;
Expand Down
4 changes: 2 additions & 2 deletions dist/js/tablelist-mvc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*TableList.Mvc 2.0.3*/
/*TableList.Mvc 2.0.4*/
$(function () {
initTableList();

Expand Down Expand Up @@ -27,7 +27,7 @@ function initTableList() {

$(form).submit(function (e) {
if ($(this).valid()) {
var trs = $(this).find(".table-list-mvc > tbody > tr.table-list-mvc-item-new:last");
var trs = $(this).find(".table-list-mvc > tbody > tr.table-list-mvc-item-new");
$(trs).each(function () {
$(this).remove();
});
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tablelist-mvc.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/TableList.Example.Mvc/Content/tablelist-mvc.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*TableList.Mvc 2.0.3*/
/*TableList.Mvc 2.0.4*/
.table.table-list-mvc > tbody > tr > td,
.table-list-mvc td {
vertical-align: middle;
Expand Down
6 changes: 0 additions & 6 deletions examples/TableList.Example.Mvc/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ public ActionResult Index()
new ProductBlockPrice { Initial = 600, CountFrom = 30 },
new ProductBlockPrice { Initial = 400, CountFrom = 10, Default = true }
}
//Options = new List<InnerModel>
// {
// new InnerModel { ID = 1, FirstName = "item1", LastName = "last1", TL_AllowDelete = false },
// new InnerModel { ID = 2, FirstName = "item2", LastName = "last2", TL_AllowModify = false },
// new InnerModel { ID = 3, FirstName = "item3", LastName = "last3", BirthDate = new DateTime(1988, 11, 30) },
// },
};

return View(model);
Expand Down
11 changes: 11 additions & 0 deletions examples/TableList.Example.Mvc/Models/ProductModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class ProductModel
public decimal Initial { get; set; }

public List<ProductBlockPrice> BlockPrices { get; set; }
public List<Option> Options { get; set; }
}

[Serializable]
Expand Down Expand Up @@ -56,4 +57,14 @@ public class ProductBlockPrice : TableListItem
[TableListRadioButton]
public bool Default { get; set; }
}

[Serializable]
public class Option : TableListItem
{
[TableListHiddenInput]
public int ID { get; set; }

[Required]
public string Name { get; set; }
}
}
4 changes: 2 additions & 2 deletions examples/TableList.Example.Mvc/Scripts/tablelist-mvc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*TableList.Mvc 2.0.3*/
/*TableList.Mvc 2.0.4*/
$(function () {
initTableList();

Expand Down Expand Up @@ -27,7 +27,7 @@ function initTableList() {

$(form).submit(function (e) {
if ($(this).valid()) {
var trs = $(this).find(".table-list-mvc > tbody > tr.table-list-mvc-item-new:last");
var trs = $(this).find(".table-list-mvc > tbody > tr.table-list-mvc-item-new");
$(trs).each(function () {
$(this).remove();
});
Expand Down
Loading

0 comments on commit 41fbe51

Please sign in to comment.