diff --git a/cateditor/.eslintrc.js b/cateditor/.eslintrc.js
index 66364ea..fb1ab4e 100644
--- a/cateditor/.eslintrc.js
+++ b/cateditor/.eslintrc.js
@@ -5,8 +5,8 @@ module.exports = {
es6: true,
},
'extends': [
- 'plugin:vue/essential',
- '@vue/standard'
+ 'plugin:vue/recommended',
+ '@vue/standard',
],
plugins: [
'vuetify'
@@ -23,6 +23,11 @@ module.exports = {
'vuetify/no-deprecated-classes': 'error',
'vuetify/grid-unknown-attributes': 'error',
'vuetify/no-legacy-grid': 'error',
+ 'vue/multiline-html-element-content-newline': 'off',
+ 'vue/html-closing-bracket-spacing': 'off',
+ 'vue/max-attributes-per-line': 'off',
+ 'vue/singleline-html-element-content-newline': 'off',
+ 'vue/html-closing-bracket-newline': 'off',
},
parserOptions: {
parser: 'babel-eslint'
diff --git a/cateditor/src/components/AddProductDialog.vue b/cateditor/src/components/AddProductDialog.vue
index 6b8a993..bf60303 100644
--- a/cateditor/src/components/AddProductDialog.vue
+++ b/cateditor/src/components/AddProductDialog.vue
@@ -6,7 +6,7 @@
Add Materials
-
+
clear
@@ -20,15 +20,15 @@
placeholder="1001234
1001235..."
clearable
- >
+ />
-
+
Cancel
-
+
Add
-
+
@@ -40,12 +40,12 @@
import { mapActions } from 'vuex'
export default {
- data: () => ({
- text: null,
- }),
props: {
value: Boolean,
},
+ data: () => ({
+ text: null,
+ }),
computed: {
show: {
get() {
diff --git a/cateditor/src/components/AddSectionDialog.vue b/cateditor/src/components/AddSectionDialog.vue
index af343a9..d222476 100644
--- a/cateditor/src/components/AddSectionDialog.vue
+++ b/cateditor/src/components/AddSectionDialog.vue
@@ -4,31 +4,31 @@
-
+
clear
-
+ required
+ @keydown.enter.prevent="doNewSection()"
+ />
-
+
Cancel
OK
-
+
@@ -44,13 +44,13 @@ export default {
components: {
DialogHeading,
},
+ props: {
+ value: Boolean,
+ },
data: () => ({
name: '',
valid: false,
}),
- props: {
- value: Boolean,
- },
computed: {
show: {
get() {
diff --git a/cateditor/src/components/CatalogContents.vue b/cateditor/src/components/CatalogContents.vue
index 9443e82..33298cf 100644
--- a/cateditor/src/components/CatalogContents.vue
+++ b/cateditor/src/components/CatalogContents.vue
@@ -9,7 +9,7 @@
-
+
add
@@ -26,14 +26,14 @@
and so section-drop can cover all interior
-->
-
+
- {{sectionModelCount(item.id)}} {{sectionModelCount(item.id) | pluralize('model') }}
+ {{ sectionModelCount(item.id) }} {{ sectionModelCount(item.id) | pluralize('model') }}
-
+
@@ -67,11 +67,11 @@
@click="selectModel(item.model)"
>
-
+
- {{item.ids.length}} {{item.ids.length | pluralize('material') }}
+ {{ item.ids.length }} {{ item.ids.length | pluralize('material') }}
@@ -101,13 +101,13 @@
{{ item.id }} {{ item.name }}
-
+
@@ -200,83 +200,6 @@ export default {
},
},
- methods: {
- sectionModelCount(sectionID) {
- let section = this.section(sectionID)
- if (section) {
- let models = this.sectionModels(section) || []
- return models.length
- } else {
- return 0
- }
- },
-
- sectionListItemClasses(id, hovering) {
- if (id === this.selectedSectionID) {
- return 'list-item primary'
- } else if (hovering) {
- return 'list-item list-hover'
- } else {
- return 'list-item'
- }
- },
-
- modelListItemClasses(id, hovering) {
- if (id === this.selectedModelID) {
- return 'list-item primary'
- } else if (hovering) {
- return 'list-item list-hover'
- } else {
- return 'list-item'
- }
- },
-
- materialListItemClasses(id, hovering) {
- if (id === this.selectedMaterialID) {
- return 'list-item primary'
- } else if (hovering) {
- return 'list-item list-hover'
- } else {
- return 'list-item'
- }
- },
-
- popSectionInfo(id) {
- this.selectSection(id)
- this.showSectionInfoDialog = true
- },
-
- popSectionDelete(id) {
- this.selectSection(id)
- this.showSectionDeleteDialog = true
- },
-
- popModelInfo(id) {
- this.selectModel(id)
- this.showModelInfoDialog = true
- },
-
- popModelDelete(id) {
- this.selectModel(id)
- this.showModelDeleteDialog = true
- },
-
- popMaterialDelete(id) {
- this.selectMaterial(id)
- this.showMaterialDeleteDialog = true
- },
-
- ...mapActions([
- 'selectSection',
- 'selectModel',
- 'selectMaterial',
- 'reorderSection',
- 'reorderModel',
- 'reorderMaterial',
- 'moveModelToSection',
- 'moveMaterialToSection',
- ]),
- },
mounted: function() {
let me = this
@@ -359,6 +282,84 @@ export default {
},
})
},
+
+ methods: {
+ sectionModelCount(sectionID) {
+ let section = this.section(sectionID)
+ if (section) {
+ let models = this.sectionModels(section) || []
+ return models.length
+ } else {
+ return 0
+ }
+ },
+
+ sectionListItemClasses(id, hovering) {
+ if (id === this.selectedSectionID) {
+ return 'list-item primary'
+ } else if (hovering) {
+ return 'list-item list-hover'
+ } else {
+ return 'list-item'
+ }
+ },
+
+ modelListItemClasses(id, hovering) {
+ if (id === this.selectedModelID) {
+ return 'list-item primary'
+ } else if (hovering) {
+ return 'list-item list-hover'
+ } else {
+ return 'list-item'
+ }
+ },
+
+ materialListItemClasses(id, hovering) {
+ if (id === this.selectedMaterialID) {
+ return 'list-item primary'
+ } else if (hovering) {
+ return 'list-item list-hover'
+ } else {
+ return 'list-item'
+ }
+ },
+
+ popSectionInfo(id) {
+ this.selectSection(id)
+ this.showSectionInfoDialog = true
+ },
+
+ popSectionDelete(id) {
+ this.selectSection(id)
+ this.showSectionDeleteDialog = true
+ },
+
+ popModelInfo(id) {
+ this.selectModel(id)
+ this.showModelInfoDialog = true
+ },
+
+ popModelDelete(id) {
+ this.selectModel(id)
+ this.showModelDeleteDialog = true
+ },
+
+ popMaterialDelete(id) {
+ this.selectMaterial(id)
+ this.showMaterialDeleteDialog = true
+ },
+
+ ...mapActions([
+ 'selectSection',
+ 'selectModel',
+ 'selectMaterial',
+ 'reorderSection',
+ 'reorderModel',
+ 'reorderMaterial',
+ 'moveModelToSection',
+ 'moveMaterialToSection',
+ ]),
+ }
}
function addSectionDrops(myvue) {
diff --git a/cateditor/src/components/CatalogEditor.vue b/cateditor/src/components/CatalogEditor.vue
index 96ca06f..cee1595 100644
--- a/cateditor/src/components/CatalogEditor.vue
+++ b/cateditor/src/components/CatalogEditor.vue
@@ -6,7 +6,7 @@
Catalog info
-
+
Contents
@@ -15,27 +15,27 @@
-
+
Cancel
Next
+ class="black--text"
+ @click="step = 2">Next
-
+
Cancel
Back
Done
+ class="black--text"
+ @click.stop="saveCatalog()">Done
@@ -308,6 +310,14 @@ export default {
'selectedCatalog',
]),
},
+ mounted: function() {
+ this.loadMyCatalogs()
+ this.loadPublicCatalogs()
+ this.interval = setInterval(() => {
+ this.loadMyCatalogs()
+ this.loadPublicCatalogs()
+ }, 10000)
+ },
methods: {
...mapActions([
'setSelectedCatalog',
@@ -318,14 +328,6 @@ export default {
this.setSelectedCatalog(cat.id)
},
},
- mounted: function() {
- this.loadMyCatalogs()
- this.loadPublicCatalogs()
- this.interval = setInterval(() => {
- this.loadMyCatalogs()
- this.loadPublicCatalogs()
- }, 10000)
- }
}
diff --git a/cateditor/src/components/DialogHeading.vue b/cateditor/src/components/DialogHeading.vue
index ccfbfbb..7b9c88b 100644
--- a/cateditor/src/components/DialogHeading.vue
+++ b/cateditor/src/components/DialogHeading.vue
@@ -2,8 +2,8 @@
{{ title }}
-
-
+
+
diff --git a/cateditor/src/components/DragListHeading.vue b/cateditor/src/components/DragListHeading.vue
index dede27a..1a8d7a2 100644
--- a/cateditor/src/components/DragListHeading.vue
+++ b/cateditor/src/components/DragListHeading.vue
@@ -2,18 +2,18 @@
{{ title }}
-
-
+
+
diff --git a/cateditor/src/components/ExitEditorDialog.vue b/cateditor/src/components/ExitEditorDialog.vue
index 8690763..1f369ec 100644
--- a/cateditor/src/components/ExitEditorDialog.vue
+++ b/cateditor/src/components/ExitEditorDialog.vue
@@ -4,7 +4,7 @@
-
+
clear
@@ -14,7 +14,7 @@
-
+
Back to editing
Quit
@@ -31,11 +31,11 @@ export default {
components: {
DialogHeading,
},
- data: () => ({
- }),
props: {
value: Boolean,
},
+ data: () => ({
+ }),
computed: {
show: {
get() {
diff --git a/cateditor/src/components/Loading.vue b/cateditor/src/components/Loading.vue
index 3ef9fbb..12c7df8 100644
--- a/cateditor/src/components/Loading.vue
+++ b/cateditor/src/components/Loading.vue
@@ -11,11 +11,11 @@
diff --git a/cateditor/src/components/MaterialDeleteDialog.vue b/cateditor/src/components/MaterialDeleteDialog.vue
index 3dd3154..cf89ed5 100644
--- a/cateditor/src/components/MaterialDeleteDialog.vue
+++ b/cateditor/src/components/MaterialDeleteDialog.vue
@@ -3,7 +3,7 @@
-
+
clear
@@ -17,10 +17,10 @@
-
+
Cancel
OK
-
+
@@ -35,11 +35,11 @@ export default {
components: {
DialogHeading,
},
- data: () => ({
- }),
props: {
value: Boolean,
},
+ data: () => ({
+ }),
computed: {
...mapGetters([
'selectedSection',
diff --git a/cateditor/src/components/ModelDeleteDialog.vue b/cateditor/src/components/ModelDeleteDialog.vue
index 107aa7f..d824126 100644
--- a/cateditor/src/components/ModelDeleteDialog.vue
+++ b/cateditor/src/components/ModelDeleteDialog.vue
@@ -3,7 +3,7 @@
-
+
clear
@@ -16,10 +16,10 @@
-
+
Cancel
OK
-
+
@@ -34,11 +34,11 @@ export default {
components: {
DialogHeading,
},
- data: () => ({
- }),
props: {
value: Boolean,
},
+ data: () => ({
+ }),
computed: {
show: {
get() {
diff --git a/cateditor/src/components/ModelInfoDialog.vue b/cateditor/src/components/ModelInfoDialog.vue
index d8f159a..da2951e 100644
--- a/cateditor/src/components/ModelInfoDialog.vue
+++ b/cateditor/src/components/ModelInfoDialog.vue
@@ -3,20 +3,20 @@
-
+
clear
-
- {{modelMaterialCount}} {{modelMaterialCount | pluralize('material') }}
+
+ {{ modelMaterialCount }} {{ modelMaterialCount | pluralize('material') }}
-
+
OK
-
+
@@ -31,11 +31,11 @@ export default {
components: {
DialogHeading,
},
- data: () => ({
- }),
props: {
value: Boolean,
},
+ data: () => ({
+ }),
computed: {
show: {
get() {
diff --git a/cateditor/src/components/Navbar.vue b/cateditor/src/components/Navbar.vue
index f9ddd8a..b9006cc 100644
--- a/cateditor/src/components/Navbar.vue
+++ b/cateditor/src/components/Navbar.vue
@@ -1,12 +1,12 @@
-
+
ProCatalog
{{ pageTitle }}
-
+
Dashboard
diff --git a/cateditor/src/components/PDFProgress.vue b/cateditor/src/components/PDFProgress.vue
index 18f6990..e532fb8 100644
--- a/cateditor/src/components/PDFProgress.vue
+++ b/cateditor/src/components/PDFProgress.vue
@@ -4,9 +4,9 @@
+ v-on="on"
+ />
{{ percentDone }}% complete
diff --git a/cateditor/src/components/SectionDeleteDialog.vue b/cateditor/src/components/SectionDeleteDialog.vue
index 28dccfe..71a004d 100644
--- a/cateditor/src/components/SectionDeleteDialog.vue
+++ b/cateditor/src/components/SectionDeleteDialog.vue
@@ -3,7 +3,7 @@
-
+
clear
@@ -16,10 +16,10 @@
-
+
Cancel
OK
-
+
@@ -34,8 +34,6 @@ export default {
components: {
DialogHeading,
},
- data: () => ({
- }),
props: {
value: Boolean,
section: {
@@ -43,6 +41,8 @@ export default {
required: false
}
},
+ data: () => ({
+ }),
computed: {
show: {
get() {
diff --git a/cateditor/src/components/SectionInfoDialog.vue b/cateditor/src/components/SectionInfoDialog.vue
index 990df5a..11e5356 100644
--- a/cateditor/src/components/SectionInfoDialog.vue
+++ b/cateditor/src/components/SectionInfoDialog.vue
@@ -3,21 +3,21 @@
-
+
clear
-
- {{sectionModelCount}} {{sectionModelCount | pluralize('model') }}
- {{sectionMaterialCount}} {{sectionMaterialCount | pluralize('material') }}
+
+ {{ sectionModelCount }} {{ sectionModelCount | pluralize('model') }}
+ {{ sectionMaterialCount }} {{ sectionMaterialCount | pluralize('material') }}
-
+
OK
-
+
@@ -32,11 +32,11 @@ export default {
components: {
DialogHeading,
},
- data: () => ({
- }),
props: {
value: Boolean,
},
+ data: () => ({
+ }),
computed: {
show: {
get() {