active_scaffold_vho 3.0.31 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +9 -1
- data/Gemfile.lock +8 -79
- data/Rakefile +17 -20
- data/active_scaffold_vho.gemspec +374 -15
- data/{frontends/default → app/assets}/images/add.gif +0 -0
- data/{frontends/default → app/assets}/images/arrow_down.gif +0 -0
- data/{frontends/default → app/assets}/images/arrow_up.gif +0 -0
- data/{frontends/default → app/assets}/images/close.gif +0 -0
- data/{frontends/default → app/assets}/images/close_touch.png +0 -0
- data/{frontends/default → app/assets}/images/config.png +0 -0
- data/{frontends/default → app/assets}/images/cross.png +0 -0
- data/{frontends/default → app/assets}/images/gears.png +0 -0
- data/{frontends/default → app/assets}/images/indicator-small.gif +0 -0
- data/{frontends/default → app/assets}/images/indicator.gif +0 -0
- data/{frontends/default → app/assets}/images/magnifier.png +0 -0
- data/app/assets/javascripts/active_scaffold.js.erb +12 -0
- data/{frontends/default → app/assets}/javascripts/jquery/active_scaffold.js +73 -245
- data/app/assets/javascripts/jquery/date_picker_bridge.js.erb +24 -0
- data/app/assets/javascripts/jquery/jquery-ui-timepicker-addon.js +1060 -0
- data/{frontends/default → app/assets}/javascripts/jquery/jquery.editinplace.js +1 -1
- data/{lib/active_scaffold/bridges/tiny_mce/public → app/assets}/javascripts/jquery/tiny_mce_bridge.js +4 -3
- data/{frontends/default → app/assets}/javascripts/prototype/active_scaffold.js +36 -122
- data/{frontends/default → app/assets}/javascripts/prototype/dhtml_history.js +0 -0
- data/{frontends/default → app/assets}/javascripts/prototype/form_enhancements.js +0 -0
- data/{frontends/default → app/assets}/javascripts/prototype/rico_corner.js +0 -0
- data/{frontends/default/stylesheets/stylesheet-ie.css → app/assets/stylesheets/active_scaffold-ie.css} +0 -0
- data/{frontends/default/stylesheets/stylesheet.css → app/assets/stylesheets/active_scaffold.css.erb} +24 -22
- data/app/assets/stylesheets/jquery-ui-timepicker-addon.css +6 -0
- data/frontends/default/views/_action_group.html.erb +1 -1
- data/frontends/default/views/_base_form.html.erb +1 -1
- data/frontends/default/views/_form_association_footer.html.erb +11 -7
- data/frontends/default/views/_horizontal_subform_record.html.erb +5 -9
- data/frontends/default/views/_list.html.erb +1 -2
- data/frontends/default/views/_list_inline_adapter.html.erb +10 -0
- data/frontends/default/views/_list_messages.html.erb +2 -2
- data/frontends/default/views/_list_pagination.html.erb +6 -3
- data/frontends/default/views/_list_pagination_links.html.erb +9 -0
- data/frontends/default/views/_list_record.html.erb +2 -1
- data/frontends/default/views/_list_record_columns.html.erb +2 -1
- data/frontends/default/views/_list_with_header.html.erb +1 -1
- data/frontends/default/views/_messages.html.erb +0 -1
- data/frontends/default/views/_render_field.js.erb +13 -0
- data/frontends/default/views/_vertical_subform_record.html.erb +5 -9
- data/frontends/default/views/add_existing.js.erb +20 -0
- data/frontends/default/views/destroy.js.erb +24 -0
- data/frontends/default/views/{edit_associated.js.rjs → edit_associated.js.erb} +3 -2
- data/frontends/default/views/form_messages.js.erb +1 -0
- data/frontends/default/views/list.js.erb +1 -0
- data/frontends/default/views/on_action_update.js.erb +13 -0
- data/frontends/default/views/on_create.js.erb +45 -0
- data/frontends/default/views/on_mark_all.js.erb +12 -0
- data/frontends/default/views/on_update.js.erb +31 -0
- data/frontends/default/views/update_column.js.erb +16 -0
- data/frontends/default/views/update_row.js.erb +1 -0
- data/init.rb +1 -7
- data/lib/active_scaffold/actions/delete.rb +3 -5
- data/lib/active_scaffold/actions/field_search.rb +2 -6
- data/lib/active_scaffold/actions/list.rb +16 -14
- data/lib/active_scaffold/actions/search.rb +3 -3
- data/lib/active_scaffold/active_record_permissions.rb +2 -25
- data/lib/active_scaffold/attribute_params.rb +21 -44
- data/lib/active_scaffold/bridges/calendar_date_select/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/date_picker/bridge.rb +2 -16
- data/lib/active_scaffold/bridges/date_picker/lib/datepicker_bridge.rb +86 -56
- data/lib/active_scaffold/bridges/file_column/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/file_column/lib/as_file_column_bridge.rb +1 -1
- data/lib/active_scaffold/bridges/file_column/lib/file_column_helpers.rb +1 -1
- data/lib/active_scaffold/bridges/paperclip/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/paperclip/lib/paperclip_bridge_helpers.rb +2 -2
- data/lib/active_scaffold/bridges/shared/date_bridge.rb +3 -3
- data/lib/active_scaffold/bridges/tiny_mce/bridge.rb +0 -12
- data/lib/active_scaffold/bridges/validation_reflection/lib/validation_reflection_bridge.rb +1 -1
- data/lib/active_scaffold/config/base.rb +1 -1
- data/lib/active_scaffold/config/core.rb +1 -8
- data/lib/active_scaffold/config/delete.rb +1 -1
- data/lib/active_scaffold/config/field_search.rb +1 -22
- data/lib/active_scaffold/config/list.rb +10 -18
- data/lib/active_scaffold/data_structures/action_link.rb +9 -0
- data/lib/active_scaffold/data_structures/action_links.rb +1 -1
- data/lib/active_scaffold/data_structures/column.rb +4 -30
- data/lib/active_scaffold/data_structures/nested_info.rb +3 -3
- data/lib/active_scaffold/data_structures/sorting.rb +1 -1
- data/lib/active_scaffold/engine.rb +8 -0
- data/lib/active_scaffold/extensions/action_controller_rendering.rb +22 -0
- data/lib/active_scaffold/extensions/action_view_rendering.rb +79 -59
- data/lib/active_scaffold/extensions/action_view_resolver.rb +4 -2
- data/lib/active_scaffold/extensions/active_association_reflection.rb +3 -3
- data/lib/active_scaffold/extensions/reverse_associations.rb +3 -3
- data/lib/active_scaffold/finder.rb +27 -39
- data/lib/active_scaffold/helpers/association_helpers.rb +3 -3
- data/lib/active_scaffold/helpers/form_column_helpers.rb +3 -3
- data/lib/active_scaffold/helpers/human_condition_helpers.rb +2 -4
- data/lib/active_scaffold/helpers/list_column_helpers.rb +16 -22
- data/lib/active_scaffold/helpers/search_column_helpers.rb +1 -1
- data/lib/active_scaffold/helpers/view_helpers.rb +35 -13
- data/lib/active_scaffold/locale/de.rb +120 -0
- data/lib/active_scaffold/locale/en.rb +119 -0
- data/lib/active_scaffold/version.rb +2 -2
- data/lib/active_scaffold.rb +12 -27
- data/lib/active_scaffold_env.rb +3 -3
- data/test/mock_app/public/stylesheets/active_scaffold/default/stylesheet.css +1 -1
- metadata +84 -86
- data/.gitignore +0 -42
- data/frontends/default/views/_render_field.js.rjs +0 -10
- data/frontends/default/views/add_existing.js.rjs +0 -17
- data/frontends/default/views/destroy.js.rjs +0 -23
- data/frontends/default/views/form_messages.js.rjs +0 -1
- data/frontends/default/views/list.js.rjs +0 -1
- data/frontends/default/views/on_action_update.js.rjs +0 -10
- data/frontends/default/views/on_create.js.rjs +0 -41
- data/frontends/default/views/on_mark_all.js.rjs +0 -12
- data/frontends/default/views/on_update.js.rjs +0 -28
- data/frontends/default/views/update_column.js.rjs +0 -13
- data/frontends/default/views/update_row.js.rjs +0 -1
- data/lib/active_scaffold/bridges/date_picker/public/javascripts/date_picker_bridge.js +0 -36
- data/lib/active_scaffold/bridges/tiny_mce/public/javascripts/prototype/tiny_mce_bridge.js +0 -21
- data/lib/active_scaffold/locale/de.yml +0 -120
- data/lib/active_scaffold/locale/en.yml +0 -115
- data/lib/active_scaffold_assets.rb +0 -45
data/.gitignore
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
# rcov generated
|
2
|
-
coverage
|
3
|
-
|
4
|
-
# rdoc generated
|
5
|
-
rdoc
|
6
|
-
|
7
|
-
# yard generated
|
8
|
-
doc
|
9
|
-
.yardoc
|
10
|
-
|
11
|
-
# bundler
|
12
|
-
.bundle
|
13
|
-
|
14
|
-
# jeweler generated
|
15
|
-
pkg
|
16
|
-
|
17
|
-
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
18
|
-
#
|
19
|
-
# * Create a file at ~/.gitignore
|
20
|
-
# * Include files you want ignored
|
21
|
-
# * Run: git config --global core.excludesfile ~/.gitignore
|
22
|
-
#
|
23
|
-
# After doing this, these files will be ignored in all your git projects,
|
24
|
-
# saving you from having to 'pollute' every project you touch with them
|
25
|
-
#
|
26
|
-
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
27
|
-
#
|
28
|
-
# For MacOS:
|
29
|
-
#
|
30
|
-
#.DS_Store
|
31
|
-
#
|
32
|
-
# For TextMate
|
33
|
-
#*.tmproj
|
34
|
-
#tmtags
|
35
|
-
#
|
36
|
-
# For emacs:
|
37
|
-
#*~
|
38
|
-
#\#*
|
39
|
-
#.\#*
|
40
|
-
#
|
41
|
-
# For vim:
|
42
|
-
#*.swp
|
@@ -1,10 +0,0 @@
|
|
1
|
-
column = active_scaffold_config.columns[render_field.to_sym]
|
2
|
-
options = {:is_subform => false, :field_class => "#{column.name}-input"}
|
3
|
-
if column_renders_as(column) == :subform
|
4
|
-
options[:is_subform] = true
|
5
|
-
end
|
6
|
-
page.call 'ActiveScaffold.render_form_field', source_id, render(:partial => form_partial_for_column(column), :locals => { :column => column, :scope => params[:scope] }), options
|
7
|
-
render(:partial => "render_field", :collection => column.update_columns) if column.update_columns && !column.update_columns.empty?
|
8
|
-
|
9
|
-
|
10
|
-
|
@@ -1,17 +0,0 @@
|
|
1
|
-
new_row = render :partial => 'list_record', :locals => {:record => @record}
|
2
|
-
page << "ActiveScaffold.create_record_row('#{active_scaffold_id}','#{escape_javascript(new_row)}', #{{:insert_at => :top}.to_json});"
|
3
|
-
page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}
|
4
|
-
|
5
|
-
if (form_stays_open = true)
|
6
|
-
# why not just re-render the form? that wouldn't utilize a possible do_new override which sets default values.
|
7
|
-
page.call 'ActiveScaffold.reset_form', element_form_id
|
8
|
-
page.call 'ActiveScaffold.replace_html', element_messages_id(:action => :add_existing), render(:partial => 'form_messages')
|
9
|
-
# have to delay the focus, because there's no "firstElement" in prototype until at least one element is not disabled
|
10
|
-
if ActiveScaffold.js_framework == :prototype
|
11
|
-
page.delay 0.1 do
|
12
|
-
page << "ActiveScaffold.focus_first_element_of_form('#{element_form_id}');"
|
13
|
-
end
|
14
|
-
end
|
15
|
-
else
|
16
|
-
page << "ActiveScaffold.find_action_link('#{element_form_id(:action => :new_existing)}').close();"
|
17
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
messages_id = active_scaffold_messages_id
|
2
|
-
if controller.send(:successful?)
|
3
|
-
if render_parent? && controller.respond_to?(:render_component_into_view)
|
4
|
-
render_parent_options
|
5
|
-
if render_parent_action == :row
|
6
|
-
# TODO: That s not working with delete....
|
7
|
-
page << "ActiveScaffold.delete_record_row('#{element_row_id(:controller_id => "as_#{id_from_controller(params[:eid] || params[:parent_sti])}", :action => 'list', :id => params[:id])}','#{url_for(params_for(:action => :index, :id => nil, :page => [active_scaffold_config.list.user.page.to_i - 1, 1].max, :escape => false))}');"
|
8
|
-
messages_id = active_scaffold_messages_id(:controller_id => "as_#{id_from_controller(params[:eid] || params[:parent_sti])}")
|
9
|
-
elsif render_parent_action == :index
|
10
|
-
parent_rendered = controller.send(:render_component_into_view, render_parent_options)
|
11
|
-
page << parent_rendered
|
12
|
-
end
|
13
|
-
#page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}
|
14
|
-
elsif (active_scaffold_config.delete.refresh_list)
|
15
|
-
page.call 'ActiveScaffold.replace_html', active_scaffold_content_id, render(:partial => 'list', :layout => false)
|
16
|
-
else
|
17
|
-
page << "ActiveScaffold.delete_record_row('#{element_row_id(:action => 'list', :id => params[:id])}','#{url_for(params_for(:action => :index, :id => nil, :page => [active_scaffold_config.list.user.page.to_i - 1, 1].max, :escape => false))}');"
|
18
|
-
page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}
|
19
|
-
end
|
20
|
-
else
|
21
|
-
flash[:error] = active_scaffold_error_messages_for(@record, :object_name => "#{@record.class.model_name.human.downcase}#{@record.new_record? ? '' : ": #{@record.to_label}"}", :header_message => '', :message => "#{@record.class.model_name.human.downcase}#{@record.new_record? ? '' : ": #{@record.to_label}"}", :container_tag => nil, :list_type => :br)
|
22
|
-
end
|
23
|
-
page.call 'ActiveScaffold.replace_html', messages_id, render(:partial => 'messages')
|
@@ -1 +0,0 @@
|
|
1
|
-
page.replace_html element_messages_id, :partial => 'form_messages'
|
@@ -1 +0,0 @@
|
|
1
|
-
page.call 'ActiveScaffold.replace_html', active_scaffold_content_id, render(:partial => 'list', :layout => false)
|
@@ -1,10 +0,0 @@
|
|
1
|
-
if controller.send :successful?
|
2
|
-
page.call 'ActiveScaffold.replace_html', active_scaffold_messages_id, render(:partial => 'messages')
|
3
|
-
page.call 'ActiveScaffold.update_row', element_row_id(:action => :list, :id => @record.id), render(:partial => 'list_record', :locals => {:record => @record}) if @record
|
4
|
-
page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}
|
5
|
-
else
|
6
|
-
flash[:error] = active_scaffold_error_messages_for(@record, :object_name => "#{@record.class.model_name.human.downcase}#{@record.new_record? ? '' : ": #{@record.to_label}"}", :header_message => '', :message => "#{@record.class.model_name.human.downcase}#{@record.new_record? ? '' : ": #{@record.to_label}"}", :container_tag => nil, :list_type => :br)
|
7
|
-
page.call 'ActiveScaffold.replace_html', active_scaffold_messages_id, render(:partial => 'messages')
|
8
|
-
page.call 'ActiveScaffold.scroll_to', active_scaffold_messages_id
|
9
|
-
end
|
10
|
-
|
@@ -1,41 +0,0 @@
|
|
1
|
-
form_selector = "#{element_form_id(:action => :create)}"
|
2
|
-
insert_at ||= :top
|
3
|
-
page << "var action_link = ActiveScaffold.find_action_link('#{form_selector}');"
|
4
|
-
page << "action_link.update_flash_messages('#{escape_javascript(render(:partial => 'messages').strip)}');"
|
5
|
-
if controller.send :successful?
|
6
|
-
if render_parent? && controller.respond_to?(:render_component_into_view)
|
7
|
-
parent_rendered = controller.send(:render_component_into_view, render_parent_options)
|
8
|
-
if nested_singular_association?
|
9
|
-
page << "action_link.close('#{escape_javascript(parent_rendered)}');"
|
10
|
-
else
|
11
|
-
if render_parent_action == :row
|
12
|
-
page << "ActiveScaffold.create_record_row(action_link.scaffold(),'#{escape_javascript(parent_rendered)}', #{{:insert_at => insert_at}.to_json});"
|
13
|
-
elsif render_parent_action == :index
|
14
|
-
page << parent_rendered
|
15
|
-
end
|
16
|
-
page << "action_link.close();"
|
17
|
-
end
|
18
|
-
#page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}
|
19
|
-
elsif (active_scaffold_config.create.refresh_list)
|
20
|
-
page.call 'ActiveScaffold.replace_html', active_scaffold_content_id, render(:partial => 'list', :layout => false)
|
21
|
-
elsif params[:parent_controller].nil?
|
22
|
-
new_row = render :partial => 'list_record', :locals => {:record => @record}
|
23
|
-
page << "ActiveScaffold.create_record_row(action_link.scaffold(),'#{escape_javascript(new_row)}', #{{:insert_at => insert_at}.to_json});"
|
24
|
-
page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}
|
25
|
-
end
|
26
|
-
|
27
|
-
unless render_parent?
|
28
|
-
if (active_scaffold_config.create.persistent)
|
29
|
-
page << "action_link.reload();"
|
30
|
-
else
|
31
|
-
page << "action_link.close();"
|
32
|
-
end
|
33
|
-
if (active_scaffold_config.create.edit_after_create)
|
34
|
-
page << "var link = $('#{action_link_id 'edit', @record.id}');"
|
35
|
-
page << "if (link) (function() { link.action_link.open() }).defer();"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
else
|
39
|
-
page.call 'ActiveScaffold.replace', form_selector, render(:partial => 'create_form', :locals => {:xhr => true})
|
40
|
-
page.call 'ActiveScaffold.scroll_to', form_selector
|
41
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
options = {:checked => mark_all,
|
2
|
-
:include_mark_all => true}
|
3
|
-
page << "ActiveScaffold.mark_records('#{active_scaffold_tbody_id}', #{options.to_json});"
|
4
|
-
if active_scaffold_config.model.marked.length>0 then
|
5
|
-
if active_scaffold_config.model.marked.length < @page.pager.count then
|
6
|
-
page.call 'ActiveScaffold.replace_html', active_scaffold_messages_id, active_scaffold_config.model.marked.length.to_s + " records marked. Press <a href=\""+url_for(:action=>"mark_all",:mark_target=>"scope")+"\">here</a> to select all #{@page.pager.count} records.".html_safe
|
7
|
-
else
|
8
|
-
page.call 'ActiveScaffold.replace_html', active_scaffold_messages_id, "All #{@page.pager.count} records marked"
|
9
|
-
end
|
10
|
-
else
|
11
|
-
page.call 'ActiveScaffold.replace_html', active_scaffold_messages_id, ""
|
12
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
form_selector = "#{element_form_id(:action => :update)}"
|
2
|
-
|
3
|
-
page << "var action_link = ActiveScaffold.find_action_link('#{form_selector}');"
|
4
|
-
page << "action_link.update_flash_messages('#{escape_javascript(render(:partial => 'messages').strip)}');"
|
5
|
-
if controller.send :successful?
|
6
|
-
if render_parent? && controller.respond_to?(:render_component_into_view)
|
7
|
-
parent_rendered = controller.send(:render_component_into_view, render_parent_options)
|
8
|
-
if nested_singular_association?
|
9
|
-
page << "action_link.close('#{escape_javascript(parent_rendered)}');"
|
10
|
-
else
|
11
|
-
if render_parent_action == :row
|
12
|
-
page << "action_link.close('#{escape_javascript(parent_rendered)}');"
|
13
|
-
elsif render_parent_action == :index
|
14
|
-
page << parent_rendered
|
15
|
-
end
|
16
|
-
end
|
17
|
-
#page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}
|
18
|
-
elsif update_refresh_list?
|
19
|
-
page.call 'ActiveScaffold.replace_html', active_scaffold_content_id, render(:partial => 'list', :layout => false)
|
20
|
-
else
|
21
|
-
updated_row = render :partial => 'list_record', :locals => {:record => @record}
|
22
|
-
page << "action_link.close('#{escape_javascript(updated_row)}');"
|
23
|
-
page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}
|
24
|
-
end
|
25
|
-
else
|
26
|
-
page.call 'ActiveScaffold.replace', form_selector, render(:partial => 'update_form', :locals => {:xhr => true})
|
27
|
-
page.call 'ActiveScaffold.scroll_to', form_selector
|
28
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
column_span_id ||= element_cell_id(:id => @record.id.to_s, :action => 'update_column', :name => params[:column])
|
2
|
-
unless controller.send :successful?
|
3
|
-
page.call 'alert', @record.errors.full_messages.join("\n")
|
4
|
-
@record.reload
|
5
|
-
end
|
6
|
-
column = active_scaffold_config.columns[params[:column]]
|
7
|
-
if column.inplace_edit
|
8
|
-
page.call 'ActiveScaffold.replace_html', column_span_id, format_inplace_edit_column(@record, column)
|
9
|
-
else
|
10
|
-
formatted_value = get_column_value(@record, column)
|
11
|
-
page.call 'ActiveScaffold.replace_html', column_span_id, formatted_value
|
12
|
-
end
|
13
|
-
page.call 'ActiveScaffold.replace_html', active_scaffold_calculations_id(column), render_column_calculation(column) if column.calculation?
|
@@ -1 +0,0 @@
|
|
1
|
-
page.call 'ActiveScaffold.update_row', element_row_id(:action => 'list', :id => @record.id), render(:partial => 'list_record', :locals => {:record => @record})
|
@@ -1,36 +0,0 @@
|
|
1
|
-
$(document).ready(function() {
|
2
|
-
$(document).on('as:form_loaded', 'form.as_form, form.inplace_form', function(event) {
|
3
|
-
var as_form = $(this).closest("form");
|
4
|
-
as_form.find('input.datetime_picker').each(function(index) {
|
5
|
-
var date_picker = $(this);
|
6
|
-
if (typeof(date_picker.datetimepicker) == 'function') {
|
7
|
-
date_picker.datetimepicker();
|
8
|
-
}
|
9
|
-
});
|
10
|
-
|
11
|
-
as_form.find('input.date_picker').each(function(index) {
|
12
|
-
var date_picker = $(this);
|
13
|
-
if (typeof(date_picker.datepicker) == 'function') {
|
14
|
-
date_picker.datepicker();
|
15
|
-
}
|
16
|
-
});
|
17
|
-
return true;
|
18
|
-
});
|
19
|
-
$(document).on('as:form_unloaded', 'form.as_form, form.inplace_form', function(event) {
|
20
|
-
var as_form = $(this).closest("form");
|
21
|
-
as_form.find('input.datetime_picker').each(function(index) {
|
22
|
-
var date_picker = $(this);
|
23
|
-
if (typeof(date_picker.datetimepicker) == 'function') {
|
24
|
-
date_picker.datetimepicker('destroy');
|
25
|
-
}
|
26
|
-
});
|
27
|
-
|
28
|
-
as_form.find('input.date_picker').each(function(index) {
|
29
|
-
var date_picker = $(this);
|
30
|
-
if (typeof(date_picker.datepicker) == 'function') {
|
31
|
-
date_picker.datepicker('destroy');
|
32
|
-
}
|
33
|
-
});
|
34
|
-
return true;
|
35
|
-
});
|
36
|
-
});
|
@@ -1,21 +0,0 @@
|
|
1
|
-
document.on('as:form_loaded', 'form.as_form', function(event) {
|
2
|
-
var as_form = event.findElement('form');
|
3
|
-
as_form.select('textarea.mceEditor').each(function(elem) {
|
4
|
-
tinyMCE.execCommand('mceAddControl', false, elem.id);
|
5
|
-
});
|
6
|
-
return true;
|
7
|
-
});
|
8
|
-
document.on('as:form_submit', 'form.as_form', function(event) {
|
9
|
-
var as_form = event.findElement('form');
|
10
|
-
if (as_form.select('textarea.mceEditor').length > 0) {
|
11
|
-
tinyMCE.triggerSave();
|
12
|
-
}
|
13
|
-
return true;
|
14
|
-
});
|
15
|
-
document.on('as:form_unloaded', 'form.as_form', function(event) {
|
16
|
-
var as_form = event.findElement('form');
|
17
|
-
as_form.select('textarea.mceEditor').each(function(elem) {
|
18
|
-
tinyMCE.execCommand('mceRemoveControl', false, elem.id);
|
19
|
-
});
|
20
|
-
return true;
|
21
|
-
});
|
@@ -1,120 +0,0 @@
|
|
1
|
-
de:
|
2
|
-
active_scaffold:
|
3
|
-
add: 'Hinzufügen'
|
4
|
-
add_existing: 'Existierenden Eintrag hinzufügen'
|
5
|
-
add_existing_model: 'Existierende %{model} hinzufügen'
|
6
|
-
are_you_sure_to_delete: 'Sind Sie sicher?'
|
7
|
-
cancel: 'Abbrechen'
|
8
|
-
click_to_edit: 'Zum Editieren anklicken'
|
9
|
-
click_to_reset: 'Reset'
|
10
|
-
close: 'Schliessen'
|
11
|
-
config_list: 'Konfigurieren'
|
12
|
-
config_list_model: 'Konfiguriere Spalten für %{model}'
|
13
|
-
create: 'Anlegen'
|
14
|
-
create_model: 'Lege %{model} an'
|
15
|
-
create_another: 'Weitere anlegen'
|
16
|
-
created_model: '%{model} angelegt'
|
17
|
-
create_new: 'Neu anlegen'
|
18
|
-
customize: 'Anpassen'
|
19
|
-
delete: 'Löschen'
|
20
|
-
deleted_model: '%{model} gelöscht'
|
21
|
-
delimiter: 'Trennzeichen'
|
22
|
-
download: 'Download'
|
23
|
-
edit: 'Bearbeiten'
|
24
|
-
export: 'Exportieren'
|
25
|
-
'false': 'Nein'
|
26
|
-
nested_for_model: '%{nested_model} für %{parent_model}'
|
27
|
-
nested_of_model: '%{nested_model} von %{parent_model}'
|
28
|
-
filtered: '(Gefiltert)'
|
29
|
-
found: 'Gefunden'
|
30
|
-
hide: 'Verstecken'
|
31
|
-
live_search: 'Live-Suche'
|
32
|
-
loading: 'Lade…'
|
33
|
-
next: 'Vor'
|
34
|
-
no_entries: 'Keine Einträge'
|
35
|
-
no_options: 'Keine Optionen'
|
36
|
-
omit_header: 'Lasse Header weg'
|
37
|
-
options: 'Optionen'
|
38
|
-
pdf: 'PDF'
|
39
|
-
previous: 'Zurück'
|
40
|
-
print: 'Drucken'
|
41
|
-
refresh: 'Neu laden'
|
42
|
-
remove: 'Entfernen'
|
43
|
-
remove_file: 'Entferne oder Ersetze Datei'
|
44
|
-
replace_with_new: 'Mit Neuer ersetzen'
|
45
|
-
revisions_for_model: 'Revisionen für %{model}'
|
46
|
-
reset: 'Zurücksetzen'
|
47
|
-
saving: 'Speichern…'
|
48
|
-
search: 'Suche'
|
49
|
-
search_terms: 'Suchbegriffe'
|
50
|
-
_select_: '- Auswählen -'
|
51
|
-
show: 'Anzeigen'
|
52
|
-
show_model: 'Zeige %{model} an'
|
53
|
-
'true': 'Ja'
|
54
|
-
_to_ : ' zu '
|
55
|
-
update: 'Speichern'
|
56
|
-
update_model: 'Editiere %{model}'
|
57
|
-
updated_model: '%{model} aktualisiert'
|
58
|
-
'=': '='
|
59
|
-
'>=': '>='
|
60
|
-
'<=': '<='
|
61
|
-
'>': '>'
|
62
|
-
'<': '<'
|
63
|
-
'!=': '!='
|
64
|
-
between: 'Zwischen'
|
65
|
-
contains: 'Enthält'
|
66
|
-
begins_with: 'Beginnt'
|
67
|
-
ends_with: 'Ended'
|
68
|
-
today: 'Heute'
|
69
|
-
yesterday: 'Gestern'
|
70
|
-
tomorrow: 'Morgen'
|
71
|
-
this_week: 'Diese Woche'
|
72
|
-
prev_week: 'Letzte Woche'
|
73
|
-
next_week: 'Nächste Woche'
|
74
|
-
this_month: 'Diesen Monat'
|
75
|
-
prev_month: 'Letzten Monat'
|
76
|
-
next_month: 'Nächsten Monat'
|
77
|
-
this_year: 'Dieses Jahr'
|
78
|
-
prev_year: 'Letztes Jahr'
|
79
|
-
next_year: 'Nächstes Jahr'
|
80
|
-
past: 'Letzten'
|
81
|
-
future: 'Nächsten'
|
82
|
-
range: 'Zeitraum'
|
83
|
-
seconds: 'Sekunden'
|
84
|
-
minutes: 'Minuten'
|
85
|
-
hours: 'Stunden'
|
86
|
-
days: 'Tage'
|
87
|
-
weeks: 'Wochen'
|
88
|
-
months: 'Monate'
|
89
|
-
years: 'Jahre'
|
90
|
-
optional_attributes: 'Weitere'
|
91
|
-
null: 'Null'
|
92
|
-
not_null: 'Nicht Null'
|
93
|
-
date_picker_options:
|
94
|
-
weekHeader: 'Wo'
|
95
|
-
firstDay: 1
|
96
|
-
isRTL: false
|
97
|
-
showMonthAfterYear: false
|
98
|
-
datetime_picker_options:
|
99
|
-
timeText: 'Uhrzeit'
|
100
|
-
currentText: 'Jetzt'
|
101
|
-
closeText: 'Schließen'
|
102
|
-
errors:
|
103
|
-
template:
|
104
|
-
header:
|
105
|
-
one: "Konnte %{model} nicht speichern: ein Fehler."
|
106
|
-
other: "Konnte %{model} nicht speichern: %{count} Fehler."
|
107
|
-
body: "Bitte überprüfen Sie die folgenden Felder:"
|
108
|
-
# error_messages
|
109
|
-
cant_destroy_record: "%{record} kann nicht gelöscht werden"
|
110
|
-
internal_error: 'Fehler bei der Verarbeitung (code 500, Interner Fehler)'
|
111
|
-
version_inconsistency: 'Inkonsistente Versionen - dieser Eintrag wurde verändert nachdem Sie mit der Bearbeitung begonnen haben.'
|
112
|
-
record_not_saved: 'Eintrag kann nicht gespeichert werden. Ursache unbekannt.'
|
113
|
-
no_authorization_for_action: "Keine Berechtigung für Aktion %{action}"
|
114
|
-
views:
|
115
|
-
pagination:
|
116
|
-
first: "« Erste"
|
117
|
-
last: "Letzte »"
|
118
|
-
previous: "‹ Zurück"
|
119
|
-
next: "Vor ›"
|
120
|
-
truncate: "..."
|
@@ -1,115 +0,0 @@
|
|
1
|
-
en:
|
2
|
-
active_scaffold:
|
3
|
-
add: 'Add'
|
4
|
-
add_existing: 'Add Existing'
|
5
|
-
add_existing_model: 'Add Existing %{model}'
|
6
|
-
are_you_sure_to_delete: 'Are you sure you want to delete %{label}?'
|
7
|
-
cancel: 'Cancel'
|
8
|
-
click_to_edit: 'Click to edit'
|
9
|
-
click_to_reset: 'Click to reset'
|
10
|
-
close: 'Close'
|
11
|
-
config_list: 'Configure'
|
12
|
-
config_list_model: 'Configure Columns for %{model}'
|
13
|
-
create: 'Create'
|
14
|
-
create_model: 'Create %{model}'
|
15
|
-
create_another: 'Create Another %{model}'
|
16
|
-
created_model: 'Created %{model}'
|
17
|
-
create_new: 'Create New'
|
18
|
-
customize: 'Customize'
|
19
|
-
delete: 'Delete'
|
20
|
-
deleted_model: 'Deleted %{model}'
|
21
|
-
delimiter: 'Delimiter'
|
22
|
-
download: 'Download'
|
23
|
-
edit: 'Edit'
|
24
|
-
export: 'Export'
|
25
|
-
nested_for_model: '%{nested_model} for %{parent_model}'
|
26
|
-
nested_of_model: '%{nested_model} of %{parent_model}'
|
27
|
-
'false': 'False'
|
28
|
-
filtered: '(Filtered)'
|
29
|
-
found: 'Found'
|
30
|
-
hide: 'Hide'
|
31
|
-
live_search: 'Live Search'
|
32
|
-
loading: 'Loading…'
|
33
|
-
next: 'Next'
|
34
|
-
no_entries: 'No Entries'
|
35
|
-
no_options: 'no options'
|
36
|
-
omit_header: 'Omit Header'
|
37
|
-
options: 'Options'
|
38
|
-
pdf: 'PDF'
|
39
|
-
previous: 'Previous'
|
40
|
-
print: 'Print'
|
41
|
-
refresh: 'Refresh'
|
42
|
-
remove: 'Remove'
|
43
|
-
remove_file: 'Remove or Replace file'
|
44
|
-
replace_with_new: 'Replace With New'
|
45
|
-
revisions_for_model: 'Revisions for %{model}'
|
46
|
-
reset: 'Reset'
|
47
|
-
saving: 'Saving…'
|
48
|
-
search: 'Search'
|
49
|
-
search_terms: 'Search Terms'
|
50
|
-
_select_: '- select -'
|
51
|
-
show: 'Show'
|
52
|
-
show_model: 'Show %{model}'
|
53
|
-
_to_ : ' to '
|
54
|
-
'true': 'True'
|
55
|
-
update: 'Update'
|
56
|
-
update_model: 'Update %{model}'
|
57
|
-
updated_model: 'Updated %{model}'
|
58
|
-
'=': '='
|
59
|
-
'>=': '>='
|
60
|
-
'<=': '<='
|
61
|
-
'>': '>'
|
62
|
-
'<': '<'
|
63
|
-
'!=': '!='
|
64
|
-
between: 'Between'
|
65
|
-
contains: 'Contains'
|
66
|
-
begins_with: 'Begins with'
|
67
|
-
ends_with: 'Ends with'
|
68
|
-
today: 'Today'
|
69
|
-
yesterday: 'Yesterday'
|
70
|
-
tomorrow: 'Tommorrow'
|
71
|
-
this_week: 'This Week'
|
72
|
-
prev_week: 'Last Week'
|
73
|
-
next_week: 'Next Week'
|
74
|
-
this_month: 'This Month'
|
75
|
-
prev_month: 'Last Month'
|
76
|
-
next_month: 'Next Month'
|
77
|
-
this_year: 'This Year'
|
78
|
-
prev_year: 'Last Year'
|
79
|
-
next_year: 'Next Year'
|
80
|
-
past: 'Past'
|
81
|
-
future: 'Future'
|
82
|
-
range: 'Range'
|
83
|
-
seconds: 'Seconds'
|
84
|
-
minutes: 'Minutes'
|
85
|
-
hours: 'Hours'
|
86
|
-
days: 'Days'
|
87
|
-
weeks: 'Weeks'
|
88
|
-
months: 'Months'
|
89
|
-
years: 'Years'
|
90
|
-
optional_attributes: 'Further Options'
|
91
|
-
null: 'Null'
|
92
|
-
not_null: 'Not Null'
|
93
|
-
date_picker_options:
|
94
|
-
weekHeader: 'Wk'
|
95
|
-
firstDay: 0
|
96
|
-
isRTL: false
|
97
|
-
showMonthAfterYear: false
|
98
|
-
|
99
|
-
datetime_picker_options:
|
100
|
-
|
101
|
-
errors:
|
102
|
-
template:
|
103
|
-
header:
|
104
|
-
one: "1 error prohibited this %{model} from being saved."
|
105
|
-
other: "%{count} errors prohibited this %{model} from being saved"
|
106
|
-
|
107
|
-
body: "There were problems with the following fields:"
|
108
|
-
|
109
|
-
|
110
|
-
# error_messages
|
111
|
-
cant_destroy_record: "%{record} can't be destroyed"
|
112
|
-
internal_error: 'Request Failed (code 500, Internal Error)'
|
113
|
-
version_inconsistency: 'Version inconsistency - this record has been modified since you started editing it.'
|
114
|
-
record_not_saved: 'Failed to save record cause of an unknown error'
|
115
|
-
no_authorization_for_action: "No Authorization for action %{action}"
|
@@ -1,45 +0,0 @@
|
|
1
|
-
class ActiveScaffoldAssets
|
2
|
-
|
3
|
-
def self.copy_to_public(from, options = {})
|
4
|
-
unless defined?(ACTIVE_SCAFFOLD_INSTALL_ASSETS) && ACTIVE_SCAFFOLD_INSTALL_ASSETS == false
|
5
|
-
copy_files("/public", "/public", from)
|
6
|
-
available_frontends = Dir[File.join(from, 'frontends', '*')].collect { |d| File.basename d }
|
7
|
-
[:stylesheets, :javascripts, :images].each do |asset_type|
|
8
|
-
copy_asset_type(from, available_frontends, asset_type, options)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
protected
|
14
|
-
|
15
|
-
def self.copy_asset_type(from, available_frontends, asset_type, options = {})
|
16
|
-
path = "/public/#{asset_type}/active_scaffold"
|
17
|
-
copy_files(path, path, from)
|
18
|
-
|
19
|
-
File.open(File.join(Rails.root, path, 'DO_NOT_EDIT'), 'w') do |f|
|
20
|
-
f.puts "Any changes made to files in sub-folders will be lost."
|
21
|
-
f.puts "See http://activescaffold.com/tutorials/faq#custom-css."
|
22
|
-
end
|
23
|
-
|
24
|
-
available_frontends.each do |frontend|
|
25
|
-
if asset_type == :javascripts
|
26
|
-
file_mask = '*.js'
|
27
|
-
source = "/frontends/#{frontend}/#{asset_type}/#{ActiveScaffold.js_framework}"
|
28
|
-
else
|
29
|
-
file_mask = '*.*'
|
30
|
-
source = "/frontends/#{frontend}/#{asset_type}"
|
31
|
-
end
|
32
|
-
destination = "/public/#{asset_type}/active_scaffold/#{frontend}"
|
33
|
-
copy_files(source, destination, from, file_mask, options)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def self.copy_files(source_path, destination_path, directory, file_mask = '*.*', options = {})
|
38
|
-
source, destination = File.join(directory, source_path), File.join(Rails.root, destination_path)
|
39
|
-
FileUtils.mkdir_p(destination) unless File.exist?(destination)
|
40
|
-
Dir.glob('*.so')
|
41
|
-
|
42
|
-
FileUtils.rm Dir.glob("#{destination}/*") if options[:clean_up_destination]
|
43
|
-
FileUtils.cp_r(Dir.glob("#{source}/#{file_mask}"), destination)
|
44
|
-
end
|
45
|
-
end
|