pull/441/head
Halil ibrahim Kalkan 6 years ago
commit dca52a6c29

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

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

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

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

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

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

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

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

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

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

@ -129,13 +129,13 @@
</p>
<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"]
</a>
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete))
{
<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"]
</a>
}
@ -143,7 +143,7 @@
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId))
{
<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"]
</a>
}

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

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

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

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

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

Loading…
Cancel
Save