yogiben / meteor-autoform-modals

Adds modals to insert/update/delete Meteor collections
63 stars 41 forks source link

Open modal with JavaScript #52

Open mazing opened 9 years ago

mazing commented 9 years ago

Can I open the modals 'programatically'?

I have a table and instead of having a link in a table cell, I want to use

'click tbody > tr': function (e, template) {
  // open modal
},

to open the modals.

mpowaga commented 9 years ago

You can do it programatically but it's a bit more complicated as you would have to set some session variables manually.

luixal commented 8 years ago

I'm facing the same problem. Having a button for updating items when you're showing a table makes an app quite unusable.

¿Could you post some further information on this or include an easier way to do this?

KalalauEnterprises commented 8 years ago

Me too! I'd really love to be able to trigger the update and remove modals from code, since I populate my reactive table in a helper, not an #each statement in the template. Thanks!!!

jupiterkenji commented 8 years ago

You can do this:

$('a[operation="update"]').trigger('click');

where a is the button