netzke-core 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/css/core.css +1 -1
- data/javascripts/core.js +2 -0
- data/lib/app/models/netzke_preference.rb +1 -0
- data/lib/netzke/base.rb +1 -1
- data/lib/netzke/controller_extensions.rb +15 -2
- data/lib/netzke/js_class_builder.rb +20 -2
- data/netzke-core.gemspec +2 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
v0.2.3
|
2
|
+
FeedbackGhost will show the feedback on the top of the screen independent of the page scrolling.
|
3
|
+
Ext.Panel#loadWidget will accept null as url to delete the currently loaded widget
|
4
|
+
Bug fix: persistent_config works again
|
5
|
+
|
1
6
|
v0.2.2
|
2
7
|
js_ext_config instance method added for overwriting
|
3
8
|
Multiuser support
|
data/css/core.css
CHANGED
data/javascripts/core.js
CHANGED
@@ -105,6 +105,8 @@ Ext.override(Ext.Panel, {
|
|
105
105
|
|
106
106
|
this.remove(this.getWidget()); // first delete previous widget
|
107
107
|
|
108
|
+
if (!url) return false;
|
109
|
+
|
108
110
|
// we will let the server know which components we have cached
|
109
111
|
var cachedComponentNames = [];
|
110
112
|
for (name in Ext.componentCache) {
|
data/lib/netzke/base.rb
CHANGED
@@ -88,6 +88,19 @@ module Netzke
|
|
88
88
|
@generated_widget_classes.uniq!
|
89
89
|
res
|
90
90
|
end
|
91
|
+
|
92
|
+
def #{name}_widget_html
|
93
|
+
config = controller.class.widget_config_storage[:#{name}]
|
94
|
+
widget_instance = Netzke::Base.instance_by_config(config)
|
95
|
+
widget_instance.js_widget_html
|
96
|
+
end
|
97
|
+
|
98
|
+
def #{name}_widget_render
|
99
|
+
config = controller.class.widget_config_storage[:#{name}]
|
100
|
+
widget_instance = Netzke::Base.instance_by_config(config)
|
101
|
+
widget_instance.js_widget_render
|
102
|
+
end
|
103
|
+
|
91
104
|
END_EVAL
|
92
105
|
|
93
106
|
# add controller action which will render a simple HTML page containing the widget
|
@@ -103,12 +116,12 @@ module Netzke
|
|
103
116
|
<%= #{name}_class_definition %>
|
104
117
|
Ext.onReady(function(){
|
105
118
|
<%= #{name}_widget_instance %>
|
106
|
-
#{name
|
119
|
+
<%= #{name}_widget_render %>
|
107
120
|
})
|
108
121
|
</script>
|
109
122
|
</head>
|
110
123
|
<body>
|
111
|
-
|
124
|
+
<%= #{name}_widget_html %>
|
112
125
|
</body>
|
113
126
|
HTML
|
114
127
|
end
|
@@ -48,11 +48,29 @@ module Netzke
|
|
48
48
|
config[:ext_config] || {}
|
49
49
|
end
|
50
50
|
|
51
|
-
#
|
51
|
+
#
|
52
|
+
# The following methods are used when a widget is generated stand-alone (as a part of a HTML page)
|
53
|
+
#
|
54
|
+
|
55
|
+
# instantiating
|
52
56
|
def js_widget_instance
|
53
|
-
%Q
|
57
|
+
%Q{var #{config[:name].to_js} = new Ext.componentCache['#{short_widget_class_name}'](#{js_config.to_js});}
|
54
58
|
end
|
55
59
|
|
60
|
+
# rendering
|
61
|
+
def js_widget_render
|
62
|
+
%Q{#{config[:name].to_js}.render("#{config[:name].to_s.split('_').join('-')}");}
|
63
|
+
end
|
64
|
+
|
65
|
+
# container for rendering
|
66
|
+
def js_widget_html
|
67
|
+
%Q{<div id="#{config[:name].to_s.split('_').join('-')}"></div>}
|
68
|
+
end
|
69
|
+
|
70
|
+
#
|
71
|
+
#
|
72
|
+
#
|
73
|
+
|
56
74
|
# All the JS-code required by this *instance* of the widget. It includes the JS-class for the widget
|
57
75
|
# itself, as well as JS-classes for all widgets (non-late) aggregatees.
|
58
76
|
def js_missing_code(cached_dependencies = [])
|
data/netzke-core.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{netzke-core}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Sergei Kozlov"]
|
9
|
-
s.date = %q{2009-01-
|
9
|
+
s.date = %q{2009-01-25}
|
10
10
|
s.description = %q{Build ExtJS/Rails widgets with minimum effort}
|
11
11
|
s.email = %q{sergei@writelesscode.com}
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "lib/app/controllers/netzke_controller.rb", "lib/app/models/netzke_layout.rb", "lib/app/models/netzke_preference.rb", "lib/netzke/action_view_ext.rb", "lib/netzke/base.rb", "lib/netzke/controller_extensions.rb", "lib/netzke/core_ext.rb", "lib/netzke/feedback_ghost.rb", "lib/netzke/js_class_builder.rb", "lib/netzke/routing.rb", "lib/netzke-core.rb", "lib/vendor/facets/hash/recursive_merge.rb", "LICENSE", "README.mdown", "tasks/netzke_core_tasks.rake"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netzke-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergei Kozlov
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-01-
|
12
|
+
date: 2009-01-25 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|