Skip to content

Commit

Permalink
Move pages into PrivateMessagings folder. close #6
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlcf88 committed Mar 20, 2020
1 parent d35ae7e commit cae9518
Show file tree
Hide file tree
Showing 24 changed files with 43 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,12 @@
<Folder Include="wwwroot\" />
</ItemGroup>

<ItemGroup>
<_ContentIncludedByDefault Remove="Pages\PrivateMessages\PrivateMessage\CreateModal.cshtml" />
<_ContentIncludedByDefault Remove="Pages\PrivateMessages\PrivateMessage\DetailModal.cshtml" />
<_ContentIncludedByDefault Remove="Pages\PrivateMessages\PrivateMessage\Inbox.cshtml" />
<_ContentIncludedByDefault Remove="Pages\PrivateMessages\PrivateMessage\Outbox.cshtml" />
<_ContentIncludedByDefault Remove="Pages\Components\PmNotification\Default.cshtml" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
$(function() {
let pmService = easyAbp.privateMessaging.privateMessages.privateMessage;
let notificationService = easyAbp.privateMessaging.privateMessageNotifications.privateMessageNotification;
let detailModal = new abp.ModalManager(abp. appPath + 'PrivateMessages/PrivateMessage/DetailModal');
let detailModal = new abp.ModalManager(abp. appPath + 'PrivateMessaging/PrivateMessages/PrivateMessage/DetailModal');
var widgetManager = new abp.WidgetManager({filterForm: 'PmNotification'});

$(document.body).on('click', '#pmNotificationShowMore', function () {
document.location.href = "/PrivateMessages/PrivateMessage/Inbox"
document.location.href = "/PrivateMessaging/PrivateMessages/PrivateMessage/Inbox"
});

$(document.body).on('click', '#pmNotificationHideThese', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling;
using Volo.Abp.Modularity;

namespace EasyAbp.PrivateMessaging.Web.Pages.Components.PmNotification
namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.Components.PmNotification
{
[DependsOn(typeof(SharedThemeGlobalScriptContributor))]
public class PmNotificationScriptBundleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/Pages/Components/PmNotification/Default.js");
context.Files.AddIfNotContains("/Pages/PrivateMessaging/Components/PmNotification/Default.js");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling;
using Volo.Abp.Modularity;

namespace EasyAbp.PrivateMessaging.Web.Pages.Components.PmNotification
namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.Components.PmNotification
{
[DependsOn(typeof(SharedThemeGlobalStyleContributor))]
public class PmNotificationStyleBundleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/Pages/Components/PmNotification/Default.css");
context.Files.AddIfNotContains("/Pages/PrivateMessaging/Components/PmNotification/Default.css");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;

namespace EasyAbp.PrivateMessaging.Web.Pages.Components.PmNotification
namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.Components.PmNotification
{
[Widget(RefreshUrl = "/Widgets/PmNotification")]
[ViewComponent(Name = "PmNotification")]
public class PmNotificationViewComponent : AbpViewComponent
{
public virtual async Task<IViewComponentResult> InvokeAsync()
{
return View("~/Pages/Components/PmNotification/Default.cshtml");
return View("~/Pages/PrivateMessaging/Components/PmNotification/Default.cshtml");
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@page
@namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage
@inherits EasyAbp.PrivateMessaging.Web.Pages.PrivateMessagingPage
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage
@model CreateModalModel
@{
Layout = null;
}
<abp-dynamic-form abp-model="PrivateMessage" data-ajaxForm="true" asp-page="/PrivateMessages/PrivateMessage/CreateModal">
<abp-dynamic-form abp-model="PrivateMessage" data-ajaxForm="true" asp-page="/PrivateMessaging/PrivateMessages/PrivateMessage/CreateModal">
<abp-modal>
<abp-modal-header title="@L["CreatePrivateMessage"].Value"></abp-modal-header>
<abp-modal-body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using System.Threading.Tasks;
using EasyAbp.PrivateMessaging.PrivateMessages;
using EasyAbp.PrivateMessaging.PrivateMessages.Dtos;
using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage.InfoModels;
using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage.InfoModels;
using Microsoft.AspNetCore.Mvc;

namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage
namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage
{
public class CreateModalModel : PrivateMessagingPageModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$(function () {

var createModal = new abp.ModalManager(abp.appPath + 'PrivateMessages/PrivateMessage/CreateModal');
var createModal = new abp.ModalManager(abp.appPath + 'PrivateMessaging/PrivateMessages/PrivateMessage/CreateModal');
var dataTableElement = $('#PrivateMessageTable');
var widgetManager = new abp.WidgetManager({filterForm: 'PmNotification'});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@page
@inherits EasyAbp.PrivateMessaging.Web.Pages.PrivateMessagingPage
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage
@using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage
@model DetailModalModel
@{
Layout = null;
}

<abp-script src="/Pages/PrivateMessages/PrivateMessage/detail.js" />
<abp-script src="/Pages/PrivateMessaging/PrivateMessages/PrivateMessage/detail.js" />

<abp-dynamic-form abp-model="PrivateMessage" data-ajaxForm="true" asp-page="/PrivateMessages/PrivateMessage/DetailModal">
<abp-dynamic-form abp-model="PrivateMessage" data-ajaxForm="true" asp-page="/PrivateMessaging/PrivateMessages/PrivateMessage/DetailModal">
<abp-modal>
<abp-modal-header title="@L["PrivateMessage"].Value"></abp-modal-header>
<abp-modal-body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Threading.Tasks;
using EasyAbp.PrivateMessaging.PrivateMessages;
using EasyAbp.PrivateMessaging.PrivateMessages.Dtos;
using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage.InfoModels;
using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage.InfoModels;

namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage
namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage
{
public class DetailModalModel : PrivateMessagingPageModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@page
@using EasyAbp.PrivateMessaging.Authorization
@using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage
@using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage
@using Microsoft.AspNetCore.Authorization
@inherits EasyAbp.PrivateMessaging.Web.Pages.PrivateMessagingPage
@model InboxModel
@inject IAuthorizationService Authorization
@section scripts
{
<abp-script src="/Pages/PrivateMessages/PrivateMessage/inbox.js" />
<abp-script src="/Pages/PrivateMessaging/PrivateMessages/PrivateMessage/inbox.js" />
}
@section styles
{
<abp-style src="/Pages/PrivateMessages/PrivateMessage/common.css"/>
<abp-style src="/Pages/PrivateMessaging/PrivateMessages/PrivateMessage/common.css"/>
}

<abp-card>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Threading.Tasks;

namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage
namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage
{
public class InboxModel : PrivateMessagingPageModel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ $(function () {
var l = abp.localization.getResource('PrivateMessaging');

var service = easyAbp.privateMessaging.privateMessages.privateMessage;
var detailModal = new abp.ModalManager(abp.appPath + 'PrivateMessages/PrivateMessage/DetailModal');
var createModal = new abp.ModalManager(abp.appPath + 'PrivateMessages/PrivateMessage/CreateModal');
var detailModal = new abp.ModalManager(abp.appPath + 'PrivateMessaging/PrivateMessages/PrivateMessage/DetailModal');
var createModal = new abp.ModalManager(abp.appPath + 'PrivateMessaging/PrivateMessages/PrivateMessage/CreateModal');
var widgetManager = new abp.WidgetManager({filterForm: 'PmNotification'});

var dataTable = $('#PrivateMessageTable').DataTable(abp.libs.datatables.normalizeConfiguration({
Expand Down Expand Up @@ -79,19 +79,8 @@ $(function () {
}

createModal.onResult(function () {
console.log(123);
widgetManager.refresh();
console.log(456);
dataTable.ajax.reload();
console.log(789);
});

detailModal.onClose(function (event, response) {
console.log(event);
console.log(response);
// _newTenantInformationModal.open({
// managerPassword: response.responseText
// });
});

$('#OutboxButton').click(function (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using EasyAbp.PrivateMessaging.PrivateMessages;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;

namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage.InfoModels
namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage.InfoModels
{
public class CreatePrivateMessageInfoModel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;

namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage.InfoModels
namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage.InfoModels
{
public class PrivateMessageInfoModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@page
@using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage
@using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage
@inherits EasyAbp.PrivateMessaging.Web.Pages.PrivateMessagingPage
@model OutboxModel

@section scripts
{
<abp-script src="/Pages/PrivateMessages/PrivateMessage/outbox.js" />
<abp-script src="/Pages/PrivateMessaging/PrivateMessages/PrivateMessage/outbox.js" />
}
@section styles
{
<abp-style src="/Pages/PrivateMessages/PrivateMessage/common.css"/>
<abp-style src="/Pages/PrivateMessaging/PrivateMessages/PrivateMessage/common.css"/>
}

<abp-card>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Threading.Tasks;

namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage
namespace EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage
{
public class OutboxModel : PrivateMessagingPageModel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ $(function () {
var l = abp.localization.getResource('PrivateMessaging');

var service = easyAbp.privateMessaging.privateMessages.privateMessage;
var detailModal = new abp.ModalManager(abp.appPath + 'PrivateMessages/PrivateMessage/DetailModal');
var createModal = new abp.ModalManager(abp.appPath + 'PrivateMessages/PrivateMessage/CreateModal');
var detailModal = new abp.ModalManager(abp.appPath + 'PrivateMessaging/PrivateMessages/PrivateMessage/DetailModal');
var createModal = new abp.ModalManager(abp.appPath + 'PrivateMessaging/PrivateMessages/PrivateMessage/CreateModal');
var widgetManager = new abp.WidgetManager({filterForm: 'PmNotification'});

var dataTable = $('#PrivateMessageTable').DataTable(abp.libs.datatables.normalizeConfiguration({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using EasyAbp.PrivateMessaging.Authorization;
using EasyAbp.PrivateMessaging.Web.Pages.Components.PmNotification;
using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.Components.PmNotification;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using EasyAbp.PrivateMessaging.PrivateMessages.Dtos;
using AutoMapper;
using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessages.PrivateMessage.InfoModels;
using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.PrivateMessages.PrivateMessage.InfoModels;

namespace EasyAbp.PrivateMessaging.Web
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.DependencyInjection;
using EasyAbp.PrivateMessaging.Localization;
using EasyAbp.PrivateMessaging.Web.Pages.Components.PmNotification;
using EasyAbp.PrivateMessaging.Web.Pages.PrivateMessaging.Components.PmNotification;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
Expand Down

0 comments on commit cae9518

Please sign in to comment.