[Nitro] [PATCH] Controls patch + bugfix

Bryan Soto bryan.a.soto at gmail.com
Fri Jan 6 19:38:10 EST 2006


Hi Jonas,

I like the password control, it's very cool. And you beat me to that
Nitro::RenderExit that was bugging me ;)

As a note for George, both this and Chris' patch implement the plus/minus
button for fixnums, so if you use both, you'll have conflicts. Only
difference I noticed was, when the fixnum field contained "TEST":

Chris' patch:
would consider this as 0, and increment or decrement.

Jonas' patch:
is stricter and converts this to nan (Not a number).

Other than that, everything seems to work as advertised. :)

Jonas, I wonder if I understand controls correctly. You specify controls for
properties, via annotations or directly in the model, than you can use
form_for to have Nitro just create the form for you rather than coding
everything out in the view? Is that right?

bryan

On 1/6/06, Jonas Pfenniger <zimba.tm at gmail.com> wrote:
>
> Ok, didn't know this.
>
> Here it is :)
>
> George Moschovitis wrote:
>
> >Yeah, please resend this patch as a .gz/.zip attachment, gmail fucks
> >up with the patch.
> >
> >thanks again ;-)
> >
> >-g.
> >
> >On 1/6/06, Peter Abrahamsen <rainhead at gmail.com> wrote:
> >
> >
> >>Jonas,
> >>
> >>Thanks for your work. Would you mind sending future patches as
> >>attachments?
> >>
> >>Thanks!
> >>
> >>P
> >>
> >>On Jan 6, 2006, at 12:21 AM, Jonas Pfenniger wrote:
> >>
> >>
> >>
> >>>Hi,
> >>>
> >>>this patch contains three different things
> >>>
> >>>* Implemented the + and - for Fixnum control
> >>>* Added a password control
> >>>
> >>>class User
> >>>  property :password, String, :control => :password
> >>>end
> >>>
> >>>* Corrected a small bug in part/admin avoiding the generation on the
> >>>css. It was using RenderExit intead of Nitro::RenderExit
> >>>
> >>>
> >>>Cheers,
> >>>  zimba.tm
> >>>
> >>>New patches:
> >>>
> >>>[Implemented FixNum control's javascript
> >>>Jonas Pfenniger <zimba.tm at gmail.com>**20060105203222] {
> >>>hunk ./nitro/lib/nitro/helper/form/controls.rb 84
> >>>-    %{<input type="text" id="#{prop.symbol}_ctl" name="#
> >>>{prop.symbol}" value="#{value}"#{emit_style} /> + -}
> >>>+    %{<input type="text" id="#{prop.symbol}_ctl" name="#
> >>>{prop.symbol}" value="#{value}"#{emit_style} /> <a href="#"
> >>>onclick="e=document.getElementById('#{prop.symbol}
> >>>_ctl');e.value=parseInt(e.value)+1;return false;">+</a> <a href="#"
> >>>onclick="e=document.getElementById('#{prop.symbol}
> >>>_ctl');e.value=parseInt(e.value)-1;return false;">-</a>}
> >>>}
> >>>
> >>>[Added password control
> >>>Jonas Pfenniger <zimba.tm at gmail.com>**20060106081508] {
> >>>hunk ./nitro/lib/nitro/helper/form/controls.rb 109
> >>>+# Password
> >>>+
> >>>+class PasswordControl < Control
> >>>+  setting :style, :default => 'width: 250px', :doc => 'The default
> >>>style'
> >>>+
> >>>+  def render
> >>>+    %{<input type="password" id="#{prop.symbol}_ctl" name="#
> >>>{prop.symbol}" value="#{value}"#{emit_style} />}
> >>>+  end
> >>>+end
> >>>+
> >>>hunk ./nitro/lib/nitro/helper/form/controls.rb 256
> >>>+    :password => PasswordControl,
> >>>}
> >>>
> >>>[Corrected small bug. part/admin was using RenderExit instead of
> >>>Nitro::RenderExit
> >>>Jonas Pfenniger <zimba.tm at gmail.com>**20060106081739] {
> >>>hunk ./nitro/src/part/admin/controller.rb 59
> >>>-        raise RenderExit
> >>>+        raise Nitro::RenderExit
> >>>}
> >>>
> >>>Context:
> >>>
> >>>[More flexible elements, auto inject ElementMixin if needed, handle
> >>>elements in Nitro::Element namespace (safer), rdoc fixes.
> >>>George Moschovitis <gm at navel.gr>**20060105134500]
> >>>[Moved wee into helpers from adapter, some rdocs.
> >>>George Moschovitis <gm at navel.gr>**20060105111714]
> >>>[Add db dump/reload functionality, fixed some bugs too.
> >>>George Moschovitis <gm at navel.gr>**20060104164703]
> >>>[Charset setting for admin part.
> >>>George Moschovitis <gm at navel.gr>**20060104112006]
> >>>[Added support for WebFiles (ie file uploads) featuring imagemagick
> >>>integration, thumbnails etc. Based on OgFile. Still under
> >>>construction. Also added a new Gallery example to demonstrate this.
> >>>George Moschovitis <gm at navel.gr>**20060103173028]
> >>>[Added some template_root autodetection code, for more intelligent
> >>>Template.root defaults.
> >>>George Moschovitis <gm at navel.gr>**20060103105619]
> >>>[More rdoc stuff, og store fix.
> >>>George Moschovitis <gm at navel.gr>**20060103095522]
> >>>[fix_gen_executable
> >>>bryan.a.soto at gmail.com**20051227234324
> >>>
> >>> Makes reap generate a gen executable.
> >>>
> >>>]
> >>>[bugfix_scaffold
> >>>bryan.a.soto at gmail.com**20051230210508
> >>>
> >>> Specifies Nitro namespace so scaffolding can correctly fill Og
> >>>objects if user didn't include Nitro namespace in his app.
> >>>
> >>>]
> >>>[Better handling of errors on transactions. [timlarson]
> >>>George Moschovitis <gm at navel.gr>**20051230115326]
> >>>[More Rdocs and small fixes here and there...
> >>>George Moschovitis <gm at navel.gr>**20051230113524]
> >>>[Better handling of NoAction error. [tsume]
> >>>George Moschovitis <gm at navel.gr>**20051230110921]
> >>>[Updated ProjectInfo's to generate rdocs, added some more rdocs
> >>>comments here and there.
> >>>George Moschovitis <gm at navel.gr>**20051230102254]
> >>>[Bug fixed and optimized new reloader. Since the optimization is so
> >>>efficient autoreloading is enabled for live (production) sites by
> >>>default.
> >>>George Moschovitis <gm at navel.gr>**20051230092419]
> >>>[Implemented autoreload optimization (check for dirty). Much faster
> >>>development mode. [timlarson]
> >>>George Moschovitis <gm at navel.gr>**20051229163334]
> >>>[Even more CGI fixes. [james_b]
> >>>George Moschovitis <gm at navel.gr>**20051229142411]
> >>>[Some fixes to the Cgi infrastructure.
> >>>George Moschovitis <gm at navel.gr>**20051229134913]
> >>>[Removed obsolete files and directories.
> >>>George Moschovitis <gm at navel.gr>**20051229120449]
> >>>[Updated INSTALL docs. [tsume]
> >>>George Moschovitis <gm at navel.gr>**20051229115516]
> >>>[Added support for auto accumulation in Og collections + test case.
> >>>[epiperak]
> >>>George Moschovitis <gm at navel.gr>**20051229114008]
> >>>[Updated to scriptaculous 1.5.1
> >>>George Moschovitis <gm at navel.gr>**20051229110226]
> >>>[Small fixes in Rakefiles.
> >>>George Moschovitis <gm at navel.gr>**20051229104414]
> >>>[Use the generic setup.rb method for non-gem installation. [tsume]
> >>>George Moschovitis <gm at navel.gr>**20051229102613]
> >>>[Script compiler fixes, builder fixes, bumped version.
> >>>George Moschovitis <gm at navel.gr>**20051228120643]
> >>>[The helper alos requires the file (temp implementation).
> >>>George Moschovitis <gm at navel.gr>**20051227122318]
> >>>[Show off builder in flickr example.
> >>>George Moschovitis <gm at navel.gr>**20051227122200]
> >>>[More great javascript improvements, auto_require needed javascript
> >>>files.
> >>>George Moschovitis <gm at navel.gr>**20051227120036]
> >>>[Draggable, AutoComplete, many improvements to the javascript helper.
> >>>George Moschovitis <gm at navel.gr>**20051227112821]
> >>>[Pass compiler to morphers, compiler.shared for compiler-stage
> >>>shared memory and more compiler improvement.s
> >>>George Moschovitis <gm at navel.gr>**20051227104444]
> >>>[Cleaned up flickr.
> >>>George Moschovitis <gm at navel.gr>**20051227102526]
> >>>[Refactored javascript helper.
> >>>George Moschovitis <gm at navel.gr>**20051227092450]
> >>>[Small beautifications to the flickr example.
> >>>George Moschovitis <gm at navel.gr>**20051227085606]
> >>>[Implemented INCREDIBLE scriptgenerator for dead easy dhtml/ajax
> >>>effects. Updated Flickr example.
> >>>George Moschovitis <gm at navel.gr>**20051223165640]
> >>>[Implemented client-side morphers.
> >>>George Moschovitis <gm at navel.gr>**20051223133402]
> >>>[Added new flickr example.
> >>>George Moschovitis <gm at navel.gr>**20051223133313]
> >>>[Small fixes.
> >>>George Moschovitis <gm at navel.gr>**20051223091512]
> >>>[Fix to the glue mailer so bcc and cc work
> >>>rob at motionpath.com**20051222185208]
> >>>[Add Nitro:: scope to Server in admin part
> >>>chrisfarms at gmail.com**20051222220806]
> >>>[Test cases need gems and facets
> >>>rob at motionpath.com**20051222124409]
> >>>[tc_nitro_controller_aspect
> >>>bryan.a.soto at gmail.com**20051221224659
> >>>
> >>> Makes the test case pass.
> >>>
> >>>]
> >>>[bugfix_remove_breakpoint
> >>>bryan.a.soto at gmail.com**20051221220552
> >>>
> >>> Removes breakpoint call from test case. Was loading active_support
> >>>(Yes, Rails) from rake test runs.
> >>>
> >>>]
> >>>[TAG 0.26.0
> >>>George Moschovitis <gm at navel.gr>**20051223090149]
> >>>Patch bundle hash:
> >>>37efb29f89448c234d6ff840ea2b91d0157360c6
> >>>_______________________________________________
> >>>Nitro-general mailing list
> >>>Nitro-general at rubyforge.org
> >>>http://rubyforge.org/mailman/listinfo/nitro-general
> >>>
> >>>
> >>
> >>_______________________________________________
> >>Nitro-general mailing list
> >>Nitro-general at rubyforge.org
> >>http://rubyforge.org/mailman/listinfo/nitro-general
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >--
> >http://www.gmosx.com
> >http://www.navel.gr
> >http://www.nitrohq.com
> >
> >_______________________________________________
> >Nitro-general mailing list
> >Nitro-general at rubyforge.org
> >http://rubyforge.org/mailman/listinfo/nitro-general
> >
> >
> >
>
>
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060106/1455b3df/attachment.html 


More information about the Nitro-general mailing list