Added a functions to show siblings and the ability to suggest templates
This commit is contained in:
parent
2d729f8cc6
commit
45dbb84969
10
script.js
10
script.js
@ -174,6 +174,8 @@ function suggest(input, type) {
|
||||
existing.push(tag.toLowerCase())
|
||||
}
|
||||
break
|
||||
case 'template':
|
||||
break
|
||||
}
|
||||
var render = function(result) {
|
||||
var suggestlist = document.querySelector('#' + type + 'list')
|
||||
@ -287,6 +289,14 @@ function removeTag(event) {
|
||||
parent.remove(tag)
|
||||
}
|
||||
|
||||
function showSiblings(event) {
|
||||
event.preventDefault()
|
||||
var siblings = event.currentTarget.parentNode.children
|
||||
for (var i = 0; i < siblings.length; i++) {
|
||||
siblings[i].classList.toggle('hidden')
|
||||
}
|
||||
}
|
||||
|
||||
function saveProduct(event) {
|
||||
event.preventDefault()
|
||||
var action = document.activeElement.id
|
||||
|
Loading…
x
Reference in New Issue
Block a user