It appears you cannot run a select-one-or-new-dialog for a phantom row like
input-many creates...

I am thinking about having the "+" sign on the hjq-input-many actually
commit the new row, so then I can run the dialog on it.  Just not sure how
to do that yet.

Any idea on how to make the "+"/"-"s commit and delete in realtime, so then
I can use the dialog on it?


----
Mike Karp
(m) 650.793.0695
(e) [email protected]


On Wed, Sep 12, 2012 at 11:59 PM, Mike <[email protected]> wrote:

> Hi everyone,
>
> I am trying to create a good way to handle a many-to-many relationship
> that has a type field associated in the relationship table.
>
> Person <-> Role (with type field) <-> Company
>
> I am working on the Person form, using a <hjq-input-many> on the role as
> the object (accessible = true) on role.  Basically:
>
> <extend tag="form" for="Person">
>
> <old-form merge>
>
> <field-list:>
>
> <roles-view:>
>
>  <hjq-input-many>
>
> <item:>
>
> <field-list fields="role_type,company">
>
>  <company-view:>
>
>  <select-one-or-new-dialog/>
>
>  </company-view:>
>
>  </field-list>
>
>  </item:>
>
>  </hjq-input-many>
>
> </roles-view:>
>
> </field-list:>
>
> </old-form>
>
> </extend>
>
> This looks great!  And, seems to work just fine with instances where the
> role "row" already exists (i.e. update).  Put if you click the "+" and add
> a new role, then the dialog pops up and is not editable.
>
> I think this is because I am getting too far from the intended use (deeper
> in the model), and more specifically because it is expecting the role row
> to exist...you can kind of see this if you look at the HTML that is created:
>
> <button class="hjq-dialog-open-button"
> onclick="hjq.dialog_opener.click(this, jQuery('#hjq-dialog-*-company*'));
> return false;">
>
>     New
>
> </button>
>
> for a new row versus this for an update instance
>
> <button class="hjq-dialog-open-button"
> onclick="hjq.dialog_opener.click(this, jQuery('#hjq-dialog-*
> role-73-company*')); return false;">
>
>     New
>
> </button>
>
> Anyone done anything like this?  Any better ways to edit a many-to-many
> with a type field in the relationship table?  Any way to fix the above?
>
> Thanks!!
>
> Mike
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/oxuOEjtZDmEJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to