put module app json into init,making orbit app work with module app.
This commit is contained in:
1 parent
3d573680b2
commit
f9bcb27efc
15 files changed
+349
-66
No files matched your search
@@ -10,12 +10,12 @@
|
||||
</div>
|
||||
|
||||
<span id='module_app_list'>
|
||||
<%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %>
|
||||
<%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :label, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %>
|
||||
</span>
|
||||
|
||||
<span id='widget_list'>
|
||||
<%#= f.select :widget_path, @module_app.widgets.collect{|widget| [widget.humanize, widget]}, :selected => @part.widget_path %>
|
||||
<%= f.select :widget_path, @module_app.widgets.collect{|k,v| [k.humanize, k]}, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %>
|
||||
<%= f.select :widget_path, @module_app.get_widget_for_select, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %>
|
||||
</span>
|
||||
|
||||
<span id='widget_style_list'>
|
||||
@@ -34,18 +34,10 @@
|
||||
</span>
|
||||
|
||||
<span id='widget_field'>
|
||||
|
||||
<%= render 'widget_fields' %>
|
||||
|
||||
<%#= f.label :widget_field %>
|
||||
<%# @module_app.widget_fields.each_with_index do |widget_field, i| %>
|
||||
<%#= i+1 %>
|
||||
<%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, (@part.widget_field ? @part.widget_field[i] : nil) ), :include_blank => true %> <br />
|
||||
<%# end %>
|
||||
|
||||
<%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, @part.widget_field.collect{|widget_field| widget_field}), {:multiple => :multiple, :size => 6} %>
|
||||
</span>
|
||||
|
||||
|
||||
<div id="widget_data_count">
|
||||
<%= f.label :widget_data_count %>
|
||||
<%= f.text_field :widget_data_count %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|k,v| k}) %>");
|
||||
$('#widget_list select').html("<%= j options_for_select(@module_app.get_widget_for_select) %>");
|
||||
$('#widget_style_list').html("<%= escape_javascript(select 'page_part', 'widget_style', @module_app.widgets[@widget_path]) if !@widget_path.blank? %>");
|
||||
$('#widget_field').html("<%= j render 'widget_fields' %>");
|
||||
$('#widget_category').html("<%= j render 'widget_categories' %>");
|
||||
|
||||
Reference in new issue
Block a user