Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
mjvallone committed Sep 28, 2020
2 parents 84b6b97 + 49b8c26 commit 6f6cb9e
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 34 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ server:
@python manage.py runserver

frontend:
@cd frontend && npm run build-dev
@cd frontend && npm run start

install-frontend:
Expand Down
1 change: 1 addition & 0 deletions api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def update(self, instance, validated_data):

principles = list()
for principle in validated_data.get('principles'):
principle.custom_description = principle.get('custom_description')
principles.append(principle.get('id'))
instance.principles.set(principles)

Expand Down
2 changes: 1 addition & 1 deletion frontend/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ th.active .arrow {
font-weight: bold;
}

.btn-change-pass:hover {
.btn-change-pass:hover, .btn-sign-in-dark:hover {
background-color: #171E3F;
color: white;
font-weight: bold;
Expand Down
4 changes: 2 additions & 2 deletions frontend/help-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ <h1>Ayuda Coobs</h1>
</li>
<li class="nav-item">
<a class="nav-link" id="actions-tab" data-toggle="tab" href="#actions" role="tab" aria-controls="actions" aria-selected="false">
Carga y seguimiento de acciones
Acciones
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="balance-tab" data-toggle="tab" href="#balance" role="tab" aria-controls="balance" aria-selected="false">
Borrador de balance social
Balance Social
</a>
</li>
</ul>
Expand Down
10 changes: 5 additions & 5 deletions frontend/landing/css/landing.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ masthead-subheading {
font-weight: 500;
}

.btn-register, .btn-sign-in-dark, .btn-change-pass {
background-color: #171E3F;
color: white;
.btn-register-dark, .btn-change-pass {
background-color: #171E3F !important;
color: white !important;
border-radius: 10px !important;
}

Expand Down Expand Up @@ -139,9 +139,9 @@ masthead-subheading {
font-weight: bold;
}

.btn-register:hover, .btn-change-pass:hover {
.btn-register-dark:hover, .btn-change-pass:hover{
background-color: #171E3F;
color: white;
color: white !important;
font-weight: bold;
border-radius: 10px !important;
}
2 changes: 1 addition & 1 deletion frontend/landing/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<body>
<nav class="navbar navbar-expand-lg navbar-light fixed-top bg-white" id="navbar-top">
<div class="container-fluid p-4">
<img class="navbar-brand js-scroll-trigger mr-auto" src="images/coobs.png" style="height: 40px;width: 190px;">
<a href="/"><img class="navbar-brand js-scroll-trigger mr-auto" src="images/coobs.png" style="height: 40px;width: 190px;"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
Expand Down
2 changes: 1 addition & 1 deletion frontend/landing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ <h2 id="signup" class="text-center custom-violet mb-4"></h2>
</div>
<div id="success"></div>
<div class="form-group">
<button id="registerAccount" type="submit" class="btn btn-user btn-block btn-register"></button>
<button id="registerAccount" type="submit" class="btn btn-user btn-block btn-register-dark"></button>
</div>
</form>
<hr>
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"main": "index.js",
"scripts": {
"build": "webpack --optimize-minimize --config webpack.prod.js",
"build-dev": "webpack --config webpack.dev.js",
"start": "webpack-dev-server --progress --config webpack.dev.js",
"serve": "serve dist"
},
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/screens/actions/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export default {
const actionId = this.$route.params.actionId;
this.action.partnersInvolved = this.partnersInvolved;
// @FIXME [DMC] I think it makes no sense to sanitize here, let the server do it and just sanitize with JS at display/parse time
this.action.description = turndownService.turndown(this.action.description);
this.action.description = this.action.description ? turndownService.turndown(this.action.description) : "";
let promise = null;
if (this.isNew) {
promise = httpPost("actions/", this.action);
Expand All @@ -284,7 +284,6 @@ export default {
action: {
date: {required},
name: {required},
description: {required},
principles: {
requiredIf: requiredIf((v) => {
return !required(v.sustainableDevelopmentGoals);
Expand Down
25 changes: 5 additions & 20 deletions frontend/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,9 @@ const appConf = Object.assign({}, baseConf, {
jQuery: "jquery"
}),
new VueLoaderPlugin(),
new CopyWebpackPlugin([{
from: "static/",
new CopyWebpackPlugin([{
from: "static/",
to: "./"
// globOptions: {
// ignore: ['**/static/images/help/**']
// }
}]),
new HtmlWebpackPlugin({
template: "index.html",
Expand Down Expand Up @@ -93,12 +90,9 @@ const landingConf = Object.assign({}, baseConf, {
$: "jquery",
jQuery: "jquery"
}),
new CopyWebpackPlugin([{
from: "static/",
new CopyWebpackPlugin([{
from: "static/",
to: "./"
// globOptions: {
// ignore: ['**/static/images/help/**']
// }
}]),
new HtmlWebpackPlugin({
template: "landing/index.html",
Expand All @@ -109,7 +103,7 @@ const landingConf = Object.assign({}, baseConf, {
new HtmlWebpackPlugin({
template: "landing/help.html",
path: path.join(__dirname, "./dist/landing"),
filename: "help.html",
filename: "help",
inject: true
})
]
Expand All @@ -123,15 +117,6 @@ const helpConf = Object.assign({}, baseConf, {
filename: "help.bundle.js"
},
plugins: [
// new MiniCssExtractPlugin({
// filename: '[name].css',
// chunkFilename: '[id].css',
// ignoreOrder: false,
// }),
// new webpack.ProvidePlugin({
// $: "jquery",
// jQuery: "jquery"
// }),
new CopyWebpackPlugin([{ from: "static/images", to: "./" }]),
new HtmlWebpackPlugin({
template: "help-content.html",
Expand Down
6 changes: 4 additions & 2 deletions frontend/webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const merge = require('webpack-merge');
const {appConf, landingConf} = require('./webpack.common.js');
const {appConf, landingConf, helpConf} = require('./webpack.common.js');

const devConf = {
mode: "development",
devtool: "cheap-module-eval-source-map",
devServer: {
contentBase: './dist',
hot: true,
watchOptions: {
poll: true
Expand All @@ -22,5 +23,6 @@ const devConf = {

module.exports = [
merge(appConf, devConf),
merge(landingConf, devConf)
merge(landingConf, devConf),
merge(helpConf, devConf)
];

0 comments on commit 6f6cb9e

Please sign in to comment.