There is a global data structure in "wikibase.fetchedEntities",
though, this one does not contain all entities ever displayed in the
drop-down but only those actually selected at some point. Adding some
data-attribute to the li-elements would indeed be a good idea I guess.

Cheers,
Daniel

2013/9/9 Magnus Manske <[email protected]>:
> Hi all,
>
> for my latest toy [1] I would really like to get the item IDs (Qxxx) for the
> items in the dropdown box when editing a claim that points to an item.
>
> I can get the item IDs for the search dropdown via the link hrefs, but
> didn't find anything similar in the "role='menuitem'" <li>s for the edit
> box.
>
> Is there a global data structure with the ID list I could access? Are the
> IDs attached to DOM nodes via jQuery data()? A hook I can add my function
> to? Or something else I could use?
>
> Alternatively, could you add an attribute (e.g. "itemid='Qxxx'") to the <li>
> nodes? Shouldn't be too hard, as it couldn't really break anything AFAICT.
> Could be really handy.
>
> Thanks,
> Magnus
>
>
> [1] http://magnusmanske.de/wordpress/?p=64
>
>
> _______________________________________________
> Wikidata-tech mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
>



-- 
Daniel Werner
Software Engineer

Wikimedia Deutschland e.V. | Obentrautstr. 72 | 10963 Berlin
Tel. (030) 219 158 26-0

http://wikimedia.de

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg
unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das
Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985.

_______________________________________________
Wikidata-tech mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech

Reply via email to