Sha256: 3999c48443a1e0a48198a9b6963a02d705d9146cc81203e9a081830c7ad3752b
Contents?: true
Size: 1.16 KB
Versions: 50
Compression:
Stored size: 1.16 KB
Contents
(function() { scrivito.editors.stringlist_editor = { can_edit: function(element) { return $(element).is('[data-scrivito-field-type=stringlist]'); }, activate: function(element) { var field; field = $(element); if (!field.is("[tabindex]")) { field.attr("tabindex", 0); } return field.tagEditor({ initialTags: field.scrivito('content'), autocomplete: { source: (function(_this) { return function(request, response) { var fieldName; fieldName = $(element).data("scrivitoFieldName"); return scrivito.suggest_completion(fieldName, request.term).then(function(suggestions) { return response(suggestions); }); }; })(this) }, delimiter: "", forceLowercase: false, maxLength: Number.POSITIVE_INFINITY, onChange: function(field, editor, tags) { return field.scrivito('save', tags); } }); } }; scrivito.on('load', function() { return scrivito.define_editor('stringlist', scrivito.editors.stringlist_editor); }); }).call(this);
Version data entries
50 entries across 50 versions & 1 rubygems