mirror of
https://github.com/cosmocode/dokuwiki-plugin-struct.git
synced 2025-08-06 10:24:17 +00:00
use data ttribute for autocompletion
this moves the whole field creation to a separate function and adds the full qualified column name as a data attribute. This is needed because we can not rely on the field's name to figure out the column name as it will be unrelated in bureaucracy use
This commit is contained in:
@ -86,10 +86,7 @@ jQuery(function () {
|
||||
jQuery('input.struct_autocomplete').autocomplete({
|
||||
ismulti: false,
|
||||
source: function (request, cb) {
|
||||
var name = this.element.attr('name');
|
||||
name = name.substring(19, name.length - 1);
|
||||
name = name.replace('][', '.');
|
||||
|
||||
var name = jQuery(this.element[0]).closest('label').data('column');
|
||||
var term = request.term;
|
||||
if (this.options.ismulti) {
|
||||
term = extractLast(term);
|
||||
|
Reference in New Issue
Block a user