Releases: simov/express-admin
Blob data types + translations + fixes
Blob data types
Inside settings.json
the control type for blob/bytea fields can be configured like this
{
"file": true,
"binary": true
}
This will add an input type=file
control to the editview, but instead uploading the file to the upload folder, it will store it directly into the database.
Currently the support for blob fields is very basic, if you have any comments leave them in the issue tracker
Translations
Bugfixes
SQLite Support
Install the SQLite bindings
Like with PostgreSQL you need to install the SQLite bindings separately
# SQLite only: run this inside the express-admin folder
$ npm install [email protected]
The module used is https://github.com/mapbox/node-sqlite3 and it's outlined inside the documentation as well http://simov.github.io/express-admin-site/#install
Creating new project
- When prompted for Database type: type
sqlite
- When prompted for Database name: type the
/absolute/path/to/your/database.sqlite
Auto incrementing primary keys
Since SQLite has its own build in auto incrementing id field called rowid
you can configure your project to use them like this:
- add this id column definition inside your table's columns array
"columns": [
{
"verbose": "id",
"name": "rowid",
"control": {
"text": true
},
"type": "int(11)",
"allowNull": false,
"defaultValue": null,
"listview": {
"show": false
},
"editview": {
"show": false
}
},
...
]
- Inside the table key set the primary key to be the rowid of the table
"table": {
"name": "...",
"pk": "rowid",
"verbose": "..."
}
Pull the latest examples from https://github.com/simov/express-admin-examples/ and see how it's done there
Event Hooks
- Implemented event hooks: http://simov.github.io/express-admin-site/#events
- preSave
- postSave
- Fixed date formatting for timestamps inside the Listview
- Bugfix inside Mainview when only one custom app is available not configured as a view
- Improved German translation
- Added examples for pre-selecting a theme, showing images and customizing Many to Many label appearance inside the Listview: https://github.com/simov/express-admin-examples/tree/master/examples/custom/static
Listview Search Filter
- Listview search filter
- Custom column ordering
- Fixed redirect to last active page in Listview after certain actions taken inside the Editview
There is a new option available for each table's listview
key inside settings.json
http://simov.github.io/express-admin-site/#settingsjson
"table_name": {
...
"listview": {
"order": { ... },
"page": 25,
"filter": ["column_name1", "column_name2" ...]
}
}
Add any table's column including oneToMany
and manyToMany
columns. Pull the latest examples from https://github.com/simov/express-admin-examples/ and take a look at the controls
table to see how all currently available control types look like inside the Filter panel.
To expand the Filter panel click on the small icon next to the Listview's title.
All filtering options set inside the Filter panel are perceived through the entire user's session. Click on the Clear
button at any time to clear the filtering options.
New control types
- migrated to Bootstrap/Bootswatch 3.0.3
- migrated to Bootstrap Datetimepicker - https://github.com/smalot/bootstrap-datetimepicker in place of jQuery UI Datepicker
- new controls:
date
,time
,datetime
,year
,radio
andstatic select
- http://simov.github.io/express-admin-site/#example-column - new controls example inside the examples repository
- example database for PostgreSQL inside the examples repository - https://github.com/simov/express-admin-examples/
- fixed quotes not being escaped inside string data types
Show many to many columns inside the listview
- the selected value for many to many columns can be shown inside the listview like any other regular column: http://simov.github.io/express-admin-site/#many-to-many
"listview": {
"show": true
}
- add new record button for each column inside the mainview
- bugfix for many to many with allow null when inserting
File Uploads
- the default location for file uploads is
public/upload
make sure you have rights to write there - the upload folder location can be configured from the
config.json
file http://simov.github.io/express-admin-site/#configjson - any regular text field can be configured to have a file control inside
settings.json
"control": {
"file": true
}
- fixed urls path bug in listview
PostgreSQL Support
- For now the https://github.com/brianc/node-postgres module is installed separately:
$ [sudo] npm install [-g] express-admin
# PostgreSQL only: run this inside the express-admin folder
$ npm install [email protected]
http://simov.github.io/express-admin-site/#install
- The PostgreSQL connection options are set through the
pg
key http://simov.github.io/express-admin-site/#configjson
Express Admin Embedding
- Updated to the latest version of express (3.4.4)
- Express Admin now can be embedded into existing expressjs application
- Breaking changes into the
custom.json
object structure
Migrated to Bootstrap 3
- Migrated to Bootstrap/Bootswatch 3
- Overall better support for mobile devices
- Updated to the latest version of chosen