simov / express-admin

MySQL, MariaDB, PostgreSQL, SQLite admin for Node.js
MIT License
1.17k stars 223 forks source link

Custom control for column #98

Closed markusuntera closed 8 years ago

markusuntera commented 8 years ago

Hi Is it possible or are you planning to add custom controls for column? For example to add map (OpenLayers or Leaflet etc) for choosing location (save lat/long)?

simov commented 8 years ago

You can inject some js/jquery code inside the editview, and initialize your map accordingly. The column type will be regular text box. You just need to hook the map with the text field.

Take a look at the examples repository. You can find a few examples there showing how to add custom code in the browser.

markusuntera commented 8 years ago

Thanx. Managed to do it.

vojtechvrbka commented 7 years ago

Hi,

Can you explain how you did it ? Or could you please tell me specific example, I can't find any that injects js inside the editview.

Thank you

simov commented 7 years ago

Hi @vojtechvrbka ,

Take a look at this example: https://github.com/simov/express-admin-examples/tree/master/config/custom/editors