Browse Source

Added a simple TODO page via vue.js.

pull/179/head
Halil İbrahim Kalkan 9 years ago
parent
commit
134faa5a36
  1. 3
      src/AbpDesk/AbpDesk.Web.Mvc/AbpDesk.Web.Mvc.csproj
  2. 2
      src/AbpDesk/AbpDesk.Web.Mvc/Navigation/MainMenuContributor.cs
  3. 17
      src/AbpDesk/AbpDesk.Web.Mvc/Pages/App/Todo/Index.cshtml
  4. 12
      src/AbpDesk/AbpDesk.Web.Mvc/Pages/App/Todo/Index.cshtml.cs
  5. 14
      src/AbpDesk/AbpDesk.Web.Mvc/wwwroot/pages/app/todo/index.js

3
src/AbpDesk/AbpDesk.Web.Mvc/AbpDesk.Web.Mvc.csproj

@ -35,6 +35,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.0.0" />
@ -46,6 +47,8 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.0"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.0">
<PrivateAssets>All</PrivateAssets> <PrivateAssets>All</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.2" /> <PackageReference Include="Serilog.Extensions.Logging" Version="2.0.2" />
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" /> <PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
</ItemGroup> </ItemGroup>

2
src/AbpDesk/AbpDesk.Web.Mvc/Navigation/MainMenuContributor.cs

@ -22,6 +22,8 @@ namespace AbpDesk.Web.Mvc.Navigation
.AddItem( .AddItem(
new ApplicationMenuItem("TicketManagement.Tickets", "Tickets", url: "/App/Tickets") new ApplicationMenuItem("TicketManagement.Tickets", "Tickets", url: "/App/Tickets")
) )
).AddItem(
new ApplicationMenuItem("TodoList", "Todo List", url: "/App/Todo")
); );
//Disabled blog module. This should be inside the module! //Disabled blog module. This should be inside the module!

17
src/AbpDesk/AbpDesk.Web.Mvc/Pages/App/Todo/Index.cshtml

@ -0,0 +1,17 @@
@page
@using AbpDesk.Web.Mvc.Pages.App.Todo
@model IndexModel
<h2>TODO application!</h2>
<div id="TodoApp">
<ol>
<li v-for="todo in todos">
{{ todo.text }}
</li>
</ol>
</div>
@section scripts {
<script src="https://unpkg.com/vue"></script>
<script src="~/pages/app/todo/index.js"></script>
}

12
src/AbpDesk/AbpDesk.Web.Mvc/Pages/App/Todo/Index.cshtml.cs

@ -0,0 +1,12 @@
using Volo.Abp.AspNetCore.Mvc.RazorPages;
namespace AbpDesk.Web.Mvc.Pages.App.Todo
{
public class IndexModel : AbpPageModel
{
public void OnGet()
{
}
}
}

14
src/AbpDesk/AbpDesk.Web.Mvc/wwwroot/pages/app/todo/index.js

@ -0,0 +1,14 @@
(function() {
var app = new Vue({
el: '#TodoApp',
data: {
todos: [
{ text: 'Learn JavaScript' },
{ text: 'Learn Vue' },
{ text: 'Build something awesome' }
]
}
});
})();
Loading…
Cancel
Save