Browse Source

Merge branch 'master' of https://github.com/volosoft/abp

pull/441/head
Halil ibrahim Kalkan 8 years ago
parent
commit
dca52a6c29
  1. 5
      modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/BloggingTestAppEntityFrameworkCoreModule.cs
  2. 2
      modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs
  3. 2
      modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingApplicationContractsModule.cs
  4. 2
      modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationModule.cs
  5. 2
      modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/BloggingDomainSharedModule.cs
  6. 5
      modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainModule.cs
  7. 2
      modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreModule.cs
  8. 5
      modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs
  9. 5
      modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BloggingHttpApiModule.cs
  10. 2
      modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs
  11. 6
      modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml
  12. 63
      modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/detail.js
  13. 2
      modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/BloggingApplicationTestModule.cs
  14. 2
      modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreTestModule.cs
  15. 4
      modules/blogging/test/Volo.Blogging.TestBase/Volo/Blogging/BloggingTestBaseModule.cs
  16. 3
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js

5
modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/BloggingTestAppEntityFrameworkCoreModule.cs

@ -16,9 +16,6 @@ namespace Volo.BloggingTestApp.EntityFrameworkCore
typeof(AbpEntityFrameworkCoreSqlServerModule))] typeof(AbpEntityFrameworkCoreSqlServerModule))]
public class BloggingTestAppEntityFrameworkCoreModule : AbpModule public class BloggingTestAppEntityFrameworkCoreModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAssemblyOf<BloggingTestAppEntityFrameworkCoreModule>();
}
} }
} }

2
modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs

@ -92,8 +92,6 @@ namespace Volo.BloggingTestApp
{ {
options.DefaultThemeName = BasicTheme.Name; options.DefaultThemeName = BasicTheme.Name;
}); });
context.Services.AddAssemblyOf<BloggingTestAppModule>();
} }
public override void OnApplicationInitialization(ApplicationInitializationContext context) public override void OnApplicationInitialization(ApplicationInitializationContext context)

2
modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingApplicationContractsModule.cs

@ -13,8 +13,6 @@ namespace Volo.Blogging
{ {
options.DefinitionProviders.Add<BloggingPermissionDefinitionProvider>(); options.DefinitionProviders.Add<BloggingPermissionDefinitionProvider>();
}); });
context.Services.AddAssemblyOf<BloggingApplicationContractsModule>();
} }
} }
} }

2
modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationModule.cs

@ -18,8 +18,6 @@ namespace Volo.Blogging
{ {
options.AddProfile<BloggingApplicationAutoMapperProfile>(validate: true); options.AddProfile<BloggingApplicationAutoMapperProfile>(validate: true);
}); });
context.Services.AddAssemblyOf<BloggingApplicationModule>();
} }
} }
} }

2
modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/BloggingDomainSharedModule.cs

@ -14,8 +14,6 @@ namespace Volo.Blogging
{ {
options.Resources.Add<BloggingResource>("en"); options.Resources.Add<BloggingResource>("en");
}); });
context.Services.AddAssemblyOf<BloggingDomainSharedModule>();
} }
} }
} }

5
modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainModule.cs

@ -9,9 +9,6 @@ namespace Volo.Blogging
typeof(AbpDddDomainModule))] typeof(AbpDddDomainModule))]
public class BloggingDomainModule : AbpModule public class BloggingDomainModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAssemblyOf<BloggingDomainModule>();
}
} }
} }

2
modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreModule.cs

@ -12,8 +12,6 @@ namespace Volo.Blogging.EntityFrameworkCore
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
context.Services.AddAbpDbContext<BloggingDbContext>(); context.Services.AddAbpDbContext<BloggingDbContext>();
context.Services.AddAssemblyOf<BloggingEntityFrameworkCoreModule>();
} }
} }
} }

5
modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs

@ -7,9 +7,6 @@ namespace Volo.Blogging
typeof(BloggingApplicationContractsModule))] typeof(BloggingApplicationContractsModule))]
public class BloggingHttpApiClientModule : AbpModule public class BloggingHttpApiClientModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAssemblyOf<BloggingHttpApiClientModule>();
}
} }
} }

5
modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BloggingHttpApiModule.cs

@ -7,9 +7,6 @@ namespace Volo.Blogging
typeof(BloggingApplicationContractsModule))] typeof(BloggingApplicationContractsModule))]
public class BloggingHttpApiModule : AbpModule public class BloggingHttpApiModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAssemblyOf<BloggingHttpApiModule>();
}
} }
} }

2
modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs

@ -62,8 +62,6 @@ namespace Volo.Blogging
options.Conventions.AddPageRoute("/Blog/Posts/Edit", "blog/{blogShortName}/posts/edit/{postId}"); options.Conventions.AddPageRoute("/Blog/Posts/Edit", "blog/{blogShortName}/posts/edit/{postId}");
options.Conventions.AddPageRoute("/Blog/Posts/New", "blog/{blogShortName}/posts/new"); options.Conventions.AddPageRoute("/Blog/Posts/New", "blog/{blogShortName}/posts/new");
}); });
context.Services.AddAssemblyOf<BloggingWebModule>();
} }
} }
} }

6
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml

@ -129,13 +129,13 @@
</p> </p>
<div class="comment-buttons"> <div class="comment-buttons">
<a href="#" class="tag" data-relpyid="@commentWithRepliesDto.Comment.Id"> <a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"] <i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"]
</a> </a>
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete)) @if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete))
{ {
<span class="seperator">|</span> <span class="seperator">|</span>
<a href="#" class="tag" data-deleteid="@commentWithRepliesDto.Comment.Id"> <a href="#" class="tag deleteLink" data-deleteid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"] <i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"]
</a> </a>
} }
@ -143,7 +143,7 @@
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) @if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{ {
<span class="seperator">|</span> <span class="seperator">|</span>
<a href="#" class="tag" data-updateid="@commentWithRepliesDto.Comment.Id"> <a href="#" class="tag updateLink" data-updateid="@commentWithRepliesDto.Comment.Id">
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"] <i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"]
</a> </a>
} }

63
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/detail.js

@ -6,7 +6,7 @@
$('form[class="editFormClass"]').submit(function (event) { $('form[class="editFormClass"]').submit(function (event) {
event.preventDefault(); event.preventDefault();
var form = $(this).serializeFormToObject(); var form = $(this).serializeFormToObject();
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/Blog/Comments/Update", url: "/Blog/Comments/Update",
@ -23,15 +23,13 @@
}); });
}); });
$('a').click(function (event) { $('.replyLink').click(function (event) {
event.preventDefault();
var linkElement = $(this); var linkElement = $(this);
var data = linkElement.attr('data-relpyid'); var replyCommentId = linkElement.attr('data-relpyid');
if (data != '' && data !== undefined) {
event.preventDefault();
var div = $(this).parent().next(); if (replyCommentId != '' && replyCommentId !== undefined) {
var div = linkElement.parent().next();
if (div.is(":hidden")) { if (div.is(":hidden")) {
$('div .replyForm').hide(); $('div .replyForm').hide();
@ -41,30 +39,41 @@
} }
return; return;
} }
});
data = $(this).attr('data-deleteid'); $('.deleteLink').click(function(event) {
event.preventDefault();
if (data != '' && data !== undefined) { var linkElement = $(this);
var deleteCommentId = linkElement.attr('data-deleteid');
event.preventDefault();
if (deleteCommentId != '' && deleteCommentId !== undefined) {
$.ajax({ abp.message.confirm(
type: "POST", 'Comment will be deleted.', // TODO: localize
url: "/Blog/Comments/Delete", 'Are you sure?',
data: { id: data }, function(isConfirmed) {
success: function (response) { if (isConfirmed) {
linkElement.parent().parent().parent().remove(); $.ajax({
type: "POST",
url: "/Blog/Comments/Delete",
data: { id: deleteCommentId },
success: function (response) {
linkElement.parent().parent().parent().remove();
}
});
}
} }
}); );
} }
});
data = $(this).attr('data-updateid'); $('.updateLink').click(function (event) {
event.preventDefault();
if (data != '' && data !== undefined) { var linkElement = $(this);
var updateCommentId = $(this).attr('data-updateid');
event.preventDefault(); if (updateCommentId != '' && updateCommentId !== undefined) {
var div = $(this).parent().next().next(); var div = linkElement.parent().next().next();
if (div.is(":hidden")) { if (div.is(":hidden")) {
$('div .editForm').hide(); $('div .editForm').hide();
@ -74,8 +83,6 @@
} }
return; return;
} }
}); });
})(jQuery); })(jQuery);

2
modules/blogging/test/Volo.Blogging.Application.Tests/Volo/Blogging/BloggingApplicationTestModule.cs

@ -13,8 +13,6 @@ namespace Volo.Blogging
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
context.Services.AddAlwaysAllowAuthorization(); context.Services.AddAlwaysAllowAuthorization();
context.Services.AddAssemblyOf<BloggingApplicationTestModule>();
} }
} }
} }

2
modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreTestModule.cs

@ -28,8 +28,6 @@ namespace Volo.Blogging.EntityFrameworkCore
abpDbContextConfigurationContext.DbContextOptions.UseSqlite(_sqliteConnection); abpDbContextConfigurationContext.DbContextOptions.UseSqlite(_sqliteConnection);
}); });
}); });
context.Services.AddAssemblyOf<BloggingEntityFrameworkCoreTestModule>();
} }
private static SqliteConnection CreateDatabaseAndGetConnection() private static SqliteConnection CreateDatabaseAndGetConnection()

4
modules/blogging/test/Volo.Blogging.TestBase/Volo/Blogging/BloggingTestBaseModule.cs

@ -12,10 +12,6 @@ namespace Volo.Blogging
)] )]
public class BloggingTestBaseModule : AbpModule public class BloggingTestBaseModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAssemblyOf<BloggingTestBaseModule>();
}
public override void OnApplicationInitialization(ApplicationInitializationContext context) public override void OnApplicationInitialization(ApplicationInitializationContext context)
{ {

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

@ -13,6 +13,9 @@
var _$table = _$wrapper.find('table'); var _$table = _$wrapper.find('table');
var _dataTable = _$table.DataTable(abp.libs.datatables.normalizeConfiguration({ var _dataTable = _$table.DataTable(abp.libs.datatables.normalizeConfiguration({
order: [[1, "asc"]], order: [[1, "asc"]],
processing: true,
serverSide: true,
paging: true,
ajax: abp.libs.datatables.createAjax(_identityUserAppService.getList), ajax: abp.libs.datatables.createAjax(_identityUserAppService.getList),
columnDefs: [ columnDefs: [
{ {

Loading…
Cancel
Save