Skip to content

Commit

Permalink
Merge branch 'master' into greenkeeper/sass-loader-7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermendes authored May 2, 2018
2 parents 22b48d2 + 32915bc commit 74c6eb5
Show file tree
Hide file tree
Showing 16 changed files with 113 additions and 703 deletions.
23 changes: 22 additions & 1 deletion components/forms/PybossaForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,11 @@ export default {
process () {
this.processing = true
this.alert = ''
return this.$axios({
method: this.form.method,
url: this.form.endpoint,
data: this.form.model,
data: this.getModel(),
params: this.form.params || {},
headers: {
'X-CSRFToken': this.form.model.csrf
Expand Down Expand Up @@ -235,6 +236,26 @@ export default {
})
},
/**
* Return the form model after converting any multiselect fields.
*/
getModel () {
const modelCopy = JSON.parse(JSON.stringify(this.form.model))
const multiselectFields = this.form.schema.fields.filter(field => {
return field.type === 'vueMultiSelect'
})
for (let field of multiselectFields) {
let value = modelCopy[field.model]
if (Array.isArray(value)) {
modelCopy[field.model] = value.map(item => (item.id))
} else if (value) {
modelCopy[field.model] = value.id
}
}
return modelCopy
},
/**
* Emit success and go to next, if present.
* @param {Object} data
Expand Down
75 changes: 0 additions & 75 deletions components/modals/AddExportField.vue

This file was deleted.

4 changes: 2 additions & 2 deletions components/modals/AddFormField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
]
},
selectOptions: {
hideNoneSelected: true
hideNoneSelectedText: true
},
validator: (value) => {
if (!value || !value.length) {
Expand All @@ -89,7 +89,7 @@ export default {
return model.type !== 'input'
},
selectOptions: {
hideNoneSelected: true
hideNoneSelectedText: true
},
validator: (value, field, model) => {
if ((!value || !value.length) && model.type === 'input') {
Expand Down
9 changes: 0 additions & 9 deletions layouts/admin-collection-dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,6 @@ export default {
}
}
},
{
label: 'Exports',
link: {
name: 'admin-collection-short_name-exports',
params: {
short_name: this.currentCollection.short_name
}
}
},
{
label: 'Featured Projects',
link: {
Expand Down
4 changes: 2 additions & 2 deletions layouts/bases/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ export default {
},
backgroundImageUrl: {
type: String,
required: true
default: ''
},
navbarBrand: {
type: String,
required: true
default: ''
}
},
Expand Down
5 changes: 4 additions & 1 deletion layouts/collection-default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export default {
},
backgroundImageUrl () {
if (this.currentCollection.info.background) {
if (
typeof this.currentCollection.info !== 'undefined' &&
this.currentCollection.info.background
) {
return this.currentCollection.info.background
}
return '~/assets/img/app-background.jpg'
Expand Down
5 changes: 4 additions & 1 deletion layouts/collection-tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export default {
},
backgroundImageUrl () {
if (this.currentCollection.info.background) {
if (
typeof this.currentCollection.info !== 'undefined' &&
this.currentCollection.info.background
) {
return this.currentCollection.info.background
}
return '~/assets/img/app-background.jpg'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
"@nuxtjs/proxy": "^1.1.4",
"@nuxtjs/pwa": "^2.0.2",
"@nuxtjs/sentry": "^1.0.3",
"bootstrap": "4.0.0",
"bootstrap": "4.1.1",
"bootstrap-vue": "^2.0.0-rc.6",
"capitalize": "^1.0.0",
"chartist-plugin-tooltips": "0.0.17",
"clipboard": "^1.7.1",
"clipboard": "^2.0.1",
"cookie": "^0.3.1",
"cookieconsent": "^3.0.4",
"croppie": "^2.5.0",
Expand Down
177 changes: 0 additions & 177 deletions pages/admin/collection/_short_name/exports/_id/index.vue

This file was deleted.

Loading

0 comments on commit 74c6eb5

Please sign in to comment.