netzke-basepack 0.1.3.1 → 0.1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/README.mdown +7 -1
- data/Rakefile +1 -1
- data/lib/netzke/grid.rb +1 -1
- data/netzke-basepack.gemspec +4 -4
- metadata +2 -2
data/CHANGELOG
CHANGED
data/README.mdown
CHANGED
@@ -38,9 +38,14 @@ end`
|
|
38
38
|
After a widget is declared in the controller, it can be accessed in 3 different ways: 1) loaded by means of an automatically created controller action which will produce a basic HTML-page with the widget (handy for testing), 2) embedded directly into a view (by means of helpers), 3) dynamically loaded by other widgets (usually by the widget of class 'Application', if you want a desktop-like, AJAX-driven web-app).
|
39
39
|
|
40
40
|
## Using automatically created controller action
|
41
|
-
Without writing any more code, you can access the widget by `http://yourhost/welcome/
|
41
|
+
Without writing any more code, you can access the widget by `http://yourhost/welcome/books_test`. That is to say, you simply append `_test` to your widget's name (as declared in the controller) and use it as the action of the controller.
|
42
42
|
|
43
43
|
## Embedding a widget into a view
|
44
|
+
netzke-core plugin provides the following 2 helpers to put inside your head-tag (use it in your layout)
|
45
|
+
|
46
|
+
1. `netzke_js_include` - to include extjs and netzke javascript files
|
47
|
+
2. `netzke_css_include` - to include the css. This one can take a parameter to specify a color schema you wish for ExtJS, e.g.: `netzke_css_include(:gray)`
|
48
|
+
|
44
49
|
Declaring a widget in the controller provides you with a couple of helpers that can be used in the view:
|
45
50
|
|
46
51
|
1. `books_class_definition` will contain the javascript code defining the code for the JS class.
|
@@ -66,6 +71,7 @@ Ext.onReady(function(){
|
|
66
71
|
books.render("books");
|
67
72
|
})
|
68
73
|
<% end %>
|
74
|
+
<!-- some HTML... -->
|
69
75
|
<div id="books">the widget will be rendered in this div</div>`
|
70
76
|
|
71
77
|
## Dynamic loading of widgets
|
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ Echoe.new("netzke-basepack") do |p|
|
|
5
5
|
p.email = "sergei@writelesscode.com"
|
6
6
|
p.summary = "Base Netzke widgets - grid, form, tree, and more"
|
7
7
|
p.url = "http://writelesscode.com"
|
8
|
-
p.runtime_dependencies = ["searchlogic >=1.6.2", "netzke-core >= 0.1.
|
8
|
+
p.runtime_dependencies = ["searchlogic >=1.6.2", "netzke-core >= 0.1.4"]
|
9
9
|
p.development_dependencies = []
|
10
10
|
p.test_pattern = 'test/**/*_test.rb'
|
11
11
|
|
data/lib/netzke/grid.rb
CHANGED
@@ -86,7 +86,7 @@ module Netzke
|
|
86
86
|
# get columns from layout manager
|
87
87
|
def get_columns
|
88
88
|
@columns ||=
|
89
|
-
if layout_manager_class
|
89
|
+
if layout_manager_class && column_manager_class
|
90
90
|
layout = layout_manager_class.by_widget(id_name)
|
91
91
|
layout ||= column_manager_class.create_layout_for_widget(self)
|
92
92
|
layout.items_hash # TODO: bad name!
|
data/netzke-basepack.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{netzke-basepack}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.4.1"
|
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"]
|
@@ -26,13 +26,13 @@ Gem::Specification.new do |s|
|
|
26
26
|
|
27
27
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
28
28
|
s.add_runtime_dependency(%q<searchlogic>, [">= 1.6.2"])
|
29
|
-
s.add_runtime_dependency(%q<netzke-core>, [">= 0", "= 0.1.
|
29
|
+
s.add_runtime_dependency(%q<netzke-core>, [">= 0", "= 0.1.4"])
|
30
30
|
else
|
31
31
|
s.add_dependency(%q<searchlogic>, [">= 1.6.2"])
|
32
|
-
s.add_dependency(%q<netzke-core>, [">= 0", "= 0.1.
|
32
|
+
s.add_dependency(%q<netzke-core>, [">= 0", "= 0.1.4"])
|
33
33
|
end
|
34
34
|
else
|
35
35
|
s.add_dependency(%q<searchlogic>, [">= 1.6.2"])
|
36
|
-
s.add_dependency(%q<netzke-core>, [">= 0", "= 0.1.
|
36
|
+
s.add_dependency(%q<netzke-core>, [">= 0", "= 0.1.4"])
|
37
37
|
end
|
38
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netzke-basepack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergei Kozlov
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: "0"
|
34
34
|
- - "="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.1.
|
36
|
+
version: 0.1.4
|
37
37
|
version:
|
38
38
|
description: Base Netzke widgets - grid, form, tree, and more
|
39
39
|
email: sergei@writelesscode.com
|