netzke-core 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +19 -0
- data/README.markdown +43 -0
- data/TODO +1 -5
- data/app/controllers/netzke_controller.rb +47 -15
- data/config/database.yml +2 -0
- data/features/component_loader.feature +6 -1
- data/features/composition.feature +2 -0
- data/features/js_include.feature +18 -0
- data/features/nested_views.feature +9 -0
- data/features/persistence.feature +6 -4
- data/features/support/paths.rb +3 -0
- data/javascripts/core.js +166 -519
- data/javascripts/ext.js +355 -0
- data/javascripts/touch.js +47 -0
- data/lib/netzke/actions.rb +31 -38
- data/lib/netzke/base.rb +48 -6
- data/lib/netzke/composition.rb +52 -63
- data/lib/netzke/configuration.rb +6 -2
- data/lib/netzke/core/version.rb +2 -2
- data/lib/netzke/core.rb +22 -15
- data/lib/netzke/javascript/scopes.rb +39 -0
- data/lib/netzke/javascript.rb +145 -114
- data/lib/netzke/railz/action_view_ext/ext.rb +59 -0
- data/lib/netzke/railz/action_view_ext/touch.rb +50 -0
- data/lib/netzke/railz/action_view_ext.rb +86 -0
- data/lib/netzke/railz/controller_extensions.rb +33 -0
- data/lib/netzke/{rails → railz}/routes.rb +0 -0
- data/lib/netzke/railz.rb +3 -0
- data/lib/netzke/session.rb +18 -3
- data/lib/netzke/state.rb +42 -15
- data/lib/netzke/stylesheets.rb +23 -8
- data/lib/netzke-core.rb +23 -16
- data/netzke-core.gemspec +52 -10
- data/spec/component/base_spec.rb +11 -0
- data/spec/component/javascript_spec.rb +3 -2
- data/spec/component/state_spec.rb +18 -0
- data/spec/spec_helper.rb +1 -1
- data/test/rails_app/Gemfile +3 -2
- data/test/rails_app/Gemfile.lock +73 -71
- data/test/rails_app/app/components/component_loader.rb +39 -4
- data/test/rails_app/app/components/{custom.css → component_with_custom_css/stylesheets/custom.css} +0 -0
- data/test/rails_app/app/components/component_with_custom_css.rb +2 -2
- data/test/rails_app/app/components/component_with_js_mixin/javascripts/extra_one.js +2 -0
- data/test/rails_app/app/components/component_with_js_mixin/javascripts/extra_two.js +2 -0
- data/test/rails_app/app/components/component_with_js_mixin/javascripts/method_set_one.js +6 -0
- data/test/rails_app/app/components/component_with_js_mixin/javascripts/method_set_two.js +5 -0
- data/test/rails_app/app/components/component_with_js_mixin.rb +8 -0
- data/test/rails_app/app/components/component_with_session_persistence.rb +10 -3
- data/test/rails_app/app/components/extended_component_with_js_mixin/javascripts/some_method_set.js +5 -0
- data/test/rails_app/app/components/extended_component_with_js_mixin.rb +7 -0
- data/test/rails_app/app/components/hello_world_component.rb +31 -0
- data/test/rails_app/app/components/server_caller.rb +1 -1
- data/test/rails_app/app/components/simple_panel.rb +2 -0
- data/test/rails_app/app/components/touch/hello_world_component.rb +25 -0
- data/test/rails_app/app/components/touch/server_caller.rb +28 -0
- data/test/rails_app/app/components/touch/simple_carousel.rb +17 -0
- data/test/rails_app/app/controllers/components_controller.rb +6 -1
- data/test/rails_app/app/controllers/touch_controller.rb +6 -0
- data/test/rails_app/app/helpers/touch_helper.rb +2 -0
- data/test/rails_app/app/views/components/panel_with_autoload.html.erb +2 -0
- data/test/rails_app/app/views/components/some_tab_panel.html.erb +11 -0
- data/test/rails_app/app/views/layouts/nested.html.erb +5 -0
- data/test/rails_app/app/views/layouts/touch.html.erb +13 -0
- data/test/rails_app/config/initializers/netzke.rb +1 -1
- data/test/rails_app/config/locales/en.yml +7 -1
- data/test/rails_app/config/routes.rb +10 -1
- data/test/rails_app/db/migrate/20110110132720_create_netzke_component_states.rb +20 -0
- data/test/rails_app/db/schema.rb +14 -1
- data/test/rails_app/spec/controllers/touch_controller_spec.rb +5 -0
- data/test/rails_app/spec/helpers/touch_helper_spec.rb +15 -0
- data/test/unit/netzke_core_test.rb +2 -6
- metadata +53 -11
- data/README.rdoc +0 -136
- data/lib/netzke/rails/action_view_ext.rb +0 -103
- data/lib/netzke/rails/controller_extensions.rb +0 -31
- data/test/rails_app/db/migrate/20100905214933_create_netzke_preferences.rb +0 -16
@@ -0,0 +1,86 @@
|
|
1
|
+
require 'netzke/railz/action_view_ext/ext'
|
2
|
+
require 'netzke/railz/action_view_ext/touch'
|
3
|
+
module Netzke
|
4
|
+
module Railz
|
5
|
+
module ActionViewExt
|
6
|
+
include Ext
|
7
|
+
include Touch
|
8
|
+
|
9
|
+
# A helper to initialize Netzke. Usually used in the layout.
|
10
|
+
#
|
11
|
+
# Params:
|
12
|
+
# * :platform - :ext or :touch, by default :ext
|
13
|
+
# * :theme - the name of theme to apply
|
14
|
+
#
|
15
|
+
# E.g.:
|
16
|
+
# <%= netzke_init :theme => :grey %>
|
17
|
+
#
|
18
|
+
# For Sencha Touch:
|
19
|
+
# <%= netzke_init :platform => :touch %>
|
20
|
+
def netzke_init(params = {})
|
21
|
+
Netzke::Core.platform = params[:platform] || :ext
|
22
|
+
theme = params[:theme] || params[:ext_theme] || :default
|
23
|
+
raw([netzke_css_include(theme), netzke_css, netzke_js_include, netzke_js].join("\n"))
|
24
|
+
end
|
25
|
+
|
26
|
+
# Use this helper in your views to embed Netzke components. E.g.:
|
27
|
+
# netzke :my_grid, :class_name => "Basepack::GridPanel", :columns => [:id, :name, :created_at]
|
28
|
+
def netzke(name, config = {})
|
29
|
+
@rendered_classes ||= []
|
30
|
+
|
31
|
+
# if we are the first netzke call on the page, reset components hash in the session
|
32
|
+
# if @rendered_classes.empty?
|
33
|
+
# Netzke::Core.reset_components_in_session
|
34
|
+
# end
|
35
|
+
|
36
|
+
class_name = config[:class_name] ||= name.to_s.camelcase
|
37
|
+
|
38
|
+
config[:name] = name
|
39
|
+
|
40
|
+
# Register the component in session
|
41
|
+
Netzke::Core.reg_component(config)
|
42
|
+
|
43
|
+
w = Netzke::Base.instance_by_config(config)
|
44
|
+
w.before_load # inform the component about initial load
|
45
|
+
|
46
|
+
content_for :netzke_js_classes, raw(w.js_missing_code(@rendered_classes))
|
47
|
+
|
48
|
+
content_for :netzke_css, raw(w.css_missing_code(@rendered_classes))
|
49
|
+
|
50
|
+
content_for :netzke_on_ready, raw("#{w.js_component_instance}\n\n#{w.js_component_render}")
|
51
|
+
|
52
|
+
# Now mark this component's class as rendered (by storing it's xtype), so that we only generate it once per view
|
53
|
+
@rendered_classes << class_name.to_s.gsub("::", "").downcase unless @rendered_classes.include?(class_name)
|
54
|
+
|
55
|
+
# Return the html for this component
|
56
|
+
raw(w.js_component_html)
|
57
|
+
end
|
58
|
+
|
59
|
+
protected
|
60
|
+
|
61
|
+
# Link tags for all the required stylsheets
|
62
|
+
def netzke_css_include(theme)
|
63
|
+
send :"netzke_#{Netzke::Core.platform}_css_include", theme
|
64
|
+
end
|
65
|
+
|
66
|
+
# Inline CSS specific for the page
|
67
|
+
def netzke_css
|
68
|
+
%{
|
69
|
+
<style type="text/css" media="screen">
|
70
|
+
#{content_for(:netzke_css)}
|
71
|
+
</style>} if content_for(:netzke_css).present?
|
72
|
+
end
|
73
|
+
|
74
|
+
# Script tags for all the required JavaScript
|
75
|
+
def netzke_js_include
|
76
|
+
send :"netzke_#{Netzke::Core.platform}_js_include"
|
77
|
+
end
|
78
|
+
|
79
|
+
# Inline JavaScript for all Netzke classes on the page, as well as Ext.onReady (Ext.setup in case of Touch) which renders Netzke components in this view after the page is loaded
|
80
|
+
def netzke_js
|
81
|
+
send :"netzke_#{Netzke::Core.platform}_js"
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Netzke
|
2
|
+
module Railz
|
3
|
+
module ControllerExtensions
|
4
|
+
def self.included(base)
|
5
|
+
base.send(:before_filter, :set_session_data)
|
6
|
+
base.send(:before_filter, :set_controller)
|
7
|
+
end
|
8
|
+
|
9
|
+
def set_session_data
|
10
|
+
::Netzke::Core.session = session
|
11
|
+
session[:netzke_user_id] = defined?(current_user) ? current_user.try(:id) : nil
|
12
|
+
# set netzke_just_logged_in and netzke_just_logged_out states (may be used by Netzke components)
|
13
|
+
if session[:_netzke_next_request_is_first_after_login]
|
14
|
+
session[:netzke_just_logged_in] = true
|
15
|
+
session[:_netzke_next_request_is_first_after_login] = false
|
16
|
+
else
|
17
|
+
session[:netzke_just_logged_in] = false
|
18
|
+
end
|
19
|
+
|
20
|
+
if session[:_netzke_next_request_is_first_after_logout]
|
21
|
+
session[:netzke_just_logged_out] = true
|
22
|
+
session[:_netzke_next_request_is_first_after_logout] = false
|
23
|
+
else
|
24
|
+
session[:netzke_just_logged_out] = false
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def set_controller
|
29
|
+
::Netzke::Core.controller = self
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
File without changes
|
data/lib/netzke/railz.rb
ADDED
data/lib/netzke/session.rb
CHANGED
@@ -2,6 +2,22 @@ module Netzke
|
|
2
2
|
# This modules provides (component-specific) session manupulation.
|
3
3
|
# The :session_persistence config option should be set to true in order for the component to make use of this.
|
4
4
|
module Session
|
5
|
+
class ComponentSessionProxy < Hash #:nodoc:
|
6
|
+
def initialize(component_id)
|
7
|
+
@component_id = component_id
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def [](key)
|
12
|
+
(Netzke::Core.session[@component_id] || {})[key]
|
13
|
+
end
|
14
|
+
|
15
|
+
def []=(key, value)
|
16
|
+
(Netzke::Core.session[@component_id] ||= {})[key] = value
|
17
|
+
# super
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
5
21
|
# Top-level session (straight from the controller).
|
6
22
|
def session
|
7
23
|
::Netzke::Core.session
|
@@ -9,7 +25,7 @@ module Netzke
|
|
9
25
|
|
10
26
|
# Component-specific session.
|
11
27
|
def component_session
|
12
|
-
|
28
|
+
@component_session_proxy ||= ComponentSessionProxy.new(global_id)
|
13
29
|
end
|
14
30
|
|
15
31
|
# Returns this component's configuration options stored in the session. Those get merged into the component's configuration at instantiation.
|
@@ -20,8 +36,7 @@ module Netzke
|
|
20
36
|
# Updates the session options
|
21
37
|
def update_session_options(hash)
|
22
38
|
if session_persistence_enabled?
|
23
|
-
component_session
|
24
|
-
component_session[:options].merge!(hash)
|
39
|
+
component_session.deep_merge!(:options => hash)
|
25
40
|
else
|
26
41
|
logger.debug "Netzke warning: No session persistence enabled for component '#{global_id}'"
|
27
42
|
end
|
data/lib/netzke/state.rb
CHANGED
@@ -2,23 +2,23 @@ require 'active_support/core_ext/hash/indifferent_access'
|
|
2
2
|
module Netzke
|
3
3
|
# When a persistence subsystem (such as {netzke-persistence}[https://github.com/skozlov/netzke-persistence]) is used, a widget can store its state using the +update_state+ method that accepts a hash, e.g.:
|
4
4
|
# update_state(:position => {:x => 100, :y => 200})
|
5
|
-
#
|
5
|
+
#
|
6
6
|
# Later the state can be retrieved by calling the +state+ method:
|
7
|
-
#
|
7
|
+
#
|
8
8
|
# state[:position] #=> {:x => 100, :y => 200}
|
9
|
-
#
|
9
|
+
#
|
10
10
|
# To enable persistence for a specific component, configure it with +persistence+ option set to +true+.
|
11
|
-
#
|
11
|
+
#
|
12
12
|
# == Sharing state
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# Different components can share the state by sharing the persistence key, which can be provided as configuration option, e.g.:
|
15
|
-
#
|
15
|
+
#
|
16
16
|
# netzke :books, :class_name => "Basepack::GridPanel", :persistence_key => "books_state_identifier"
|
17
17
|
# netzke :deleted_books, :class_name => "Basepack::GridPanel", :persistence_key => "books_state_identifier"
|
18
|
-
#
|
18
|
+
#
|
19
19
|
# Make sure that the provided persistence_key has effect on _application_ level, _not_ only within the view.
|
20
20
|
# By default persistence_key is set to component's global id. Thus, <i>two components named equally will share the state even being used in different views</i>.
|
21
|
-
#
|
21
|
+
#
|
22
22
|
module State
|
23
23
|
# A string which will identify the component in persistence subsystem.
|
24
24
|
# If +persistence_key+ is passed, use it. Otherwise use global_id.
|
@@ -30,18 +30,36 @@ module Netzke
|
|
30
30
|
def state
|
31
31
|
@state ||= (state_manager.state || {}).symbolize_keys
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
# Merges passed hash into component's state.
|
35
|
-
|
36
|
-
|
35
|
+
# Can also accept 2 arguments which will be treated as a hash pair. E.g.:
|
36
|
+
#
|
37
|
+
# update_state(:peoples_most_feared_number, 13)
|
38
|
+
#
|
39
|
+
# is equivalent to:
|
40
|
+
#
|
41
|
+
# update_state(:peoples_most_feared_number => 13)
|
42
|
+
def update_state(*args)
|
43
|
+
state_manager.update_state!(args.first.is_a?(Hash) ? args.first : {args.first => args.last})
|
37
44
|
@state = nil # reset cache
|
38
45
|
end
|
39
46
|
|
47
|
+
# Component's persistent state.
|
48
|
+
def global_state
|
49
|
+
@global_state ||= (global_state_manager.state || {}).symbolize_keys
|
50
|
+
end
|
51
|
+
|
52
|
+
# Merges passed hash into component's state.
|
53
|
+
def update_global_state(hsh)
|
54
|
+
global_state_manager.update_state!(hsh)
|
55
|
+
@global_state = nil # reset cache
|
56
|
+
end
|
57
|
+
|
40
58
|
# Options merged into component's configuration right after default and user-passed config, thus being reflected in +Netzke::Base#independent_config+ (see Netzke::Configuration).
|
41
59
|
def persistent_options
|
42
60
|
(state[:persistent_options] || {}).symbolize_keys
|
43
61
|
end
|
44
|
-
|
62
|
+
|
45
63
|
# Updates +persistent_options+
|
46
64
|
def update_persistent_options(hsh)
|
47
65
|
new_persistent_options = persistent_options.merge(hsh)
|
@@ -49,8 +67,8 @@ module Netzke
|
|
49
67
|
update_state(:persistent_options => new_persistent_options)
|
50
68
|
end
|
51
69
|
|
52
|
-
protected
|
53
|
-
|
70
|
+
protected
|
71
|
+
|
54
72
|
# Initialized state manager class. At this moment this class has current_user, component, and session set.
|
55
73
|
def state_manager
|
56
74
|
@state_manager ||= Netzke::Core.persistence_manager_class.init({
|
@@ -60,5 +78,14 @@ module Netzke
|
|
60
78
|
})
|
61
79
|
end
|
62
80
|
|
81
|
+
# Initialized state manager class, configured for managing global (not component specific) settings. At this moment this class has current_user and session set.
|
82
|
+
def global_state_manager
|
83
|
+
@global_state_manager ||= Netzke::Core.persistence_manager_class.init({
|
84
|
+
:current_user => Netzke::Core.controller.respond_to?(:current_user) && Netzke::Core.controller.current_user,
|
85
|
+
:session => Netzke::Core.session
|
86
|
+
})
|
87
|
+
end
|
88
|
+
|
89
|
+
|
63
90
|
end
|
64
|
-
end
|
91
|
+
end
|
data/lib/netzke/stylesheets.rb
CHANGED
@@ -27,22 +27,37 @@ module Netzke
|
|
27
27
|
res
|
28
28
|
end
|
29
29
|
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
30
|
+
# Use it to specify stylesheet files to be loaded along with this component.
|
31
|
+
# It may accept one or more symbols or strings. Strings will be interpreted as full paths to included files:
|
32
|
+
#
|
33
|
+
# css_include "#{File.dirname(__FILE__)}/my_component/one.css", "#{File.dirname(__FILE__)}/my_component/two.css"
|
34
|
+
#
|
35
|
+
# Symbols will be expanded following a convention, e.g.:
|
36
|
+
#
|
37
|
+
# class MyComponent < Netzke::Base
|
38
|
+
# css_include :some_library
|
39
|
+
# # ...
|
40
|
+
# end
|
41
|
+
#
|
42
|
+
# This will "include" a stylesheet file +{component_location}/my_component/stylesheets/some_library.js+
|
36
43
|
def css_include(*args)
|
37
|
-
|
44
|
+
callr = caller.first
|
45
|
+
|
46
|
+
self.css_included_files += args.map{ |a| a.is_a?(Symbol) ? expand_css_include_path(a, callr) : a }
|
38
47
|
end
|
39
48
|
|
49
|
+
protected
|
50
|
+
|
51
|
+
def expand_css_include_path(sym, callr) # :nodoc:
|
52
|
+
%Q(#{callr.split(".rb:").first}/stylesheets/#{sym}.css)
|
53
|
+
end
|
54
|
+
|
40
55
|
end
|
41
56
|
|
42
57
|
module InstanceMethods
|
43
58
|
def css_missing_code(cached = [])
|
44
59
|
code = dependency_classes.inject("") do |r,k|
|
45
|
-
cached.include?(k) ? r : r +
|
60
|
+
cached.include?(k.js_xtype) ? r : r + k.css_code(cached)
|
46
61
|
end
|
47
62
|
code.blank? ? nil : code
|
48
63
|
end
|
data/lib/netzke-core.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
$LOAD_PATH << File.dirname(__FILE__)
|
2
2
|
|
3
|
-
# require 'netzke/core_ext'
|
4
|
-
|
5
3
|
require 'netzke/core'
|
6
4
|
require 'netzke/base'
|
7
5
|
|
@@ -9,30 +7,39 @@ module Netzke
|
|
9
7
|
autoload :Core, 'netzke/core'
|
10
8
|
autoload :ExtComponent, 'netzke/ext_component'
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
#
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
module Core
|
11
|
+
class Engine < ::Rails::Engine
|
12
|
+
# before loading initializers and classes (in app/**)
|
13
|
+
config.before_initialize do
|
14
|
+
Netzke::Core.ext_location = Rails.root.join("public", "extjs")
|
15
|
+
Netzke::Core.touch_location = Rails.root.join("public", "sencha-touch")
|
16
|
+
Netzke::Core.persistence_manager_class = Netzke::Core.persistence_manager.constantize rescue nil
|
17
|
+
end
|
18
|
+
|
19
|
+
# after loading initializers and classes
|
20
|
+
config.after_initialize do
|
21
|
+
Netzke::Core.with_icons = File.exists?("#{::Rails.root}/public#{Netzke::Core.icons_uri}") if Netzke::Core.with_icons.nil?
|
22
|
+
|
23
|
+
# If need to cache classes, memoize Netzke::Base.constantize_class_name for performance
|
24
|
+
if Rails.configuration.cache_classes
|
25
|
+
class << Netzke::Base
|
26
|
+
memoize :constantize_class_name
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
18
30
|
end
|
19
31
|
end
|
20
32
|
end
|
21
33
|
|
22
34
|
# Rails specific
|
23
35
|
if defined? Rails
|
24
|
-
require 'netzke/
|
36
|
+
require 'netzke/railz'
|
25
37
|
|
26
38
|
ActiveSupport.on_load(:action_controller) do
|
27
|
-
|
28
|
-
include Netzke::ControllerExtensions
|
39
|
+
include Netzke::Railz::ControllerExtensions
|
29
40
|
end
|
30
41
|
|
31
42
|
ActiveSupport.on_load(:action_view) do
|
32
|
-
|
33
|
-
include Netzke::ActionViewExt
|
43
|
+
include Netzke::Railz::ActionViewExt
|
34
44
|
end
|
35
|
-
|
36
|
-
# Make this plugin auto-reloadable for easier development
|
37
|
-
# ActiveSupport::Dependencies.autoload_once_paths.delete(File.join(File.dirname(__FILE__)))
|
38
45
|
end
|
data/netzke-core.gemspec
CHANGED
@@ -5,16 +5,16 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{netzke-core}
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Sergei Kozlov"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-01-14}
|
13
13
|
s.description = %q{Allows building ExtJS/Rails reusable code in a DRY way}
|
14
14
|
s.email = %q{sergei@playcode.nl}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
"README.
|
17
|
+
"README.markdown",
|
18
18
|
"TODO"
|
19
19
|
]
|
20
20
|
s.files = [
|
@@ -22,12 +22,13 @@ Gem::Specification.new do |s|
|
|
22
22
|
"CHANGELOG.rdoc",
|
23
23
|
"LICENSE",
|
24
24
|
"Manifest",
|
25
|
-
"README.
|
25
|
+
"README.markdown",
|
26
26
|
"Rakefile",
|
27
27
|
"TODO",
|
28
28
|
"app/controllers/netzke_controller.rb",
|
29
29
|
"app/models/netzke_preference.rb",
|
30
30
|
"autotest/discover.rb",
|
31
|
+
"config/database.yml",
|
31
32
|
"features/actions.feature",
|
32
33
|
"features/basic.feature",
|
33
34
|
"features/client-server.feature",
|
@@ -38,6 +39,8 @@ Gem::Specification.new do |s|
|
|
38
39
|
"features/custom_css.feature",
|
39
40
|
"features/file_inclusion.feature",
|
40
41
|
"features/inheritance.feature",
|
42
|
+
"features/js_include.feature",
|
43
|
+
"features/nested_views.feature",
|
41
44
|
"features/persistence.feature",
|
42
45
|
"features/scopes.feature",
|
43
46
|
"features/step_definitions/custom_css_steps.rb",
|
@@ -48,6 +51,8 @@ Gem::Specification.new do |s|
|
|
48
51
|
"init.rb",
|
49
52
|
"install.rb",
|
50
53
|
"javascripts/core.js",
|
54
|
+
"javascripts/ext.js",
|
55
|
+
"javascripts/touch.js",
|
51
56
|
"lib/netzke-core.rb",
|
52
57
|
"lib/netzke/actions.rb",
|
53
58
|
"lib/netzke/base.rb",
|
@@ -66,9 +71,13 @@ Gem::Specification.new do |s|
|
|
66
71
|
"lib/netzke/embedding.rb",
|
67
72
|
"lib/netzke/ext_component.rb",
|
68
73
|
"lib/netzke/javascript.rb",
|
69
|
-
"lib/netzke/
|
70
|
-
"lib/netzke/
|
71
|
-
"lib/netzke/
|
74
|
+
"lib/netzke/javascript/scopes.rb",
|
75
|
+
"lib/netzke/railz.rb",
|
76
|
+
"lib/netzke/railz/action_view_ext.rb",
|
77
|
+
"lib/netzke/railz/action_view_ext/ext.rb",
|
78
|
+
"lib/netzke/railz/action_view_ext/touch.rb",
|
79
|
+
"lib/netzke/railz/controller_extensions.rb",
|
80
|
+
"lib/netzke/railz/routes.rb",
|
72
81
|
"lib/netzke/services.rb",
|
73
82
|
"lib/netzke/session.rb",
|
74
83
|
"lib/netzke/state.rb",
|
@@ -79,6 +88,7 @@ Gem::Specification.new do |s|
|
|
79
88
|
"spec/component/base_spec.rb",
|
80
89
|
"spec/component/composition_spec.rb",
|
81
90
|
"spec/component/javascript_spec.rb",
|
91
|
+
"spec/component/state_spec.rb",
|
82
92
|
"spec/core_ext_spec.rb",
|
83
93
|
"spec/spec.opt",
|
84
94
|
"spec/spec_helper.rb",
|
@@ -94,12 +104,20 @@ Gem::Specification.new do |s|
|
|
94
104
|
"test/rails_app/app/components/component_loader.rb",
|
95
105
|
"test/rails_app/app/components/component_with_actions.rb",
|
96
106
|
"test/rails_app/app/components/component_with_custom_css.rb",
|
107
|
+
"test/rails_app/app/components/component_with_custom_css/stylesheets/custom.css",
|
97
108
|
"test/rails_app/app/components/component_with_included_js.rb",
|
109
|
+
"test/rails_app/app/components/component_with_js_mixin.rb",
|
110
|
+
"test/rails_app/app/components/component_with_js_mixin/javascripts/extra_one.js",
|
111
|
+
"test/rails_app/app/components/component_with_js_mixin/javascripts/extra_two.js",
|
112
|
+
"test/rails_app/app/components/component_with_js_mixin/javascripts/method_set_one.js",
|
113
|
+
"test/rails_app/app/components/component_with_js_mixin/javascripts/method_set_two.js",
|
98
114
|
"test/rails_app/app/components/component_with_session_persistence.rb",
|
99
|
-
"test/rails_app/app/components/custom.css",
|
100
115
|
"test/rails_app/app/components/deprecated/server_caller.rb",
|
101
116
|
"test/rails_app/app/components/extended_component_with_actions.rb",
|
117
|
+
"test/rails_app/app/components/extended_component_with_js_mixin.rb",
|
118
|
+
"test/rails_app/app/components/extended_component_with_js_mixin/javascripts/some_method_set.js",
|
102
119
|
"test/rails_app/app/components/extended_server_caller.rb",
|
120
|
+
"test/rails_app/app/components/hello_world_component.rb",
|
103
121
|
"test/rails_app/app/components/included.js",
|
104
122
|
"test/rails_app/app/components/kinda_complex_component.rb",
|
105
123
|
"test/rails_app/app/components/kinda_complex_component/basic_stuff.rb",
|
@@ -110,16 +128,26 @@ Gem::Specification.new do |s|
|
|
110
128
|
"test/rails_app/app/components/scoped_components/some_scoped_component.rb",
|
111
129
|
"test/rails_app/app/components/server_caller.rb",
|
112
130
|
"test/rails_app/app/components/simple_component.rb",
|
131
|
+
"test/rails_app/app/components/simple_panel.rb",
|
113
132
|
"test/rails_app/app/components/simple_tab_panel.rb",
|
114
133
|
"test/rails_app/app/components/simple_window.rb",
|
115
134
|
"test/rails_app/app/components/some_composite.rb",
|
116
135
|
"test/rails_app/app/components/some_ext_component.rb",
|
136
|
+
"test/rails_app/app/components/touch/hello_world_component.rb",
|
137
|
+
"test/rails_app/app/components/touch/server_caller.rb",
|
138
|
+
"test/rails_app/app/components/touch/simple_carousel.rb",
|
117
139
|
"test/rails_app/app/controllers/application_controller.rb",
|
118
140
|
"test/rails_app/app/controllers/components_controller.rb",
|
119
141
|
"test/rails_app/app/controllers/multiple_components_controller.rb",
|
142
|
+
"test/rails_app/app/controllers/touch_controller.rb",
|
120
143
|
"test/rails_app/app/controllers/welcome_controller.rb",
|
121
144
|
"test/rails_app/app/helpers/application_helper.rb",
|
145
|
+
"test/rails_app/app/helpers/touch_helper.rb",
|
146
|
+
"test/rails_app/app/views/components/panel_with_autoload.html.erb",
|
147
|
+
"test/rails_app/app/views/components/some_tab_panel.html.erb",
|
122
148
|
"test/rails_app/app/views/layouts/application.html.erb",
|
149
|
+
"test/rails_app/app/views/layouts/nested.html.erb",
|
150
|
+
"test/rails_app/app/views/layouts/touch.html.erb",
|
123
151
|
"test/rails_app/app/views/multiple_components/set_one.html.erb",
|
124
152
|
"test/rails_app/config.ru",
|
125
153
|
"test/rails_app/config/application.rb",
|
@@ -138,7 +166,7 @@ Gem::Specification.new do |s|
|
|
138
166
|
"test/rails_app/config/locales/en.yml",
|
139
167
|
"test/rails_app/config/routes.rb",
|
140
168
|
"test/rails_app/db/development_structure.sql",
|
141
|
-
"test/rails_app/db/migrate/
|
169
|
+
"test/rails_app/db/migrate/20110110132720_create_netzke_component_states.rb",
|
142
170
|
"test/rails_app/db/schema.rb",
|
143
171
|
"test/rails_app/db/seeds.rb",
|
144
172
|
"test/rails_app/lib/tasks/.gitkeep",
|
@@ -149,6 +177,8 @@ Gem::Specification.new do |s|
|
|
149
177
|
"test/rails_app/public/images/rails.png",
|
150
178
|
"test/rails_app/public/robots.txt",
|
151
179
|
"test/rails_app/script/rails",
|
180
|
+
"test/rails_app/spec/controllers/touch_controller_spec.rb",
|
181
|
+
"test/rails_app/spec/helpers/touch_helper_spec.rb",
|
152
182
|
"test/rails_app/vendor/plugins/.gitkeep",
|
153
183
|
"test/test_helper.rb",
|
154
184
|
"test/unit/core_ext_test.rb",
|
@@ -177,6 +207,7 @@ Gem::Specification.new do |s|
|
|
177
207
|
"spec/component/base_spec.rb",
|
178
208
|
"spec/component/composition_spec.rb",
|
179
209
|
"spec/component/javascript_spec.rb",
|
210
|
+
"spec/component/state_spec.rb",
|
180
211
|
"spec/core_ext_spec.rb",
|
181
212
|
"spec/spec_helper.rb",
|
182
213
|
"test/rails_app/app/components/border_layout_panel.rb",
|
@@ -184,10 +215,13 @@ Gem::Specification.new do |s|
|
|
184
215
|
"test/rails_app/app/components/component_with_actions.rb",
|
185
216
|
"test/rails_app/app/components/component_with_custom_css.rb",
|
186
217
|
"test/rails_app/app/components/component_with_included_js.rb",
|
218
|
+
"test/rails_app/app/components/component_with_js_mixin.rb",
|
187
219
|
"test/rails_app/app/components/component_with_session_persistence.rb",
|
188
220
|
"test/rails_app/app/components/deprecated/server_caller.rb",
|
189
221
|
"test/rails_app/app/components/extended_component_with_actions.rb",
|
222
|
+
"test/rails_app/app/components/extended_component_with_js_mixin.rb",
|
190
223
|
"test/rails_app/app/components/extended_server_caller.rb",
|
224
|
+
"test/rails_app/app/components/hello_world_component.rb",
|
191
225
|
"test/rails_app/app/components/kinda_complex_component.rb",
|
192
226
|
"test/rails_app/app/components/kinda_complex_component/basic_stuff.rb",
|
193
227
|
"test/rails_app/app/components/kinda_complex_component/extra_stuff.rb",
|
@@ -197,15 +231,21 @@ Gem::Specification.new do |s|
|
|
197
231
|
"test/rails_app/app/components/scoped_components/some_scoped_component.rb",
|
198
232
|
"test/rails_app/app/components/server_caller.rb",
|
199
233
|
"test/rails_app/app/components/simple_component.rb",
|
234
|
+
"test/rails_app/app/components/simple_panel.rb",
|
200
235
|
"test/rails_app/app/components/simple_tab_panel.rb",
|
201
236
|
"test/rails_app/app/components/simple_window.rb",
|
202
237
|
"test/rails_app/app/components/some_composite.rb",
|
203
238
|
"test/rails_app/app/components/some_ext_component.rb",
|
239
|
+
"test/rails_app/app/components/touch/hello_world_component.rb",
|
240
|
+
"test/rails_app/app/components/touch/server_caller.rb",
|
241
|
+
"test/rails_app/app/components/touch/simple_carousel.rb",
|
204
242
|
"test/rails_app/app/controllers/application_controller.rb",
|
205
243
|
"test/rails_app/app/controllers/components_controller.rb",
|
206
244
|
"test/rails_app/app/controllers/multiple_components_controller.rb",
|
245
|
+
"test/rails_app/app/controllers/touch_controller.rb",
|
207
246
|
"test/rails_app/app/controllers/welcome_controller.rb",
|
208
247
|
"test/rails_app/app/helpers/application_helper.rb",
|
248
|
+
"test/rails_app/app/helpers/touch_helper.rb",
|
209
249
|
"test/rails_app/config/application.rb",
|
210
250
|
"test/rails_app/config/boot.rb",
|
211
251
|
"test/rails_app/config/environment.rb",
|
@@ -219,9 +259,11 @@ Gem::Specification.new do |s|
|
|
219
259
|
"test/rails_app/config/initializers/secret_token.rb",
|
220
260
|
"test/rails_app/config/initializers/session_store.rb",
|
221
261
|
"test/rails_app/config/routes.rb",
|
222
|
-
"test/rails_app/db/migrate/
|
262
|
+
"test/rails_app/db/migrate/20110110132720_create_netzke_component_states.rb",
|
223
263
|
"test/rails_app/db/schema.rb",
|
224
264
|
"test/rails_app/db/seeds.rb",
|
265
|
+
"test/rails_app/spec/controllers/touch_controller_spec.rb",
|
266
|
+
"test/rails_app/spec/helpers/touch_helper_spec.rb",
|
225
267
|
"test/test_helper.rb",
|
226
268
|
"test/unit/core_ext_test.rb",
|
227
269
|
"test/unit/netzke_core_test.rb",
|