Thanks for the input. I've managed to get the basic functionality by
defining a new tag and making use of the ajax_updater code in the Rapid
Editor library.
<def tag="datetime-editor" attrs="update, message"><%
raise HoboError.new("Not allowed to edit") unless can_edit?
f = ajax_updater(object_url(this_parent, :method => :put),
update,
:method => "put",
:message => message,
:spinner_next_to => Hobo.raw_js("this"),
:params => { this_parent.class.name.underscore => {
this_field => Hobo.raw_js('this.value')
} })
%>
<hjq-datetimepicker onChange="#{f}" value='&this'
dateFormat='yy-mm-dd'/>
</def>
This seems to provide the desired functionality but the text box looks
terrible. Now I need to get it to work more like the date time editor, so
that it looks nice until it's clicked on. I'm not sure how much trouble it
would be. Basically, I think the ideal solution is to replace the editor for
the Rapid datetime editor with a decent datetime picker. Now I just need to
understand how to go about doing that.
Jordan
On Mon, May 16, 2011 at 4:47 PM, Bryan Larsen <[email protected]>wrote:
> Hmm, hjq-datepicker is not an editor, but your functionality shouldn't
> be too hard to add.
>
> 1: put the datepicker inside an ajax form.
> 2: in the datepicker onSelect, call hjq.form.submit.
>
> Sorry for being terse -- hope you can figure it out from there.
> Repost if you have troubles, hopefully I'll have more time for
> answers, then.
>
> Bryan
>
> On Mon, May 16, 2011 at 4:27 PM, Patricio <[email protected]>
> wrote:
> > Jordan,
> >
> > You might want to take a look at this:
> > http://cookbook.hobocentral.net/api_tag_defs/hjq-datepicker
> > (and this http://cookbook.hobocentral.net/plugins/hobo-jquery)
> >
> > Patricio
> >
> > --
> > 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.
> >
>
> --
> 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.
>
>
--
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.