Browse Source

Merge pull request #17080 from abpframework/auto-merge/rel-7-3/2063

Merge branch dev with rel-7.3
pull/17099/head
Engincan VESKE 3 years ago
committed by GitHub
parent
commit
b79ead8e4b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      docs/en/UI/AspNetCore/Page-Header.md
  2. 33
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js
  3. 8
      modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js
  4. 12
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/index.js
  5. 6
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/index.js
  6. 6
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/details.js
  7. 6
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/index.js
  8. 6
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/index.js
  9. 6
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.js
  10. 8
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Documents/index.js
  11. 8
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js
  12. 6
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js
  13. 6
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js
  14. 6
      modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js

10
docs/en/UI/AspNetCore/Page-Header.md

@ -10,12 +10,12 @@
Page Title can be set as shown in the example below:
````csharp
```csharp
@inject IPageLayout PageLayout
@{
PageLayout.Content.Title = "Book List";
}
````
```
* The Page Title is set to the HTML `title` tag (in addition to the [brand/application name](Branding.md)).
* The theme may render the Page Title before the Page Content (not implemented by the Basic Theme).
@ -30,9 +30,9 @@ Breadcrumb items can be added to the `PageLayout.Content.BreadCrumb`.
**Example: Add Language Management to the breadcrumb items.**
````
```
PageLayout.Content.BreadCrumb.Add("Language Management");
````
```
The theme then renders the breadcrumb. An example render result can be:
@ -59,4 +59,4 @@ You can set the Menu Item name related to this page:
PageLayout.Content.MenuItemName = "BookStore.Books";
```
Menu item name should match a unique menu item name defined using the [Navigation / Menu](Navigation-Menu.md) system. In this case, it is expected from the theme to make the menu item "active" in the main menu.
Menu item name should match a unique menu item name defined using the [Navigation / Menu](Navigation-Menu.md) system. In this case, it is expected from the theme to make the menu item "active" in the main menu.

33
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js

@ -72,7 +72,7 @@ var abp = abp || {};
};
var _createButtonDropdown = function (record, field, tableInstance) {
if(field.items.length === 1) {
if (field.items.length === 1) {
var firstItem = field.items[0];
if (!getVisibilityValue(firstItem.visible, record, tableInstance)) {
return "";
@ -174,7 +174,7 @@ var abp = abp || {};
$dropdownButton.prependTo($container);
if(bootstrap){
if (bootstrap) {
new bootstrap.Dropdown($dropdownButton, {
popperConfig(defaultBsPopperConfig) {
defaultBsPopperConfig.strategy = "fixed";
@ -329,6 +329,19 @@ var abp = abp || {};
}
});
$.fn.dataTable.Api.register('ajax.reloadEx()', function (callback, resetPaging) {
var table = this;
if (callback || resetPaging) {
table.ajax.reload(callback, resetPaging);
return;
}
table.ajax.reload(function (data) {
if (data.data.length <= 0 && table.page.info().pages > 0) {
table.page(table.page.info().pages - 1).draw(false);
}
}, false);
});
})();
/************************************************************************
@ -336,7 +349,7 @@ var abp = abp || {};
*************************************************************************/
(function () {
datatables.createAjax = function (serverMethod, inputAction, responseCallback, cancelPreviousRequest) {
responseCallback = responseCallback || function(result) {
responseCallback = responseCallback || function (result) {
return {
recordsTotal: result.totalCount,
recordsFiltered: result.totalCount,
@ -374,7 +387,7 @@ var abp = abp || {};
}
//Text filter
if(settings.oInit.searching !== false){
if (settings.oInit.searching !== false) {
if (requestData.search && requestData.search.value !== "") {
input.filter = requestData.search.value;
} else {
@ -383,7 +396,7 @@ var abp = abp || {};
}
if (callback) {
if(cancelPreviousRequest && promise && promise.jqXHR) {
if (cancelPreviousRequest && promise && promise.jqXHR) {
promise.jqXHR.abort();
}
promise = serverMethod(input);
@ -440,7 +453,7 @@ var abp = abp || {};
configuration.language = datatables.defaultConfigurations.language();
if(!configuration.dom){
if (!configuration.dom) {
configuration.dom = datatables.defaultConfigurations.dom;
}
@ -454,7 +467,7 @@ var abp = abp || {};
datatables.defaultRenderers = datatables.defaultRenderers || {};
datatables.defaultRenderers['boolean'] = function(value) {
datatables.defaultRenderers['boolean'] = function (value) {
if (value) {
return '<i class="fa fa-check"></i>';
} else {
@ -463,7 +476,7 @@ var abp = abp || {};
};
var ISOStringToDateTimeLocaleString = function (format) {
return function(data) {
return function (data) {
var date = luxon
.DateTime
.fromISO(data, {
@ -474,7 +487,7 @@ var abp = abp || {};
};
datatables.defaultRenderers['date'] = function (value) {
if(!value) {
if (!value) {
return value;
} else {
return (ISOStringToDateTimeLocaleString())(value);
@ -482,7 +495,7 @@ var abp = abp || {};
};
datatables.defaultRenderers['datetime'] = function (value) {
if(!value) {
if (!value) {
return value;
} else {
return (ISOStringToDateTimeLocaleString(luxon.DateTime.DATETIME_SHORT))(value);

8
modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/index.js

@ -48,7 +48,7 @@ $(function () {
volo.blogging.admin.blogManagement
.delete(data.record.id)
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyDeleted'));
});
},
@ -65,7 +65,7 @@ $(function () {
volo.blogging.admin.blogManagement
.clearCache(data.record.id)
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
})
}
}
@ -98,10 +98,10 @@ $(function () {
});
_createModal.onClose(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
_editModal.onResult(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
});

12
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/index.js

@ -58,7 +58,7 @@ $(function () {
blogsService
.publish(data.record.id)
.then(function () {
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyPublished'));
checkHasBlogPostWaitingForReview();
});
@ -77,7 +77,7 @@ $(function () {
blogsService
.sendToReview(data.record.id)
.then(function () {
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
abp.notify.success(l('BlogPostSendToReviewSuccessMessage', data.record.title));
});
}
@ -94,7 +94,7 @@ $(function () {
blogsService
.draft(data.record.id)
.then(function () {
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullySaved'));
checkHasBlogPostWaitingForReview();
});
@ -110,7 +110,7 @@ $(function () {
blogsService
.delete(data.record.id)
.then(function () {
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyDeleted'));
});
}
@ -152,7 +152,7 @@ $(function () {
$('#CmsKitBlogPostsWrapper form.page-search-form').submit(function (e) {
e.preventDefault();
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
});
$('#AbpContentToolbar button[name=CreateBlogPost]').on('click', function (e) {
@ -163,7 +163,7 @@ $(function () {
$('#button-show-waiting-for-review').on('click', function (e) {
e.preventDefault();
$statusFilter.val(blogPostStatus.SendToReview);
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
});
function checkHasBlogPostWaitingForReview(){

6
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/index.js

@ -48,7 +48,7 @@ $(function () {
blogsService
.delete(data.record.id)
.then(function () {
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyDeleted'));
});
}
@ -75,10 +75,10 @@ $(function () {
});
createModal.onResult(function () {
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
});
updateModal.onResult(function () {
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
});
});

6
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/details.js

@ -74,7 +74,7 @@ $(function (){
commentsService
.delete(data.record.id)
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyDeleted'));
});
}
@ -137,11 +137,11 @@ $(function (){
$(inputSelector).val(value);
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
filterForm.submit(function (e){
e.preventDefault();
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
});

6
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/index.js

@ -82,7 +82,7 @@ $(function (){
commentsService
.delete(data.record.id)
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyDeleted'));
});
}
@ -167,11 +167,11 @@ $(function (){
$(inputSelector).val(value);
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
filterForm.submit(function (e){
e.preventDefault();
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
});

6
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/index.js

@ -42,7 +42,7 @@ $(function () {
pagesService
.delete(data.record.id)
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyDeleted'));
});
}
@ -55,7 +55,7 @@ $(function () {
.setAsHomePage(data.record.id)
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
data.record.isHomePage ?
abp.notify.warn(l('RemovedSettingAsHomePage'))
: abp.notify.success(l('CompletedSettingAsHomePage'));
@ -97,7 +97,7 @@ $(function () {
$('#CmsKitPagesWrapper form.page-search-form').submit(function (e) {
e.preventDefault();
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
$('#AbpContentToolbar button[name=CreatePage]').on('click', function (e) {

6
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.js

@ -63,7 +63,7 @@ $(function () {
$('#CmsKitTagsWrapper form.page-search-form').on('submit', function (e) {
e.preventDefault();
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
});
$('#AbpContentToolbar button[name=NewButton]').on('click', function (e) {
@ -72,10 +72,10 @@ $(function () {
});
createModal.onResult(function () {
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
});
updateModal.onResult(function () {
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
});
});

8
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Documents/index.js

@ -182,7 +182,7 @@ $(function () {
.removeFromCache(data.record.id)
.then(function () {
abp.notify.success(l('RemovedFromCache'));
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
});
},
},
@ -200,7 +200,7 @@ $(function () {
.reindex(data.record.id)
.then(function () {
abp.message.success(l('ReindexCompleted'));
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
});
},
}
@ -281,13 +281,13 @@ $(function () {
$("#FilterForm input[type='text']").keypress(function (e) {
if (e.which === 13) {
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
}
});
$('#SearchButton').click(function (e) {
e.preventDefault();
dataTable.ajax.reload();
dataTable.ajax.reloadEx();
});
$("#AdvancedFilterSectionToggler").click(function (e) {

8
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js

@ -56,7 +56,7 @@ $(function () {
volo.docs.admin.projectsAdmin
.delete(data.record.id)
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyDeleted'));
});
},
@ -89,7 +89,7 @@ $(function () {
projectId: data.record.id,
})
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
},
},
@ -168,10 +168,10 @@ $(function () {
});
_createModal.onClose(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
_editModal.onResult(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
});

6
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js

@ -62,7 +62,7 @@
_identityRoleAppService
.delete(data.record.id)
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyDeleted'));
});
},
@ -128,11 +128,11 @@
);
_createModal.onResult(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
_editModal.onResult(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
$('#AbpContentToolbar button[name=CreateRole]').click(function (e) {

6
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js

@ -96,7 +96,7 @@
_identityUserAppService
.delete(data.record.id)
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyDeleted'));
});
},
@ -163,11 +163,11 @@
);
_createModal.onResult(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
_editModal.onResult(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
$('#AbpContentToolbar button[name=CreateUser]').click(function (e) {

6
modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js

@ -56,7 +56,7 @@
_tenantAppService
.delete(data.record.id)
.then(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
abp.notify.success(l('SuccessfullyDeleted'));
});
},
@ -102,11 +102,11 @@
);
_createModal.onResult(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
_editModal.onResult(function () {
_dataTable.ajax.reload();
_dataTable.ajax.reloadEx();
});
$('#AbpContentToolbar button[name=CreateTenant]').click(function (e) {

Loading…
Cancel
Save