Skip to content

Commit 2626871

Browse files
committed
Modified angular template to better work with ABP's latest version.
1 parent 46604f4 commit 2626871

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+8394
-227
lines changed

SimpleTaskSystem/SimpleTaskSystem.Core/SimpleTaskSystem.Core.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
<Reference Include="System.Xml" />
6868
</ItemGroup>
6969
<ItemGroup>
70+
<Compile Include="SimpleTaskSystemConsts.cs" />
7071
<Compile Include="People\IPersonRepository.cs" />
7172
<Compile Include="People\Person.cs" />
7273
<Compile Include="SimpleTaskSystemCoreModule.cs" />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace SimpleTaskSystem
2+
{
3+
public class SimpleTaskSystemConsts
4+
{
5+
public const string LocalizationSourceName = "SimpleTaskSystem";
6+
}
7+
}

SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App/Common/styles/main.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App/Common/styles/main.less

Lines changed: 0 additions & 1 deletion
This file was deleted.

SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App/Common/styles/main.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,33 @@
11
(function () {
22
'use strict';
33

4-
var localize = abp.localization.getSource('SimpleTaskSystem');
5-
64
var app = angular.module('app', [
75
'ngAnimate',
8-
'ngRoute',
96
'ngSanitize',
107

8+
'ui.router',
119
'ui.bootstrap',
1210
'ui.jq',
1311

1412
'abp'
1513
]);
1614

17-
app.constant('routes', [
18-
{
19-
url: '/',
20-
config: {
21-
templateUrl: '/App/Main/views/task/list.cshtml',
22-
menuText: localize('TaskList'),
23-
menuItem: 'TaskList'
24-
}
25-
},
26-
{
27-
url: '/new',
28-
config: {
29-
templateUrl: '/App/Main/views/task/new.cshtml',
30-
menuText: localize('NewTask'),
31-
menuItem: 'NewTask'
32-
}
33-
}
34-
]);
35-
15+
//Configuration for Angular UI routing.
3616
app.config([
37-
'$routeProvider', 'routes',
38-
function ($routeProvider, routes) {
39-
routes.forEach(function (route) {
40-
$routeProvider.when(route.url, route.config);
41-
});
42-
43-
$routeProvider.otherwise({
44-
redirectTo: '/'
45-
});
46-
}
47-
]);
48-
49-
app.run([
50-
'$rootScope',
51-
function ($rootScope) {
52-
$rootScope.$on('$routeChangeSuccess', function (event, next, current) {
53-
if (next && next.$$route) {
54-
$rootScope.activeMenu = next.$$route.menuItem; //Used in layout.cshtml to make selected menu 'active'.
55-
}
56-
});
17+
'$stateProvider', '$urlRouterProvider',
18+
function ($stateProvider, $urlRouterProvider) {
19+
$urlRouterProvider.otherwise('/');
20+
$stateProvider
21+
.state('tasklist', {
22+
url: '/',
23+
templateUrl: '/App/Main/views/task/list.cshtml',
24+
menu: 'TaskList' //Matches to name of 'TaskList' menu in SimpleTaskSystemNavigationProvider
25+
})
26+
.state('newtask', {
27+
url: '/new',
28+
templateUrl: '/App/Main/views/task/new.cshtml',
29+
menu: 'NewTask' //Matches to name of 'NewTask' menu in SimpleTaskSystemNavigationProvider
30+
});
5731
}
5832
]);
5933
})();

SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App/Main/styles/main.css renamed to SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App/Main/main.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ body {
2020
.task-state-icon {
2121
cursor: pointer;
2222
}
23-
/* Angular transition animations */
23+
/* Styles for angular ui transition animations */
24+
.angular-animation-container {
25+
position: relative;
26+
}
2427
.shuffle-animation.ng-enter,
2528
.shuffle-animation.ng-leave {
26-
position: relative;
29+
position: absolute;
2730
}
2831
.shuffle-animation.ng-enter {
2932
-moz-transition: ease-out all 0.3s 0.4s;

SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App/Main/styles/main.less renamed to SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App/Main/main.less

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ body {
2727
cursor: pointer;
2828
}
2929

30-
/* Angular transition animations */
30+
/* Styles for angular ui transition animations */
31+
32+
.angular-animation-container {
33+
position: relative;
34+
}
3135

3236
.shuffle-animation.ng-enter,
3337
.shuffle-animation.ng-leave {
34-
position: relative;
38+
position: absolute;
3539
}
3640

3741
.shuffle-animation.ng-enter {
@@ -41,12 +45,12 @@ body {
4145
transition: ease-out all 0.3s 0.4s;
4246
left: 2em;
4347
opacity: 0;
44-
}
4548

46-
.shuffle-animation.ng-enter.ng-enter-active {
49+
&.ng-enter-active {
4750
left: 0;
4851
opacity: 1;
4952
}
53+
}
5054

5155
.shuffle-animation.ng-leave {
5256
-moz-transition: 0.3s ease-out all;
@@ -55,9 +59,9 @@ body {
5559
transition: 0.3s ease-out all;
5660
left: 0;
5761
opacity: 1;
58-
}
5962

60-
.shuffle-animation.ng-leave.ng-leave-active {
63+
&.ng-leave-active {
6164
left: 2em;
6265
opacity: 0;
63-
}
66+
}
67+
}

SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App/Main/main.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App/Main/styles/main.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)