Move calls to json_encode from Smarty templates to variable lists
- Address https://github.com/friendica/friendica/issues/12011#issuecomment-1518577079
This commit is contained in:
parent
9dc5557fb7
commit
9788984b06
3 changed files with 8 additions and 8 deletions
|
@ -126,19 +126,19 @@
|
|||
|
||||
// Custom visibility tags inputs
|
||||
let acl_groups = new Bloodhound({
|
||||
local: {{$acl_groups|@json_encode nofilter}},
|
||||
local: {{$acl_groups nofilter}},
|
||||
identify: function(obj) { return obj.type + '-' + obj.id.toString(); },
|
||||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(['name']),
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
});
|
||||
let acl_contacts = new Bloodhound({
|
||||
local: {{$acl_contacts|@json_encode nofilter}},
|
||||
local: {{$acl_contacts nofilter}},
|
||||
identify: function(obj) { return obj.type + '-' + obj.id.toString(); },
|
||||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(['name', 'addr']),
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
});
|
||||
let acl = new Bloodhound({
|
||||
local: {{$acl_list|@json_encode nofilter}},
|
||||
local: {{$acl_list nofilter}},
|
||||
identify: function(obj) { return obj.type + '-' + obj.id.toString(); },
|
||||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(['name', 'addr']),
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
let $recipient_input = $('[name="recipient"]');
|
||||
|
||||
let acl = new Bloodhound({
|
||||
local: {{$contacts|@json_encode nofilter}},
|
||||
local: {{$contacts nofilter}},
|
||||
identify: function(obj) { return obj.id.toString(); },
|
||||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(['name', 'addr']),
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue