I submitted a patch to AS for issues you were having.  I'll let you
know when it is pulled in and resolved.

On Jan 8, 5:20 pm, Michelschr <[email protected]> wrote:
> Thanks for your answer... but it seems that I have the latest version
> of the code, here is what I have in /frontend/defaults/views/
> list.rhtml:
>
> <div id="<%= active_scaffold_id -%>" class="active-scaffold active-
> scaffold-<%= controller_id %> <%= "#{params[:controller]}-view" %> <%=
> active_scaffold_config.theme %>-theme">
>   <div class="active-scaffold-header">
>     <%= render :partial => 'list_header' %>
>   </div>
>   <table cellpadding="0" cellspacing="0">
>     <tbody class="before-header" id="<%= before_header_id -%>"></
> tbody>
>   </table>
>   <div id="<%= active_scaffold_content_id -%>">
>     <%= render :partial => 'list' %>
>   </div>
> </div>
>
> <script type="text/javascript">
> <% if active_scaffold_config.theme != :default %>
> Rico.Corner.round($$('#<%= active_scaffold_id %> div.active-scaffold-
> header').first(), {color: 'fromElement', bgColor: 'fromParent',
> corners: 'top', compact: true});
> Rico.Corner.round($$('#<%= active_scaffold_id %> div.active-scaffold-
> footer').first(), {color: 'fromElement', bgColor: 'fromParent',
> corners: 'bottom', compact: true});
> <% end %>
> new ActiveScaffold.Actions.Table($$('#<%= active_scaffold_id -%>
> div.active-scaffold-header a.action'), $('<%= before_header_id -%>'), $
> ('<%= loading_indicator_id(:action => :table) -%>'))
> ActiveScaffold.server_error_response = '<p class="error-message
> message">'
>   + <%= as_('Request Failed (code 500, Internal Error)').to_json %>
>   + '<a href="#" onclick="Element.remove(this.parentNode); return
> false;">'
>   + <%= as_('Close').to_json %>
>   + '</a>'
>   + '</p>';
> </script>
> <% if active_scaffold_config.list.always_show_create %>
>   <script type="text/javascript">
>     <% link = action_link_id('new', nil) %>
>     $$("#<%= link %>").first().action_link.open()
>   </script>
> <% end %>
>
> The only place where I can find "show_on_list" is in my backup (not in
> the vendor directory).
>
> And I still have the problems:
>
> - In the n:1 and than n:1 case, AS shows an update form, and than
> complains about RJS Error, like Kumala explained
> - In the embedded scaffold, and then n:1, AS show a show subview
> (probably because in this case, create is not permitted with this
> controller, thus it's nice ...) but after the display it block with
> two popups where I should click on OK...
>
> For this 2nd problem, it's the same configuration that I explained the
> 7/1 20:34 (but now, with the new code, without any patch):
>
> " I have also a RJS error: Element is null, when I click on a many
> to one relation in an embedded scaffold:
>
> <%= render  :active_scaffold => "Demos",
>              :label => "Demos" %>
>
> class Kind < ActiveRecord::Base
>   has_many :apps
>
> class DemosController < DmoController
>
>   active_scaffold :app do |config|
>     config.actions.exclude :show
>     config.label = "Demos"
>     config.columns = [:kind, :title, :concepts, :description]
>     list.sorting = {:name => 'ASC'}
>   end
> (...)
> end
>
> Thus, the demosController/index list apps, with a column for the kinds
> and the problem appears when I click on kind... "
>
> In both case the result is correct, except the two alert popups. (But
> we should also try to see what append when we click back on the same
> link after the show or update... the second time, maybe AS will not
> show the result in the parent table...)
>
> I can difficultly isolate the problem better because the AS source
> code is still obscure to me... particularly, what the javascript is
> expecting in the different cases...
>
> Thus, your help is very very welcome... thanks in advance!
>
> On 8 jan, 21:52, yairgo <[email protected]> wrote:
>
> > Michelschr active_scaffold_config.create.show_on_list has been removed
> > if you are having problems with it get the latest code and make sure
> > that it is gone.  The option has been moved to
> > active_scaffold_config.list.always_show_create, there were errors with
> > the option residing on the create object.
>
> > Michelschr wrote:
> > > Sorry, but the problems are still there!!
>
> > > (I upgraded all the .js on both sites... It 's like the problems can
> > > be masked some time by the debugger...)
>
> > > On 8 jan, 15:44, "mr.gaffo" <[email protected]> wrote:
> > > > If you pull latest again (sorry) it'll fix this issue.
>
> > > > On Jan 7, 1:34 pm, Michelschr <[email protected]> wrote:
>
> > > > > OK, the problem is still with the last version of AS, (2/1/2009) (I
> > > > > redo everything... the SystemStackError disappear...)
>
> > > > > My only patch in the AS code is:
>
> > > > > <% if active_scaffold_config.actions.include?(:create) &&
> > > > > active_scaffold_config.create.show_on_list # MYPATCHES %>
> > > > > <%# if active_scaffold_config.create.show_on_list %>
>
> > > > > AND, I have also a RJS error: Element is null, when I click on a many
> > > > > to one relation in an embedded scaffold:
>
> > > > > <%= render :active_scaffold => "Demos",
> > > > > :label => "Demos" %>
>
> > > > > class Kind < ActiveRecord::Base
> > > > > has_many :apps
>
> > > > > class DemosController < DmoController
>
> > > > > active_scaffold :app do |config|
> > > > > config.actions.exclude :show
> > > > > config.label = "Demos"
> > > > > config.columns = [:kind, :title, :concepts, :description]
> > > > > list.sorting = {:name => 'ASC'}
> > > > > end
> > > > > (...)
> > > > > end
>
> > > > > Thus, the demosController/index list apps, with a column for the kinds
> > > > > and the problem appears when I click on kind...
>
> > > > > I just give you these information as is for the moment but I am trying
> > > > > to isolate better the problem to maybe present a more structured
> > > > > issue...
>
> > > > > On 7 jan, 16:12, "mr.gaffo" <[email protected]> wrote:
>
> > > > > > What version of AS?
> > > > > > What version of Rails?
>
> > > > > > On Jan 5, 9:45 am, Kumala <[email protected]> wrote:
>
> > > > > > > Sounds complicated but easy to replicate.
> > > > > > > I have 3 classes: Building, Room, Operator
> > > > > > > Building has many rooms / Room Belongs to Building
> > > > > > > Operator has many rooms / Room belongs to Operator
>
> > > > > > > I use
> > > > > > > config.columns[:building].form_ui = :select
> > > > > > > config.columns[:operator].form_ui = :select
> > > > > > > in the room controller to show a link to the building and the 
> > > > > > > operator
> > > > > > > in the list view. If I click on the operator link, I get the error
> > > > > > > message:
> > > > > > > RJS Error
> > > > > > > TypeError: element is null
>
> > > > > > > Element.update("room-messages","\n \n\n \n\n \n\n");
>
> > > > > > > Once I close the dialog box, everything continues as normal.
>
> > > > > > > How do I get rid of those error dialog boxes? Is this a bug?
>
> > > > > > > Here the code I have:
> > > > > > > class BuildingController < ApplicationController
> > > > > > > layout "standard"
> > > > > > > active_scaffold :building do |config|
> > > > > > > config.nested.add_link("Rooms", [:rooms])
> > > > > > > end
> > > > > > > end
> > > > > > > class RoomController < ApplicationController
> > > > > > > layout "standard"
> > > > > > > active_scaffold :room do |config|
> > > > > > > config.list.columns = [:name, :building,:operator]
> > > > > > > config.columns[:building].form_ui = :select
> > > > > > > config.columns[:operator].form_ui = :select
> > > > > > > end
> > > > > > > end
> > > > > > > class OperatorController < ApplicationController
> > > > > > > layout "standard"
> > > > > > > active_scaffold :operator do |config|
> > > > > > > config.list.columns = [:name]
> > > > > > > end
> > > > > > > end
> > > > > > > class Building < ActiveRecord::Base
> > > > > > > has_many :rooms
> > > > > > > end
> > > > > > > class Room < ActiveRecord::Base
> > > > > > > belongs_to :building
> > > > > > > belongs_to :operator
> > > > > > > end
> > > > > > > class Operator < ActiveRecord::Base
> > > > > > > has_many :rooms
> > > > > > > end
>
> > > > > > > Regards
> > > > > > > Andreas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to