From f5906d4c07f84d05814ca9c22013fb1355e20847 Mon Sep 17 00:00:00 2001 From: trendschau Date: Sat, 25 Dec 2021 22:13:12 +0100 Subject: [PATCH] use datalist for visual shortcode search --- system/author/js/vue-blox.js | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/system/author/js/vue-blox.js b/system/author/js/vue-blox.js index 6c97327..b808bbd 100644 --- a/system/author/js/vue-blox.js +++ b/system/author/js/vue-blox.js @@ -788,7 +788,6 @@ const shortcodeComponent = Vue.component('shortcode-component', { shortcodedata: false, shortcodename: '', markdown: '', - searchresults: [], } }, template: '
' + @@ -798,11 +797,10 @@ const shortcodeComponent = Vue.component('shortcode-component', { '' + '
' + '' + - '' + - '
' + - '
' + - '{{item}}' + - '
' + + '' + + '' + + '' + + '' + '
' + '
' + '' + @@ -861,26 +859,6 @@ const shortcodeComponent = Vue.component('shortcode-component', { }, createmarkdown: function(shortcodename,attribute) { - - /* search */ - this.searchresults = []; - - if(this.shortcodedata[shortcodename][attribute].content !== undefined && this.shortcodedata[shortcodename][attribute].value != '') - { - var searchterm = this.shortcodedata[shortcodename][attribute].value; - var searchitems = this.shortcodedata[shortcodename][attribute].content; - - for(var item in searchitems) - { - if(searchitems[item].indexOf(searchterm) > -1 && searchitems[item] !== searchterm) - { - this.searchresults.push(searchitems[item]); - if(this.searchresults.length > 4){ break; } - } - } - } - - /* markdown */ var attributes = ''; for (var attribute in this.shortcodedata[shortcodename]) {