Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nodenogg-duplicate
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adam Procter
nodenogg-duplicate
Commits
d6cf349f
Commit
d6cf349f
authored
4 years ago
by
Adam Procter
Browse files
Options
Downloads
Patches
Plain Diff
trying to save all sort positions
parent
93f9e1f0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/components/CardsLayer.vue
+21
-4
21 additions, 4 deletions
app/src/components/CardsLayer.vue
app/src/views/Cards.vue
+2
-2
2 additions, 2 deletions
app/src/views/Cards.vue
with
23 additions
and
6 deletions
app/src/components/CardsLayer.vue
+
21
−
4
View file @
d6cf349f
...
...
@@ -258,11 +258,28 @@ export default {
},
methods
:
{
save
()
{
this
.
$options
.
myArray
.
forEach
((
node
,
key
)
=>
{
console
.
log
(
'
key
'
+
key
,
'
:
'
+
node
.
node_text
)
})
},
nodePositionIndex
(
e
)
{
console
.
log
(
e
.
newIndex
)
// this index is where I came from so object
console
.
log
(
e
.
oldIndex
)
// var items = this.configPositions.map((node_sort, index) => {
// console.log(items)
// console.log(node_sort)
// console.log(index)
// })
// this.$options.myArray.forEach((node, key) => {
// console.log(node.node_text, key)
// })
// var items = this.items.map(function (item, index) {
// console.log(items)
// return { item: item, order: index }
// })
// console.log(e)
// console.log(e.newIndex)
// this index is where came from
// console.log(e.oldIndex)
nodeid
=
e
.
item
.
firstChild
.
firstChild
.
id
nodesort
=
e
.
newIndex
this
.
$store
.
dispatch
(
'
sortNode
'
,
{
nodeid
,
nodesort
})
...
...
This diff is collapsed.
Click to expand it.
app/src/views/Cards.vue
+
2
−
2
View file @
d6cf349f
...
...
@@ -55,7 +55,7 @@
<
script
>
import
CardsLayer
from
'
@/components/CardsLayer
'
import
OtherCardslayer
from
'
@/components/OtherCardslayer
'
//
import OtherCardslayer from '@/components/OtherCardslayer'
import
OnBoard
from
'
@/components/OnBoard
'
import
UploadLayer
from
'
@/components/UploadLayer
'
...
...
@@ -129,7 +129,7 @@ export default {
},
components
:
{
CardsLayer
,
OtherCardslayer
,
//
OtherCardslayer,
UploadLayer
,
OnBoard
,
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment