Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Initial commit to return /client to the URL include paths #758

Merged
merged 1 commit into from
Aug 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ var initGlobalConfigFiles = function (config, assets) {
config.files.server.policies = getGlobbedPaths(assets.server.policies);

// Setting Globbed js files
config.files.client.js = getGlobbedPaths(assets.client.lib.js, 'public/').concat(getGlobbedPaths(assets.client.js, ['client/', 'public/']));
config.files.client.js = getGlobbedPaths(assets.client.lib.js, 'public/').concat(getGlobbedPaths(assets.client.js, ['public/']));

// Setting Globbed css files
config.files.client.css = getGlobbedPaths(assets.client.lib.css, 'public/').concat(getGlobbedPaths(assets.client.css, ['client/', 'public/']));
config.files.client.css = getGlobbedPaths(assets.client.lib.css, 'public/').concat(getGlobbedPaths(assets.client.css, ['public/']));

// Setting Globbed test files
config.files.client.tests = getGlobbedPaths(assets.client.tests);
Expand Down
2 changes: 1 addition & 1 deletion config/lib/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ module.exports.initModulesClientRoutes = function (app) {

// Globbing static routing
config.folders.client.forEach(function (staticPath) {
app.use(staticPath.replace('/client', ''), express.static(path.resolve('./' + staticPath)));
app.use(staticPath, express.static(path.resolve('./' + staticPath)));
});
};

Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = function (karmaConfig) {
moduleName: 'mean',

cacheIdFromPath: function (filepath) {
return filepath.replace('/client', '');
return filepath;
},
},

Expand Down
8 changes: 4 additions & 4 deletions modules/articles/client/config/articles.client.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ angular.module('articles').config(['$stateProvider',
})
.state('articles.list', {
url: '',
templateUrl: 'modules/articles/views/list-articles.client.view.html'
templateUrl: 'modules/articles/client/views/list-articles.client.view.html'
})
.state('articles.create', {
url: '/create',
templateUrl: 'modules/articles/views/create-article.client.view.html',
templateUrl: 'modules/articles/client/views/create-article.client.view.html',
data: {
roles: ['user', 'admin']
}
})
.state('articles.view', {
url: '/:articleId',
templateUrl: 'modules/articles/views/view-article.client.view.html'
templateUrl: 'modules/articles/client/views/view-article.client.view.html'
})
.state('articles.edit', {
url: '/:articleId/edit',
templateUrl: 'modules/articles/views/edit-article.client.view.html',
templateUrl: 'modules/articles/client/views/edit-article.client.view.html',
data: {
roles: ['user', 'admin']
}
Expand Down
2 changes: 1 addition & 1 deletion modules/chat/client/config/chat.client.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ angular.module('chat').config(['$stateProvider',
$stateProvider
.state('chat', {
url: '/chat',
templateUrl: 'modules/chat/views/chat.client.view.html',
templateUrl: 'modules/chat/client/views/chat.client.view.html',
data: {
roles: ['user', 'admin']
}
Expand Down
4 changes: 2 additions & 2 deletions modules/core/client/config/core.client.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ angular.module('core').config(['$stateProvider', '$urlRouterProvider',
$stateProvider
.state('home', {
url: '/',
templateUrl: 'modules/core/views/home.client.view.html'
templateUrl: 'modules/core/client/views/home.client.view.html'
})
.state('not-found', {
url: '/not-found',
templateUrl: 'modules/core/views/404.client.view.html'
templateUrl: 'modules/core/client/views/404.client.view.html'
});
}
]);
2 changes: 1 addition & 1 deletion modules/core/client/views/home.client.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -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/img/brand/logo.png" />
<img alt="MEAN.JS" class="img-responsive text-center" src="modules/core/client/img/brand/logo.png" />
</div>
</div>
<br>
Expand Down
2 changes: 1 addition & 1 deletion modules/core/server/views/layout.server.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</head>

<body class="ng-cloak">
<header data-ng-include="'/modules/core/views/header.client.view.html'" class="navbar navbar-fixed-top navbar-inverse"></header>
<header data-ng-include="'/modules/core/client/views/header.client.view.html'" class="navbar navbar-fixed-top navbar-inverse"></header>
<section class="content">
<section class="container">
{% block content %}{% endblock %}
Expand Down
6 changes: 3 additions & 3 deletions modules/users/client/config/users-admin.client.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ angular.module('users.admin.routes').config(['$stateProvider',
$stateProvider
.state('admin.users', {
url: '/users',
templateUrl: 'modules/users/views/admin/user-list.client.view.html',
templateUrl: 'modules/users/client/views/admin/user-list.client.view.html',
controller: 'UserListController'
})
.state('admin.user', {
url: '/users/:userId',
templateUrl: 'modules/users/views/admin/user.client.view.html',
templateUrl: 'modules/users/client/views/admin/user.client.view.html',
controller: 'UserController',
resolve: {
userResolve: ['$stateParams', 'Admin', function ($stateParams, Admin) {
Expand All @@ -23,7 +23,7 @@ angular.module('users.admin.routes').config(['$stateProvider',
})
.state('admin.user-edit', {
url: '/users/:userId/edit',
templateUrl: 'modules/users/views/admin/user-edit.client.view.html',
templateUrl: 'modules/users/client/views/admin/user-edit.client.view.html',
controller: 'UserController',
resolve: {
userResolve: ['$stateParams', 'Admin', function ($stateParams, Admin) {
Expand Down
24 changes: 12 additions & 12 deletions modules/users/client/config/users.client.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ angular.module('users').config(['$stateProvider',
.state('settings', {
abstract: true,
url: '/settings',
templateUrl: 'modules/users/views/settings/settings.client.view.html',
templateUrl: 'modules/users/client/views/settings/settings.client.view.html',
data: {
roles: ['user', 'admin']
}
})
.state('settings.profile', {
url: '/profile',
templateUrl: 'modules/users/views/settings/edit-profile.client.view.html'
templateUrl: 'modules/users/client/views/settings/edit-profile.client.view.html'
})
.state('settings.password', {
url: '/password',
templateUrl: 'modules/users/views/settings/change-password.client.view.html'
templateUrl: 'modules/users/client/views/settings/change-password.client.view.html'
})
.state('settings.accounts', {
url: '/accounts',
templateUrl: 'modules/users/views/settings/manage-social-accounts.client.view.html'
templateUrl: 'modules/users/client/views/settings/manage-social-accounts.client.view.html'
})
.state('settings.picture', {
url: '/picture',
templateUrl: 'modules/users/views/settings/change-profile-picture.client.view.html'
templateUrl: 'modules/users/client/views/settings/change-profile-picture.client.view.html'
})
.state('authentication', {
abstract: true,
url: '/authentication',
templateUrl: 'modules/users/views/authentication/authentication.client.view.html'
templateUrl: 'modules/users/client/views/authentication/authentication.client.view.html'
})
.state('authentication.signup', {
url: '/signup',
templateUrl: 'modules/users/views/authentication/signup.client.view.html'
templateUrl: 'modules/users/client/views/authentication/signup.client.view.html'
})
.state('authentication.signin', {
url: '/signin?err',
templateUrl: 'modules/users/views/authentication/signin.client.view.html'
templateUrl: 'modules/users/client/views/authentication/signin.client.view.html'
})
.state('password', {
abstract: true,
Expand All @@ -49,7 +49,7 @@ angular.module('users').config(['$stateProvider',
})
.state('password.forgot', {
url: '/forgot',
templateUrl: 'modules/users/views/password/forgot-password.client.view.html'
templateUrl: 'modules/users/client/views/password/forgot-password.client.view.html'
})
.state('password.reset', {
abstract: true,
Expand All @@ -58,15 +58,15 @@ angular.module('users').config(['$stateProvider',
})
.state('password.reset.invalid', {
url: '/invalid',
templateUrl: 'modules/users/views/password/reset-password-invalid.client.view.html'
templateUrl: 'modules/users/client/views/password/reset-password-invalid.client.view.html'
})
.state('password.reset.success', {
url: '/success',
templateUrl: 'modules/users/views/password/reset-password-success.client.view.html'
templateUrl: 'modules/users/client/views/password/reset-password-success.client.view.html'
})
.state('password.reset.form', {
url: '/:token',
templateUrl: 'modules/users/views/password/reset-password.client.view.html'
templateUrl: 'modules/users/client/views/password/reset-password.client.view.html'
});
}
]);
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<section class="row" data-ng-controller="AuthenticationController">
<h3 class="col-md-12 text-center">Sign in using your social accounts</h3>
<div class="col-md-12 text-center">
<img ng-click="callOauthProvider('/api/auth/facebook')" ng-src="/modules/users/img/buttons/facebook.png">
<img ng-click="callOauthProvider('/api/auth/twitter')" ng-src="/modules/users/img/buttons/twitter.png">
<img ng-click="callOauthProvider('/api/auth/google')" ng-src="/modules/users/img/buttons/google.png">
<img ng-click="callOauthProvider('/api/auth/linkedin')" ng-src="/modules/users/img/buttons/linkedin.png">
<img ng-click="callOauthProvider('/api/auth/github')" ng-src="/modules/users/img/buttons/github.png">
<img ng-click="callOauthProvider('/api/auth/paypal')" ng-src="/modules/users/img/buttons/paypal.png">
<img ng-click="callOauthProvider('/api/auth/facebook')" ng-src="/modules/users/client/img/buttons/facebook.png">
<img ng-click="callOauthProvider('/api/auth/twitter')" ng-src="/modules/users/client/img/buttons/twitter.png">
<img ng-click="callOauthProvider('/api/auth/google')" ng-src="/modules/users/client/img/buttons/google.png">
<img ng-click="callOauthProvider('/api/auth/linkedin')" ng-src="/modules/users/client/img/buttons/linkedin.png">
<img ng-click="callOauthProvider('/api/auth/github')" ng-src="/modules/users/client/img/buttons/github.png">
<img ng-click="callOauthProvider('/api/auth/paypal')" ng-src="/modules/users/client/img/buttons/paypal.png">
</div>
<div ui-view></div>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h3 class="col-md-12 text-center" data-ng-show="hasConnectedAdditionalSocialAccounts()">Connected social accounts:</h3>
<div class="col-md-12 text-center">
<div data-ng-repeat="(providerName, providerData) in user.additionalProvidersData" class="social-account-container">
<img ng-src="/modules/users/img/buttons/{{providerName}}.png">
<img ng-src="/modules/users/client/img/buttons/{{providerName}}.png">
<a class="btn btn-danger btn-remove-account" data-ng-click="removeUserSocialAccount(providerName)">
<i class="glyphicon glyphicon-trash"></i>
</a>
Expand All @@ -11,37 +11,37 @@ <h3 class="col-md-12 text-center" data-ng-show="hasConnectedAdditionalSocialAcco
<h3 class="col-md-12 text-center" data-ng-show="hasConnectedAdditionalSocialAccounts()">Unconnected social accounts:</h3>
<div class="col-md-12 text-center">
<div class="social-account-container" data-ng-hide="isConnectedSocialAccount('facebook')">
<img ng-src="/modules/users/img/buttons/facebook.png">
<img ng-src="/modules/users/client/img/buttons/facebook.png">
<a class="btn btn-success btn-remove-account" href="/api/auth/facebook" target="_self">
<i class="glyphicon glyphicon-plus"></i>
</a>
</div>
<div class="social-account-container" data-ng-hide="isConnectedSocialAccount('twitter')">
<img ng-src="/modules/users/img/buttons/twitter.png">
<img ng-src="/modules/users/client/img/buttons/twitter.png">
<a class="btn btn-success btn-remove-account" href="/api/auth/twitter" target="_self">
<i class="glyphicon glyphicon-plus"></i>
</a>
</div>
<div class="social-account-container" data-ng-hide="isConnectedSocialAccount('google')">
<img ng-src="/modules/users/img/buttons/google.png">
<img ng-src="/modules/users/client/img/buttons/google.png">
<a class="btn btn-success btn-remove-account" href="/api/auth/google" target="_self">
<i class="glyphicon glyphicon-plus"></i>
</a>
</div>
<div class="social-account-container" data-ng-hide="isConnectedSocialAccount('linkedin')">
<img ng-src="/modules/users/img/buttons/linkedin.png">
<img ng-src="/modules/users/client/img/buttons/linkedin.png">
<a class="btn btn-success btn-remove-account" href="/api/auth/linkedin" target="_self">
<i class="glyphicon glyphicon-plus"></i>
</a>
</div>
<div class="social-account-container" data-ng-hide="isConnectedSocialAccount('github')">
<img ng-src="/modules/users/img/buttons/github.png">
<img ng-src="/modules/users/client/img/buttons/github.png">
<a class="btn btn-success btn-remove-account" href="/api/auth/github" target="_self">
<i class="glyphicon glyphicon-plus"></i>
</a>
</div>
<div class="social-account-container" data-ng-hide="isConnectedSocialAccount('paypal')">
<img ng-src="/modules/users/img/buttons/paypal.png">
<img ng-src="/modules/users/client/img/buttons/paypal.png">
<a class="btn btn-success btn-remove-account" href="/api/auth/paypal" target="_self">
<i class="glyphicon glyphicon-plus"></i>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports.changeProfilePicture = function (req, res) {
message: 'Error occurred while uploading profile picture'
});
} else {
user.profileImageURL = 'modules/users/img/profile/uploads/' + req.files.file.name;
user.profileImageURL = 'modules/users/client/img/profile/uploads/' + req.files.file.name;

user.save(function (saveError) {
if (saveError) {
Expand Down
2 changes: 1 addition & 1 deletion modules/users/server/models/user.server.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var UserSchema = new Schema({
},
profileImageURL: {
type: String,
default: 'modules/users/img/profile/default.png'
default: 'modules/users/client/img/profile/default.png'
},
provider: {
type: String,
Expand Down