Announcement

  •  » Engine
  •  » Where are the tag names generated in batchmanager?

#1 2020-02-11 16:18:37

Crythes
Member
2020-01-23
43

Where are the tag names generated in batchmanager?

Hello/Hi/Greetings,

In batchmanager -> action -> add keyword you get a list of all the keywords/tags you have in your selection. Looking at the html code for that specific section it looks something like that

Code:

<div class="selectize-dropdown multi plugin-remove_button" style="display: none; width: 400px; top: 36px; left: 0px; visibility: visible;">
   <div class="selectize-dropdown-content"><div data-value="~~63~~" data-selectable="" class="option">Insects</div>
</div>

But I can't for the life of me find the second div item in any of the .tpl or .php files in the Piwigo files. Where are these html lines generated?

Thank you.

Piwigo version: 2.10.1
PHP version: 5.4.16
MySQL version: 5.7.28-31

Offline

 

#2 2020-05-14 11:14:44

Zacharieg
Member
2020-05-14
1

Re: Where are the tag names generated in batchmanager?

Hello Crythes !

Actually, you couldn't guess it because the answer of your question is in the JavaScript.

In the .tpl you can read in the add kewords section :

Code:

<div id="action_add_tags" class="bulkAction">
      <select data-selectize="tags" data-create="true" placeholder="{'Type in a search term'|translate}"
        name="add_tags[]" multiple style="width:400px;"></select>
    </div>

But in facts this select is hide because it is replaced with a "Selectize" input (see here : https://selectize.github.io/selectize.js/ )

Code:

{* <!-- TAGS --> *}
  var tagsCache = new TagsCache({
    serverKey: '{$CACHE_KEYS.tags}',
    serverId: '{$CACHE_KEYS._hash}',
    rootUrl: '{$ROOT_URL}'
  });

  tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: {
    'Add': '{'Create'|translate}'
  }});

If you have others question about that feel free to ask ;)

Offline

 
  •  » Engine
  •  » Where are the tag names generated in batchmanager?

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2020 · Contact