node4good / formage

Bootstraped Admin GUI addon for mongoose, jugglingdb, or just as a form generator
formage.io
MIT License
186 stars 55 forks source link

select 2 infinite scroll or auto complete search for ref fields #95

Open jaideepdas opened 10 years ago

jaideepdas commented 10 years ago

Ref field should be something like http://ivaynberg.github.io/select2/#infinite or searchable field. If the list size goes beyond 50 entries rest of the entries wont show up till you set limit param but thats could become a performance issue when loading the page.

refack commented 10 years ago

There is a feature in development to allow autocomplete. By adding socket: true to the field in the schema, we'll register a websocket to allow server quarrying. You can enable it now by setting environment variable DEBUG=formage and setting a socketio instance on the registry (probably in app.js)

var server = http.createServer(app);
var socketio = require('socket.io');
var io = socketio.listen(server);

formage.init(app, express, models, {
    title: app.get('site') + ' Admin',
    username: registry.ADMIN.user,
    password: registry.ADMIN.password,
    socketio: socketio
});
jaideepdas commented 10 years ago

ok will give this a try thanks

On Sat, May 10, 2014 at 9:37 PM, Refael Ackermann notifications@github.comwrote:

There is a feature in development to allow autocomplete. By adding socket: true to the field in the schema, we'll register a websocket to allow server quarrying. You can enable it now by setting environment variable DEBUG=formage and setting a socketio instance on the registry (probably in app.js)

var server = http.createServer(app);var socketio = require('socket.io');var io = socketio.listen(server); formage.init(app, express, models, { title: app.get('site') + ' Admin', username: registry.ADMIN.user, password: registry.ADMIN.password, socketio: socketio});

— Reply to this email directly or view it on GitHubhttps://github.com/Empeeric/formage/issues/95#issuecomment-42746000 .

Have a nice day.

jaideepdas commented 10 years ago

but as a option for people who don't want to use web sockets the infinite scroll is a good option just a suggestion.

On Sat, May 10, 2014 at 11:42 PM, Jaideep Das jaideep.jdof@gmail.comwrote:

ok will give this a try thanks

On Sat, May 10, 2014 at 9:37 PM, Refael Ackermann < notifications@github.com> wrote:

There is a feature in development to allow autocomplete. By adding socket: true to the field in the schema, we'll register a websocket to allow server quarrying. You can enable it now by setting environment variable DEBUG=formage and setting a socketio instance on the registry (probably in app.js)

var server = http.createServer(app);var socketio = require('socket.io');var io = socketio.listen(server); formage.init(app, express, models, { title: app.get('site') + ' Admin', username: registry.ADMIN.user, password: registry.ADMIN.password, socketio: socketio});

— Reply to this email directly or view it on GitHubhttps://github.com/Empeeric/formage/issues/95#issuecomment-42746000 .

Have a nice day.

Have a nice day.

refack commented 10 years ago

Infinite scroll will also require a dedicated server connection. Be it a websocket or a dedicated URL...