mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-02-26 16:21:01 +01:00
fix(core): Remove the <base> tag.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
})
|
||||
.state('articles.list', {
|
||||
url: '',
|
||||
templateUrl: 'modules/articles/client/views/list-articles.client.view.html',
|
||||
templateUrl: '/modules/articles/client/views/list-articles.client.view.html',
|
||||
controller: 'ArticlesListController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
@@ -25,7 +25,7 @@
|
||||
})
|
||||
.state('articles.view', {
|
||||
url: '/:articleId',
|
||||
templateUrl: 'modules/articles/client/views/view-article.client.view.html',
|
||||
templateUrl: '/modules/articles/client/views/view-article.client.view.html',
|
||||
controller: 'ArticlesController',
|
||||
controllerAs: 'vm',
|
||||
resolve: {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
ArticlesService.$inject = ['$resource', '$log'];
|
||||
|
||||
function ArticlesService($resource, $log) {
|
||||
var Article = $resource('api/articles/:articleId', {
|
||||
var Article = $resource('/api/articles/:articleId', {
|
||||
articleId: '@_id'
|
||||
}, {
|
||||
update: {
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
beforeEach(inject(function ($controller, $state, $templateCache) {
|
||||
viewstate = $state.get('articles.view');
|
||||
$templateCache.put('modules/articles/client/views/view-article.client.view.html', '');
|
||||
$templateCache.put('/modules/articles/client/views/view-article.client.view.html', '');
|
||||
|
||||
// create mock article
|
||||
mockArticle = new ArticlesService({
|
||||
@@ -104,7 +104,7 @@
|
||||
});
|
||||
|
||||
it('Should have templateUrl', function () {
|
||||
expect(viewstate.templateUrl).toBe('modules/articles/client/views/view-article.client.view.html');
|
||||
expect(viewstate.templateUrl).toBe('/modules/articles/client/views/view-article.client.view.html');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
$rootScope.$digest();
|
||||
|
||||
expect($location.path()).toBe('/articles');
|
||||
expect($state.current.templateUrl).toBe('modules/articles/client/views/list-articles.client.view.html');
|
||||
expect($state.current.templateUrl).toBe('/modules/articles/client/views/list-articles.client.view.html');
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
it('should send a GET request and return all articles', inject(function (ArticlesService) {
|
||||
// Set POST response
|
||||
$httpBackend.expectGET('api/articles').respond(mockArticleList);
|
||||
$httpBackend.expectGET('/api/articles').respond(mockArticleList);
|
||||
|
||||
|
||||
$httpBackend.flush();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
$stateProvider
|
||||
.state('chat', {
|
||||
url: '/chat',
|
||||
templateUrl: 'modules/chat/client/views/chat.client.view.html',
|
||||
templateUrl: '/modules/chat/client/views/chat.client.view.html',
|
||||
controller: 'ChatController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- List all messages -->
|
||||
<li class="col-xs-12 col-md-offset-4 col-md-4 chat-message" ng-repeat="message in vm.messages">
|
||||
<small class="pull-right text-muted" ng-bind="message.created | date:'mediumTime'"></small>
|
||||
<img ng-src="{{message.profileImageURL}}" alt="{{message.username}}" class="pull-left chat-profile-image" />
|
||||
<img ng-src="/{{message.profileImageURL}}" alt="{{message.username}}" class="pull-left chat-profile-image" />
|
||||
<div class="pull-left chat-message-details">
|
||||
<strong ng-bind="message.username"></strong>
|
||||
<br>
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
bootstrapConfig.$inject = ['$compileProvider', '$locationProvider', '$httpProvider', '$logProvider'];
|
||||
|
||||
function bootstrapConfig($compileProvider, $locationProvider, $httpProvider, $logProvider) {
|
||||
$locationProvider.html5Mode(true).hashPrefix('!');
|
||||
$locationProvider.html5Mode({
|
||||
enabled: true,
|
||||
requireBase: false
|
||||
}).hashPrefix('!');
|
||||
|
||||
$httpProvider.interceptors.push('authInterceptor');
|
||||
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
$stateProvider
|
||||
.state('home', {
|
||||
url: '/',
|
||||
templateUrl: 'modules/core/client/views/home.client.view.html',
|
||||
templateUrl: '/modules/core/client/views/home.client.view.html',
|
||||
controller: 'HomeController',
|
||||
controllerAs: 'vm'
|
||||
})
|
||||
.state('not-found', {
|
||||
url: '/not-found',
|
||||
templateUrl: 'modules/core/client/views/404.client.view.html',
|
||||
templateUrl: '/modules/core/client/views/404.client.view.html',
|
||||
controller: 'ErrorController',
|
||||
controllerAs: 'vm',
|
||||
params: {
|
||||
@@ -50,7 +50,7 @@
|
||||
})
|
||||
.state('bad-request', {
|
||||
url: '/bad-request',
|
||||
templateUrl: 'modules/core/client/views/400.client.view.html',
|
||||
templateUrl: '/modules/core/client/views/400.client.view.html',
|
||||
controller: 'ErrorController',
|
||||
controllerAs: 'vm',
|
||||
params: {
|
||||
@@ -65,7 +65,7 @@
|
||||
})
|
||||
.state('forbidden', {
|
||||
url: '/forbidden',
|
||||
templateUrl: 'modules/core/client/views/403.client.view.html',
|
||||
templateUrl: '/modules/core/client/views/403.client.view.html',
|
||||
data: {
|
||||
ignoreState: true,
|
||||
pageTitle: 'Forbidden'
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<ul class="nav navbar-nav navbar-right" ng-show="vm.authentication.user">
|
||||
<li class="dropdown" uib-dropdown>
|
||||
<a class="dropdown-toggle user-header-dropdown-toggle" uib-dropdown-toggle role="button">
|
||||
<img ng-src="{{vm.authentication.user.profileImageURL}}" alt="{{vm.authentication.user.displayName}}" class="header-profile-image" />
|
||||
<img ng-src="/{{vm.authentication.user.profileImageURL}}" alt="{{vm.authentication.user.displayName}}" class="header-profile-image" />
|
||||
<span ng-bind="vm.authentication.user.displayName"></span> <b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="jumbotron text-center">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3 col-sm-6 col-sm-offset-3 col-xs-12">
|
||||
<img alt="MEAN.JS" class="img-responsive text-center" src="modules/core/client/img/brand/logo.png" />
|
||||
<img alt="MEAN.JS" class="img-responsive text-center" src="/modules/core/client/img/brand/logo.png" />
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
|
||||
<base href="/">
|
||||
<title page-title></title>
|
||||
<meta name="description" content="{{description}}">
|
||||
<meta name="fragment" content="!">
|
||||
@@ -29,10 +28,10 @@
|
||||
<meta name="twitter:image" content="{{logo}}">
|
||||
|
||||
<!-- Fav Icon -->
|
||||
<link href="{{favicon}}" rel="shortcut icon" type="image/x-icon">
|
||||
<link href="/{{favicon}}" rel="shortcut icon" type="image/x-icon">
|
||||
|
||||
<!-- Application CSS Files -->
|
||||
{{#each cssFiles}}<link rel="stylesheet" href="{{this}}">{{/each}}
|
||||
{{#each cssFiles}}<link rel="stylesheet" href="/{{this}}">{{/each}}
|
||||
</head>
|
||||
|
||||
<body class="ng-cloak">
|
||||
@@ -64,7 +63,7 @@
|
||||
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
|
||||
|
||||
<!--Application JavaScript Files-->
|
||||
{{#each jsFiles}}<script type="text/javascript" src="{{this}}"></script>{{/each}}
|
||||
{{#each jsFiles}}<script type="text/javascript" src="/{{this}}"></script>{{/each}}
|
||||
|
||||
<!--owasp config sync-->
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
$stateProvider
|
||||
.state('admin.users', {
|
||||
url: '/users',
|
||||
templateUrl: 'modules/users/client/views/admin/list-users.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/admin/list-users.client.view.html',
|
||||
controller: 'UserListController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
@@ -21,7 +21,7 @@
|
||||
})
|
||||
.state('admin.user', {
|
||||
url: '/users/:userId',
|
||||
templateUrl: 'modules/users/client/views/admin/view-user.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/admin/view-user.client.view.html',
|
||||
controller: 'UserController',
|
||||
controllerAs: 'vm',
|
||||
resolve: {
|
||||
@@ -33,7 +33,7 @@
|
||||
})
|
||||
.state('admin.user-edit', {
|
||||
url: '/users/:userId/edit',
|
||||
templateUrl: 'modules/users/client/views/admin/edit-user.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/admin/edit-user.client.view.html',
|
||||
controller: 'UserController',
|
||||
controllerAs: 'vm',
|
||||
resolve: {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
.state('settings', {
|
||||
abstract: true,
|
||||
url: '/settings',
|
||||
templateUrl: 'modules/users/client/views/settings/settings.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/settings/settings.client.view.html',
|
||||
controller: 'SettingsController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
@@ -23,7 +23,7 @@
|
||||
})
|
||||
.state('settings.profile', {
|
||||
url: '/profile',
|
||||
templateUrl: 'modules/users/client/views/settings/edit-profile.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/settings/edit-profile.client.view.html',
|
||||
controller: 'EditProfileController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
@@ -32,7 +32,7 @@
|
||||
})
|
||||
.state('settings.password', {
|
||||
url: '/password',
|
||||
templateUrl: 'modules/users/client/views/settings/change-password.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/settings/change-password.client.view.html',
|
||||
controller: 'ChangePasswordController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
@@ -41,7 +41,7 @@
|
||||
})
|
||||
.state('settings.accounts', {
|
||||
url: '/accounts',
|
||||
templateUrl: 'modules/users/client/views/settings/manage-social-accounts.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/settings/manage-social-accounts.client.view.html',
|
||||
controller: 'SocialAccountsController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
@@ -50,7 +50,7 @@
|
||||
})
|
||||
.state('settings.picture', {
|
||||
url: '/picture',
|
||||
templateUrl: 'modules/users/client/views/settings/change-profile-picture.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/settings/change-profile-picture.client.view.html',
|
||||
controller: 'ChangeProfilePictureController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
@@ -60,13 +60,13 @@
|
||||
.state('authentication', {
|
||||
abstract: true,
|
||||
url: '/authentication',
|
||||
templateUrl: 'modules/users/client/views/authentication/authentication.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/authentication/authentication.client.view.html',
|
||||
controller: 'AuthenticationController',
|
||||
controllerAs: 'vm'
|
||||
})
|
||||
.state('authentication.signup', {
|
||||
url: '/signup',
|
||||
templateUrl: 'modules/users/client/views/authentication/signup.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/authentication/signup.client.view.html',
|
||||
controller: 'AuthenticationController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
@@ -75,7 +75,7 @@
|
||||
})
|
||||
.state('authentication.signin', {
|
||||
url: '/signin?err',
|
||||
templateUrl: 'modules/users/client/views/authentication/signin.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/authentication/signin.client.view.html',
|
||||
controller: 'AuthenticationController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
@@ -89,7 +89,7 @@
|
||||
})
|
||||
.state('password.forgot', {
|
||||
url: '/forgot',
|
||||
templateUrl: 'modules/users/client/views/password/forgot-password.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/password/forgot-password.client.view.html',
|
||||
controller: 'PasswordController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
@@ -103,21 +103,21 @@
|
||||
})
|
||||
.state('password.reset.invalid', {
|
||||
url: '/invalid',
|
||||
templateUrl: 'modules/users/client/views/password/reset-password-invalid.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/password/reset-password-invalid.client.view.html',
|
||||
data: {
|
||||
pageTitle: 'Password reset invalid'
|
||||
}
|
||||
})
|
||||
.state('password.reset.success', {
|
||||
url: '/success',
|
||||
templateUrl: 'modules/users/client/views/password/reset-password-success.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/password/reset-password-success.client.view.html',
|
||||
data: {
|
||||
pageTitle: 'Password reset success'
|
||||
}
|
||||
})
|
||||
.state('password.reset.form', {
|
||||
url: '/:token',
|
||||
templateUrl: 'modules/users/client/views/password/reset-password.client.view.html',
|
||||
templateUrl: '/modules/users/client/views/password/reset-password.client.view.html',
|
||||
controller: 'PasswordController',
|
||||
controllerAs: 'vm',
|
||||
data: {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
vm.upload = function (dataUrl, name) {
|
||||
|
||||
Upload.upload({
|
||||
url: 'api/users/picture',
|
||||
url: '/api/users/picture',
|
||||
data: {
|
||||
newProfilePicture: Upload.dataUrltoBlob(dataUrl, name)
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
UsersService.$inject = ['$resource'];
|
||||
|
||||
function UsersService($resource) {
|
||||
var Users = $resource('api/users', {}, {
|
||||
var Users = $resource('/api/users', {}, {
|
||||
update: {
|
||||
method: 'PUT'
|
||||
},
|
||||
@@ -78,7 +78,7 @@
|
||||
AdminService.$inject = ['$resource'];
|
||||
|
||||
function AdminService($resource) {
|
||||
return $resource('api/users/:userId', {
|
||||
return $resource('/api/users/:userId', {
|
||||
userId: '@_id'
|
||||
}, {
|
||||
update: {
|
||||
|
||||
Reference in New Issue
Block a user