active_scaffold-sequel 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/javascripts/active_scaffold.js.erb +12 -14
- data/app/assets/javascripts/jquery/active_scaffold.js +610 -348
- data/app/assets/javascripts/jquery/date_picker_bridge.js.erb +37 -19
- data/app/assets/javascripts/jquery/draggable_lists.js +28 -27
- data/app/assets/javascripts/jquery/jquery.editinplace.js +145 -137
- data/app/assets/javascripts/jquery/tiny_mce_bridge.js +1 -1
- data/app/assets/stylesheets/{active_scaffold.css.scss → active_scaffold.scss} +0 -0
- data/app/assets/stylesheets/{active_scaffold_colors.css.scss → active_scaffold_colors.scss} +0 -0
- data/app/assets/stylesheets/{active_scaffold_images.css.scss → active_scaffold_images.scss} +0 -0
- data/frontends/default/views/_list.html.erb +1 -1
- data/frontends/default/views/_list_record.html.erb +2 -1
- data/frontends/default/views/_search.html.erb +1 -10
- data/frontends/default/views/add_existing.js.erb +0 -3
- data/lib/active_scaffold.rb +0 -12
- data/lib/active_scaffold/actions/list.rb +8 -3
- data/lib/active_scaffold/bridges/carrierwave/form_ui.rb +3 -8
- data/lib/active_scaffold/bridges/date_picker.rb +2 -3
- data/lib/active_scaffold/bridges/dragonfly/form_ui.rb +3 -7
- data/lib/active_scaffold/bridges/tiny_mce.rb +1 -5
- data/lib/active_scaffold/bridges/tiny_mce/helpers.rb +1 -5
- data/lib/active_scaffold/extensions/action_view_rendering.rb +1 -6
- data/lib/active_scaffold/extensions/routing_mapper.rb +1 -1
- data/lib/active_scaffold/helpers/controller_helpers.rb +2 -2
- data/lib/active_scaffold/helpers/form_column_helpers.rb +3 -10
- data/lib/active_scaffold/version.rb +2 -2
- data/vendor/assets/javascripts/getprototypeof.js +12 -0
- data/vendor/assets/javascripts/jquery-ui-timepicker-addon.js +1882 -1276
- metadata +71 -65
- checksums.yaml +0 -7
- data/app/assets/javascripts/prototype/active_scaffold.js +0 -1103
- data/app/assets/javascripts/prototype/dhtml_history.js +0 -870
- data/app/assets/javascripts/prototype/form_enhancements.js +0 -117
- data/app/assets/javascripts/prototype/rico_corner.js +0 -370
- data/app/assets/javascripts/prototype/tiny_mce_bridge.js +0 -7
- data/lib/active_scaffold/bridges/calendar_date_select.rb +0 -24
- data/lib/active_scaffold/bridges/calendar_date_select/as_cds_bridge.rb +0 -67
@@ -1,7 +0,0 @@
|
|
1
|
-
var action_link_close = ActiveScaffold.ActionLink.Abstract.prototype.close;
|
2
|
-
ActiveScaffold.ActionLink.Abstract.prototype.close = function() {
|
3
|
-
this.adapter.select('textarea.mceEditor').each(function(elem) {
|
4
|
-
tinyMCE.execCommand('mceRemoveControl', false, elem.id);
|
5
|
-
});
|
6
|
-
action_link_close.apply(this);
|
7
|
-
};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
class ActiveScaffold::Bridges::CalendarDateSelect < ActiveScaffold::DataStructures::Bridge
|
2
|
-
def self.install
|
3
|
-
# check to see if the old bridge was installed. If so, warn them
|
4
|
-
# we can detect this by checking to see if the bridge was installed before calling this code
|
5
|
-
|
6
|
-
if ActiveScaffold::Config::Core.instance_methods.include?("initialize_with_calendar_date_select")
|
7
|
-
raise RuntimeError, "We've detected that you have active_scaffold_calendar_date_select_bridge installed. This plugin has been moved to core. Please remove active_scaffold_calendar_date_select_bridge to prevent any conflicts"
|
8
|
-
end
|
9
|
-
|
10
|
-
require File.join(File.dirname(__FILE__), "calendar_date_select/as_cds_bridge.rb")
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.install?
|
14
|
-
super && ActiveScaffold.js_framework == :prototype
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.stylesheets
|
18
|
-
calendar_date_select_stylesheets
|
19
|
-
end
|
20
|
-
|
21
|
-
def self.javascripts
|
22
|
-
calendar_date_select_javascripts
|
23
|
-
end
|
24
|
-
end
|
@@ -1,67 +0,0 @@
|
|
1
|
-
module ActiveScaffold::Config
|
2
|
-
class Core < Base
|
3
|
-
|
4
|
-
def initialize_with_calendar_date_select(model_id)
|
5
|
-
initialize_without_calendar_date_select(model_id)
|
6
|
-
|
7
|
-
calendar_date_select_fields = self.model.db_schema.collect {|name,properties| name if [:date, :datetime].include?(properties[:type])}.compact
|
8
|
-
# check to see if file column was used on the model
|
9
|
-
return if calendar_date_select_fields.empty?
|
10
|
-
|
11
|
-
# automatically set the forum_ui to a file column
|
12
|
-
calendar_date_select_fields.each{|field|
|
13
|
-
self.columns[field].form_ui = :calendar_date_select
|
14
|
-
}
|
15
|
-
end
|
16
|
-
|
17
|
-
alias_method_chain :initialize, :calendar_date_select
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
|
23
|
-
module ActiveScaffold
|
24
|
-
module Bridges
|
25
|
-
class CalendarDateSelect
|
26
|
-
# Helpers that assist with the rendering of a Form Column
|
27
|
-
module FormColumnHelpers
|
28
|
-
def active_scaffold_input_calendar_date_select(column, options)
|
29
|
-
options[:class] = "#{options[:class]} text-input".strip
|
30
|
-
calendar_date_select("record", column.name, options.merge(column.options))
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
module SearchColumnHelpers
|
35
|
-
def active_scaffold_search_date_bridge_calendar_control(column, options, current_search, name)
|
36
|
-
if current_search.is_a? Hash
|
37
|
-
value = controller.class.condition_value_for_datetime(current_search[name], column.column[:type] == :date ? :to_date : :to_time)
|
38
|
-
else
|
39
|
-
value = current_search
|
40
|
-
end
|
41
|
-
calendar_date_select("record", column.name,
|
42
|
-
{:name => "#{options[:name]}[#{name}]",
|
43
|
-
:value => (value ? l(value) : nil),
|
44
|
-
:class => 'text-input',
|
45
|
-
:id => "#{options[:id]}_#{name}",
|
46
|
-
:time => column_datetime?(column) ? true : false,
|
47
|
-
:style => "display:#{(options[:show].nil? || options[:show]) ? '' : 'none'}"})
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
ActionView::Base.class_eval do
|
55
|
-
include ActiveScaffold::Bridges::CalendarDateSelect::FormColumnHelpers
|
56
|
-
include ActiveScaffold::Bridges::Shared::DateBridge::SearchColumnHelpers
|
57
|
-
alias_method :active_scaffold_search_calendar_date_select, :active_scaffold_search_date_bridge
|
58
|
-
include ActiveScaffold::Bridges::Shared::DateBridge::HumanConditionHelpers
|
59
|
-
alias_method :active_scaffold_human_condition_calendar_date_select, :active_scaffold_human_condition_date_bridge
|
60
|
-
include ActiveScaffold::Bridges::CalendarDateSelect::SearchColumnHelpers
|
61
|
-
include ActiveScaffold::Bridges::CalendarDateSelect::ViewHelpers
|
62
|
-
end
|
63
|
-
|
64
|
-
ActiveScaffold::Finder::ClassMethods.module_eval do
|
65
|
-
include ActiveScaffold::Bridges::Shared::DateBridge::Finder::ClassMethods
|
66
|
-
alias_method :condition_for_calendar_date_select_type, :condition_for_date_bridge_type
|
67
|
-
end
|