vnode.state.awesomplete = new Awesomplete(vnode.dom, {
list: vnode.attrs.options,
minChars: 0,
+ maxItems: 1000000,
autoFirst: true,
+ sort: false,
})
vnode.state.create = vnode.attrs.create
vnode.state.options = vnode.attrs.options
vnode.state.sessionDB = new SessionDB()
// Get vocabulary
vnode.state.vocabulary = m.stream({"strict":false, "tags":{}})
- m.request('/vocabulary.json').then(vnode.state.vocabulary)
+ var vocabularyTimestamp = parseInt(Date.now() / 300000) // Bust cache every 5 minutes
+ m.request('/vocabulary.json?v=' + vocabularyTimestamp).then(vnode.state.vocabulary)
vnode.state.editMode = vnode.attrs.targetEditable
vnode.state.tags = []
vnode.state.dirty = m.stream(false)
onclick: function(e) {
var tags = {}
vnode.state.tags.forEach(function(t) {
- if (t.name() != '' && t.value() != '') {
+ // Only ignore tags with empty key
+ if (t.name() != '') {
tags[t.name()] = t.value()
}
})