|
|
|
@ -207,47 +207,51 @@ $(function () { |
|
|
|
|
|
|
|
var dataTable = $('#BooksTable').DataTable( |
|
|
|
abp.libs.datatables.normalizeConfiguration({ |
|
|
|
ajax: abp.libs.datatables.createAjax(acme.bookStore.books.book.getList), |
|
|
|
columnDefs: [ |
|
|
|
{ |
|
|
|
title: l('Name'), |
|
|
|
data: "name" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Type'), |
|
|
|
data: "type", |
|
|
|
render: function (data) { |
|
|
|
return l('Enum:BookType:' + data); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('PublishDate'), |
|
|
|
data: "publishDate", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Price'), |
|
|
|
data: "price" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('CreationTime'), data: "creationTime", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(luxon.DateTime.DATETIME_SHORT); |
|
|
|
} |
|
|
|
serverSide: true, |
|
|
|
paging: true, |
|
|
|
order: [[1, "asc"]], |
|
|
|
searching: false, |
|
|
|
scrollX: true, |
|
|
|
ajax: abp.libs.datatables.createAjax(acme.bookStore.books.book.getList), |
|
|
|
columnDefs: [ |
|
|
|
{ |
|
|
|
title: l('Name'), |
|
|
|
data: "name" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Type'), |
|
|
|
data: "type", |
|
|
|
render: function (data) { |
|
|
|
return l('Enum:BookType:' + data); |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
) |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('PublishDate'), |
|
|
|
data: "publishDate", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Price'), |
|
|
|
data: "price" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('CreationTime'), data: "creationTime", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(luxon.DateTime.DATETIME_SHORT); |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}) |
|
|
|
); |
|
|
|
|
|
|
|
var createModal = new abp.ModalManager(abp.appPath + 'Books/CreateModal'); |
|
|
|
@ -260,7 +264,6 @@ $(function () { |
|
|
|
e.preventDefault(); |
|
|
|
createModal.open(); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
```` |
|
|
|
|
|
|
|
@ -388,61 +391,65 @@ $(function () { |
|
|
|
|
|
|
|
var dataTable = $('#BooksTable').DataTable( |
|
|
|
abp.libs.datatables.normalizeConfiguration({ |
|
|
|
ajax: abp.libs.datatables.createAjax(acme.bookStore.books.book.getList), |
|
|
|
columnDefs: [ |
|
|
|
{ |
|
|
|
title: l('Actions'), |
|
|
|
rowAction: { |
|
|
|
items: |
|
|
|
[ |
|
|
|
{ |
|
|
|
text: l('Edit'), |
|
|
|
action: function (data) { |
|
|
|
editModal.open({ id: data.record.id }); |
|
|
|
} |
|
|
|
serverSide: true, |
|
|
|
paging: true, |
|
|
|
order: [[1, "asc"]], |
|
|
|
searching: false, |
|
|
|
scrollX: true, |
|
|
|
ajax: abp.libs.datatables.createAjax(acme.bookStore.books.book.getList), |
|
|
|
columnDefs: [ |
|
|
|
{ |
|
|
|
title: l('Actions'), |
|
|
|
rowAction: { |
|
|
|
items: |
|
|
|
[ |
|
|
|
{ |
|
|
|
text: l('Edit'), |
|
|
|
action: function (data) { |
|
|
|
editModal.open({ id: data.record.id }); |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Name'), |
|
|
|
data: "name" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Type'), |
|
|
|
data: "type", |
|
|
|
render: function (data) { |
|
|
|
return l('Enum:BookType:' + data); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('PublishDate'), |
|
|
|
data: "publishDate", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Price'), |
|
|
|
data: "price" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('CreationTime'), data: "creationTime", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(luxon.DateTime.DATETIME_SHORT); |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Name'), |
|
|
|
data: "name" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Type'), |
|
|
|
data: "type", |
|
|
|
render: function (data) { |
|
|
|
return l('Enum:BookType:' + data); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('PublishDate'), |
|
|
|
data: "publishDate", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(); |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
) |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Price'), |
|
|
|
data: "price" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('CreationTime'), data: "creationTime", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(luxon.DateTime.DATETIME_SHORT); |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}) |
|
|
|
); |
|
|
|
|
|
|
|
createModal.onResult(function () { |
|
|
|
@ -513,80 +520,84 @@ $(function () { |
|
|
|
|
|
|
|
var dataTable = $('#BooksTable').DataTable( |
|
|
|
abp.libs.datatables.normalizeConfiguration({ |
|
|
|
ajax: abp.libs.datatables.createAjax(acme.bookStore.books.book.getList), |
|
|
|
columnDefs: [ |
|
|
|
{ |
|
|
|
title: l('Actions'), |
|
|
|
rowAction: { |
|
|
|
items: |
|
|
|
[ |
|
|
|
{ |
|
|
|
text: l('Edit'), |
|
|
|
action: function (data) { |
|
|
|
editModal.open({ id: data.record.id }); |
|
|
|
} |
|
|
|
serverSide: true, |
|
|
|
paging: true, |
|
|
|
order: [[1, "asc"]], |
|
|
|
searching: false, |
|
|
|
scrollX: true, |
|
|
|
ajax: abp.libs.datatables.createAjax(acme.bookStore.books.book.getList), |
|
|
|
columnDefs: [ |
|
|
|
{ |
|
|
|
title: l('Actions'), |
|
|
|
rowAction: { |
|
|
|
items: |
|
|
|
[ |
|
|
|
{ |
|
|
|
text: l('Edit'), |
|
|
|
action: function (data) { |
|
|
|
editModal.open({ id: data.record.id }); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: l('Delete'), |
|
|
|
confirmMessage: function (data) { |
|
|
|
return l( |
|
|
|
'BookDeletionConfirmationMessage', |
|
|
|
data.record.name |
|
|
|
); |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: l('Delete'), |
|
|
|
confirmMessage: function (data) { |
|
|
|
return l( |
|
|
|
'BookDeletionConfirmationMessage', |
|
|
|
data.record.name |
|
|
|
); |
|
|
|
}, |
|
|
|
action: function (data) { |
|
|
|
acme.bookStore.books.book |
|
|
|
.delete(data.record.id) |
|
|
|
.then(function() { |
|
|
|
abp.notify.info( |
|
|
|
l('SuccessfullyDeleted') |
|
|
|
); |
|
|
|
dataTable.ajax.reload(); |
|
|
|
}); |
|
|
|
} |
|
|
|
action: function (data) { |
|
|
|
acme.bookStore.books.book |
|
|
|
.delete(data.record.id) |
|
|
|
.then(function() { |
|
|
|
abp.notify.info( |
|
|
|
l('SuccessfullyDeleted') |
|
|
|
); |
|
|
|
dataTable.ajax.reload(); |
|
|
|
}); |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Name'), |
|
|
|
data: "name" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Type'), |
|
|
|
data: "type", |
|
|
|
render: function (data) { |
|
|
|
return l('Enum:BookType:' + data); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('PublishDate'), |
|
|
|
data: "publishDate", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Price'), |
|
|
|
data: "price" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('CreationTime'), data: "creationTime", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(luxon.DateTime.DATETIME_SHORT); |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Name'), |
|
|
|
data: "name" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Type'), |
|
|
|
data: "type", |
|
|
|
render: function (data) { |
|
|
|
return l('Enum:BookType:' + data); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('PublishDate'), |
|
|
|
data: "publishDate", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('Price'), |
|
|
|
data: "price" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: l('CreationTime'), data: "creationTime", |
|
|
|
render: function (data) { |
|
|
|
return luxon |
|
|
|
.DateTime |
|
|
|
.fromISO(data, { |
|
|
|
locale: abp.localization.currentCulture.name |
|
|
|
}).toLocaleString(luxon.DateTime.DATETIME_SHORT); |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
|
] |
|
|
|
}) |
|
|
|
); |
|
|
|
|
|
|
|
createModal.onResult(function () { |
|
|
|
|