netzke-basepack 0.5.6 → 0.5.7
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/CHANGELOG.rdoc +6 -1
- data/README.rdoc +15 -10
- data/Rakefile +2 -2
- data/lib/netzke/accordion_panel.rb +1 -1
- data/lib/netzke/border_layout_panel.rb +3 -3
- data/lib/netzke/fields_configurator.rb +1 -1
- data/lib/netzke/form_panel.rb +3 -3
- data/lib/netzke/form_panel/form_panel_api.rb +1 -1
- data/lib/netzke/grid_panel.rb +12 -12
- data/lib/netzke/grid_panel/grid_panel_js.rb +2 -2
- data/lib/netzke/masquerade_selector.rb +4 -4
- data/lib/netzke/plugins/configuration_tool.rb +2 -2
- data/lib/netzke/search_panel.rb +1 -1
- data/lib/netzke/table_editor.rb +6 -6
- data/lib/netzke/tree_panel.rb +1 -1
- data/lib/netzke/window.rb +34 -35
- data/lib/netzke/wrapper.rb +2 -2
- data/test/unit/accordion_panel_test.rb +2 -2
- data/test/unit/grid_panel_test.rb +4 -4
- data/test/unit/helper_model_test.rb +2 -2
- data/test/unit/tab_panel_test.rb +2 -2
- metadata +3 -3
data/CHANGELOG.rdoc
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
= v0.5.
|
1
|
+
= v0.5.7 - 2010-02-26
|
2
|
+
* Regression: column config for GridPanel again accepts a renderer along with its parameters (as array, where the first element is the renderers name, the second - the parameters passed to the renderer, e.g.: :renderer => ["date", "y-m-d"])
|
3
|
+
* Fix: Window resize/move now works correctly
|
4
|
+
* Code: taking care of deprecated methods
|
5
|
+
|
6
|
+
= v0.5.6 - 2010-01-10
|
2
7
|
* Compatibility with latest netzke-core
|
3
8
|
* Compatibility with Ext JS v3.1
|
4
9
|
* Impr: Code reorganization
|
data/README.rdoc
CHANGED
@@ -3,9 +3,9 @@ A pack of basic Rails/ExtJS widgets as a part of the Netzke framework. Live demo
|
|
3
3
|
|
4
4
|
= Prerequisites
|
5
5
|
1. Rails >= 2.2
|
6
|
-
2.
|
6
|
+
2. Netzke assumes that your ExtJS library is in public/extjs, which may be a symbolic link, e.g:
|
7
7
|
|
8
|
-
cd public && ln -s ~/Developer/extjs/ext-3.
|
8
|
+
cd public && ln -s ~/Developer/extjs/ext-3.1.1 extjs
|
9
9
|
|
10
10
|
3. acts_as_list plugin:
|
11
11
|
|
@@ -24,11 +24,7 @@ For the "edge" stuff, install as plugin (recommended):
|
|
24
24
|
|
25
25
|
./script/plugin install git://github.com/skozlov/netzke-basepack.git
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
sudo gem install gemcutter && gem tumble
|
30
|
-
|
31
|
-
Install the gem:
|
27
|
+
Or install as gem:
|
32
28
|
|
33
29
|
gem install netzke-basepack
|
34
30
|
|
@@ -66,10 +62,19 @@ Now embed a widget into a view like this:
|
|
66
62
|
|
67
63
|
<%= netzke :books, :class_name => 'GridPanel', :model => 'Book' %>
|
68
64
|
|
69
|
-
|
70
|
-
|
65
|
+
For more examples, see http://netzke-demo.writelesscode.com
|
66
|
+
|
67
|
+
== More info
|
68
|
+
Introduction to Netzke framework and wiki: http://github.com/skozlov/netzke
|
69
|
+
|
70
|
+
Twitter: http://twitter.com/skozlov
|
71
|
+
|
72
|
+
Tutorials: http://blog.writelesscode.com
|
73
|
+
|
74
|
+
Live-demo with sample code: http://netzke-demo.writelesscode.com
|
71
75
|
|
72
76
|
= Credentials
|
73
77
|
Testing done with the help of http://github.com/pluginaweek/plugin_test_helper
|
74
78
|
|
75
|
-
|
79
|
+
---
|
80
|
+
Copyright (c) 2008-2010 Sergei Kozlov, released under the MIT license
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
begin
|
2
2
|
require 'jeweler'
|
3
3
|
Jeweler::Tasks.new do |gemspec|
|
4
|
-
gemspec.version = "0.5.
|
4
|
+
gemspec.version = "0.5.7"
|
5
5
|
gemspec.name = "netzke-basepack"
|
6
6
|
gemspec.summary = "Pre-built Rails + ExtJS widgets for your RIA"
|
7
7
|
gemspec.description = "A set of full-featured extendible Netzke widgets (such as FormPanel, GridPanel, Window, BorderLayoutPanel, etc) which can be used as building block for your RIA"
|
@@ -9,7 +9,7 @@ begin
|
|
9
9
|
gemspec.homepage = "http://github.com/skozlov/netzke-basepack"
|
10
10
|
gemspec.rubyforge_project = "netzke-basepack"
|
11
11
|
gemspec.authors = ["Sergei Kozlov"]
|
12
|
-
gemspec.add_dependency("netzke-core", ">=0.5.
|
12
|
+
gemspec.add_dependency("netzke-core", ">=0.5.1")
|
13
13
|
gemspec.add_dependency("searchlogic", ">=2.0.0")
|
14
14
|
gemspec.add_dependency("will_paginate", ">=2.0.0")
|
15
15
|
end
|
@@ -104,7 +104,7 @@ module Netzke
|
|
104
104
|
def initial_aggregatees
|
105
105
|
res = {}
|
106
106
|
config[:items].each_with_index do |item, i|
|
107
|
-
item[:late_aggregation] = !item[:active]
|
107
|
+
item[:late_aggregation] = !item[:active] && !item[:preloaded]
|
108
108
|
res.merge!(item[:name].to_sym => item)
|
109
109
|
end
|
110
110
|
res
|
@@ -22,10 +22,10 @@ module Netzke
|
|
22
22
|
# == Example configuration:
|
23
23
|
#
|
24
24
|
# :regions => {
|
25
|
-
# :center => {:
|
25
|
+
# :center => {:class_name => "Panel", :ext_config => {:html => "A panel"}},
|
26
26
|
# :west => {
|
27
|
-
# :
|
28
|
-
# :
|
27
|
+
# :class_name => "GridPanel",
|
28
|
+
# :model => "User",
|
29
29
|
# :region_config => {
|
30
30
|
# :width => 100,
|
31
31
|
# :split => true
|
@@ -25,7 +25,7 @@ module Netzke
|
|
25
25
|
def default_config
|
26
26
|
super.deep_merge({
|
27
27
|
:name => 'columns',
|
28
|
-
:
|
28
|
+
:model => is_for_grid? ? "NetzkeAutoColumn" : "NetzkeAutoField",
|
29
29
|
:ext_config => {
|
30
30
|
:header => false,
|
31
31
|
:enable_extended_search => false,
|
data/lib/netzke/form_panel.rb
CHANGED
@@ -76,7 +76,7 @@ module Netzke
|
|
76
76
|
|
77
77
|
res << {
|
78
78
|
:name => 'fields',
|
79
|
-
:
|
79
|
+
:class_name => "FieldsConfigurator",
|
80
80
|
:active => true,
|
81
81
|
:widget => self,
|
82
82
|
:persistent_config => true
|
@@ -84,7 +84,7 @@ module Netzke
|
|
84
84
|
|
85
85
|
res << {
|
86
86
|
:name => 'general',
|
87
|
-
:
|
87
|
+
:class_name => "PropertyEditor",
|
88
88
|
:widget => self,
|
89
89
|
:ext_config => {:title => false}
|
90
90
|
}
|
@@ -106,7 +106,7 @@ module Netzke
|
|
106
106
|
def js_config
|
107
107
|
res = super
|
108
108
|
res.merge!(:clmns => columns)
|
109
|
-
res.merge!(:
|
109
|
+
res.merge!(:model => data_class.name) if data_class
|
110
110
|
res.merge!(:pri => data_class.primary_key) if data_class
|
111
111
|
res
|
112
112
|
end
|
@@ -42,7 +42,7 @@ module Netzke
|
|
42
42
|
|
43
43
|
# API handling form load
|
44
44
|
# def load(params)
|
45
|
-
# klass = config[:
|
45
|
+
# klass = config[:model].constantize
|
46
46
|
# case params[:neighbour]
|
47
47
|
# when "previous" then @record = klass.previous(params[:id])
|
48
48
|
# when "next" then @record = klass.next(params[:id])
|
data/lib/netzke/grid_panel.rb
CHANGED
@@ -237,13 +237,13 @@ module Netzke
|
|
237
237
|
res << {
|
238
238
|
:persistent_config => true,
|
239
239
|
:name => 'columns',
|
240
|
-
:
|
240
|
+
:class_name => "FieldsConfigurator",
|
241
241
|
:active => true,
|
242
242
|
:widget => self
|
243
243
|
}
|
244
244
|
res << {
|
245
245
|
:name => 'general',
|
246
|
-
:
|
246
|
+
:class_name => "PropertyEditor",
|
247
247
|
:widget => self,
|
248
248
|
:ext_config => {:title => false}
|
249
249
|
}
|
@@ -269,14 +269,14 @@ module Netzke
|
|
269
269
|
# Edit in form
|
270
270
|
res.merge!({
|
271
271
|
:add_form => {
|
272
|
-
:
|
272
|
+
:class_name => "GridPanel::RecordFormWindow",
|
273
273
|
:ext_config => {
|
274
274
|
:title => "Add #{data_class.name.humanize}",
|
275
275
|
:button_align => "right"
|
276
276
|
},
|
277
277
|
:item => {
|
278
|
-
:
|
279
|
-
:
|
278
|
+
:class_name => "FormPanel",
|
279
|
+
:model => data_class.name,
|
280
280
|
:persistent_config => config[:persistent_config],
|
281
281
|
:strong_default_attrs => config[:strong_default_attrs],
|
282
282
|
:ext_config => {
|
@@ -290,8 +290,8 @@ module Netzke
|
|
290
290
|
},
|
291
291
|
|
292
292
|
:edit_form => {
|
293
|
-
:
|
294
|
-
:
|
293
|
+
:class_name => "FormPanel",
|
294
|
+
:model => data_class.name,
|
295
295
|
:persistent_config => config[:persistent_config],
|
296
296
|
:ext_config => {
|
297
297
|
:bbar => false,
|
@@ -301,8 +301,8 @@ module Netzke
|
|
301
301
|
},
|
302
302
|
|
303
303
|
:multi_edit_form => {
|
304
|
-
:
|
305
|
-
:
|
304
|
+
:class_name => "FormPanel",
|
305
|
+
:model => data_class.name,
|
306
306
|
:persistent_config => config[:persistent_config],
|
307
307
|
:ext_config => {
|
308
308
|
:bbar => false,
|
@@ -312,8 +312,8 @@ module Netzke
|
|
312
312
|
},
|
313
313
|
|
314
314
|
:new_record_form => {
|
315
|
-
:
|
316
|
-
:
|
315
|
+
:class_name => "FormPanel",
|
316
|
+
:model => data_class.name,
|
317
317
|
:persistent_config => config[:persistent_config],
|
318
318
|
:strong_default_attrs => config[:strong_default_attrs],
|
319
319
|
:ext_config => {
|
@@ -328,7 +328,7 @@ module Netzke
|
|
328
328
|
# Extended search
|
329
329
|
res.merge!({
|
330
330
|
:search_panel => {
|
331
|
-
:
|
331
|
+
:class_name => "SearchPanel",
|
332
332
|
:search_class_name => data_class.name,
|
333
333
|
:persistent_config => config[:persistent_config],
|
334
334
|
:ext_config => {
|
@@ -8,7 +8,7 @@ module Netzke
|
|
8
8
|
def js_config
|
9
9
|
res = super
|
10
10
|
res.merge!(:clmns => columns)
|
11
|
-
res.merge!(:
|
11
|
+
res.merge!(:model => config[:model])
|
12
12
|
res.merge!(:inline_data => get_data) if ext_config[:load_inline_data]
|
13
13
|
res.merge!(:pri => data_class.primary_key)
|
14
14
|
res
|
@@ -106,7 +106,7 @@ module Netzke
|
|
106
106
|
}
|
107
107
|
|
108
108
|
// set the renderer
|
109
|
-
if (c.renderer && c.renderer.match(/^\\s*function\\s*\\(/)) {
|
109
|
+
if (c.renderer && !Ext.isArray(c.renderer) && c.renderer.match(/^\\s*function\\s*\\(/)) {
|
110
110
|
// if the renderer is an inline function - eval it (double escaping because we are inside of the Ruby string here...)
|
111
111
|
eval("c.renderer = " + c.renderer + ";");
|
112
112
|
} else {
|
@@ -5,8 +5,8 @@ module Netzke
|
|
5
5
|
@items ||= [{
|
6
6
|
:name => "roles",
|
7
7
|
:active => true,
|
8
|
-
:
|
9
|
-
:
|
8
|
+
:class_name => "GridPanel",
|
9
|
+
:model => 'Role',
|
10
10
|
:columns => [:id, :name],
|
11
11
|
:ext_config => {
|
12
12
|
:header => false,
|
@@ -15,8 +15,8 @@ module Netzke
|
|
15
15
|
},{
|
16
16
|
:name => "users",
|
17
17
|
:preloaded => true,
|
18
|
-
:
|
19
|
-
:
|
18
|
+
:class_name => "GridPanel",
|
19
|
+
:model => 'User',
|
20
20
|
:ext_config => {
|
21
21
|
:header => false,
|
22
22
|
:rows_per_page => 10,
|
@@ -31,7 +31,7 @@ module Netzke::Plugins
|
|
31
31
|
:on_gear => <<-END_OF_JAVASCRIPT.l
|
32
32
|
function(){
|
33
33
|
var w = new Ext.Window({
|
34
|
-
title:'Config - '+ this.
|
34
|
+
title:'Config - '+ this.model,
|
35
35
|
layout:'fit',
|
36
36
|
modal:true,
|
37
37
|
width: Ext.lib.Dom.getViewWidth() *0.9,
|
@@ -93,7 +93,7 @@ module Netzke::Plugins
|
|
93
93
|
# Add the ConfigurationPanel as aggregatee, which in its turn aggregates widgets from the
|
94
94
|
# configuration_widgets method
|
95
95
|
res.merge!(:configuration_panel => {
|
96
|
-
:
|
96
|
+
:class_name => 'ConfigurationPanel',
|
97
97
|
:items => configuration_widgets,
|
98
98
|
:late_aggregation => true
|
99
99
|
}) if config_tool_needed?
|
data/lib/netzke/search_panel.rb
CHANGED
data/lib/netzke/table_editor.rb
CHANGED
@@ -88,16 +88,16 @@ module Netzke
|
|
88
88
|
split_size = config[:split_size] || 200
|
89
89
|
{
|
90
90
|
:center => {
|
91
|
-
:
|
92
|
-
:
|
91
|
+
:class_name => "GridPanel",
|
92
|
+
:model => config[:model],
|
93
93
|
:ext_config => {
|
94
|
-
:title => config[:grid_title] || config[:
|
94
|
+
:title => config[:grid_title] || config[:model].pluralize
|
95
95
|
}
|
96
96
|
}.deep_merge(config[:grid_config] || {}),
|
97
97
|
|
98
98
|
split_region => {
|
99
|
-
:
|
100
|
-
:
|
99
|
+
:class_name => "FormPanel",
|
100
|
+
:model => config[:model],
|
101
101
|
:region_config => {
|
102
102
|
:width => split_size,
|
103
103
|
:height => split_size,
|
@@ -105,7 +105,7 @@ module Netzke
|
|
105
105
|
:collapsible => true
|
106
106
|
},
|
107
107
|
:ext_config => {
|
108
|
-
:title => config[:form_title] || "#{config[:
|
108
|
+
:title => config[:form_title] || "#{config[:model]} details",
|
109
109
|
:listeners => {:actioncomplete => {
|
110
110
|
:fn => "function(f, a){this.ownerCt.ownerCt.onFormActioncomplete(f,a)}".l
|
111
111
|
}}
|
data/lib/netzke/tree_panel.rb
CHANGED
@@ -18,7 +18,7 @@ class Netzke::TreePanel < Netzke::Base
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def get_children(params)
|
21
|
-
klass = config[:
|
21
|
+
klass = config[:model].constantize
|
22
22
|
node = params[:node] == 'source' ? klass.find_by_parent_id(nil) : klass.find(params[:node].to_i)
|
23
23
|
node.children.map{|n| {:text => n.name, :id => n.id, :leaf => n.children.empty?}}
|
24
24
|
end
|
data/lib/netzke/window.rb
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
module Netzke
|
2
2
|
# == Window
|
3
|
-
# Ext.Window-based widget
|
3
|
+
# Ext.Window-based widget able to nest other Netzke widgets
|
4
4
|
#
|
5
5
|
# == Features
|
6
|
-
# * Persistent position
|
7
|
-
# * Persistent dimensions
|
6
|
+
# * Persistent position and dimensions
|
8
7
|
#
|
9
8
|
# == Instance configuration
|
10
|
-
# <tt>:
|
11
|
-
#
|
12
|
-
#
|
9
|
+
# <tt>:item</tt> - nested Netzke widget, e.g.:
|
10
|
+
#
|
11
|
+
# netzke :window, :item => {:class_name => "GridPanel", :model => "User"}
|
13
12
|
class Window < Base
|
14
13
|
# Based on Ext.Window, naturally
|
15
14
|
def self.js_base_class
|
@@ -26,57 +25,57 @@ module Netzke
|
|
26
25
|
# Extends the JavaScript class
|
27
26
|
def self.js_extend_properties
|
28
27
|
{
|
28
|
+
# we nest widget inside the "fit" layout
|
29
29
|
:layout => "fit",
|
30
30
|
|
31
|
+
# default width and height
|
32
|
+
:width => 300,
|
33
|
+
:height => 200,
|
34
|
+
|
31
35
|
:init_component => <<-END_OF_JAVASCRIPT.l,
|
32
36
|
function(){
|
33
|
-
//
|
34
|
-
// Convert them into actual pixels.
|
35
|
-
Ext.each(["width", "length"], function(k){
|
36
|
-
if (Ext.isString(this[k])) {
|
37
|
-
this[k] = Ext.lib.Dom.getViewHeight() * parseFloat("." + this[k].substr(0, this[k].length - 1)); // "66%" => ".66"
|
38
|
-
}
|
39
|
-
});
|
40
|
-
|
41
|
-
// Superclass' initComponent
|
37
|
+
// superclass' initComponent
|
42
38
|
#{js_full_class_name}.superclass.initComponent.call(this);
|
43
39
|
|
44
|
-
//
|
40
|
+
// set the move and resize events after window is shown, so that they don't fire at initial rendering
|
45
41
|
this.on("show", function(){
|
46
|
-
this.on("move", this.
|
47
|
-
this.on("resize", this.
|
42
|
+
this.on("move", this.onMoveResize, this);
|
43
|
+
this.on("resize", this.onMoveResize, this);
|
48
44
|
}, this);
|
49
45
|
|
46
|
+
// instantiate the aggregatee
|
50
47
|
if (this.itemConfig){
|
51
48
|
this.instantiateChild(this.itemConfig);
|
52
49
|
}
|
53
50
|
}
|
54
51
|
END_OF_JAVASCRIPT
|
55
52
|
|
56
|
-
:
|
57
|
-
function(
|
58
|
-
this.
|
59
|
-
}
|
60
|
-
END_OF_JAVASCRIPT
|
53
|
+
:on_move_resize => <<-END_OF_JAVASCRIPT.l,
|
54
|
+
function(){
|
55
|
+
var x = this.getPosition()[0], y = this.getPosition()[1], w = this.getSize().width, h = this.getSize().height;
|
61
56
|
|
62
|
-
|
63
|
-
|
64
|
-
this.
|
57
|
+
// Don't bother the server twice when both move and resize events are fired at the same time
|
58
|
+
// (which happens when the left or upper window border is dragged)
|
59
|
+
if (this.moveResizeTimer) {clearTimeout(this.moveResizeTimer)};
|
60
|
+
|
61
|
+
this.moveResizeTimer = (function(sizeAndPosition){
|
62
|
+
this.setSizeAndPosition(sizeAndPosition); // API call
|
63
|
+
}).defer(10, this, [{x:x, y:y, w:w, h:h}]); // 10ms should be enough
|
65
64
|
}
|
66
65
|
END_OF_JAVASCRIPT
|
66
|
+
|
67
67
|
}
|
68
68
|
end
|
69
69
|
|
70
70
|
# Processing API calls from client
|
71
|
-
api :
|
72
|
-
def
|
73
|
-
update_persistent_ext_config(
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
update_persistent_ext_config(:width => params[:w].to_i, :height => params[:h].to_i)
|
71
|
+
api :set_size_and_position
|
72
|
+
def set_size_and_position(params)
|
73
|
+
update_persistent_ext_config(
|
74
|
+
:x => params[:x].to_i,
|
75
|
+
:y => params[:y].to_i,
|
76
|
+
:width => params[:w].to_i,
|
77
|
+
:height => params[:h].to_i
|
78
|
+
)
|
80
79
|
{}
|
81
80
|
end
|
82
81
|
end
|
data/lib/netzke/wrapper.rb
CHANGED
@@ -11,8 +11,8 @@ module Netzke
|
|
11
11
|
# Example:
|
12
12
|
#
|
13
13
|
# netzke :wrapper, :item => {
|
14
|
-
# :
|
15
|
-
# :
|
14
|
+
# :class_name => "FormPanel",
|
15
|
+
# :model => "User"
|
16
16
|
# }
|
17
17
|
class Wrapper < Base
|
18
18
|
def self.js_extend_properties
|
@@ -6,9 +6,9 @@ class AccordionPanelTest < ActiveSupport::TestCase
|
|
6
6
|
|
7
7
|
test "specifying items" do
|
8
8
|
accordion = Netzke::AccordionPanel.new(:items => [{
|
9
|
-
:
|
9
|
+
:class_name => "Panel"
|
10
10
|
},{
|
11
|
-
:
|
11
|
+
:class_name => "Panel", :name => "second_panel", :active => true
|
12
12
|
}])
|
13
13
|
|
14
14
|
assert_equal(2, accordion.initial_aggregatees.keys.size)
|
@@ -4,8 +4,8 @@ require 'netzke-core'
|
|
4
4
|
require 'netzke/plugins/configuration_tool'
|
5
5
|
require 'netzke/accordion_panel'
|
6
6
|
|
7
|
-
require 'netzke/grid_panel_api'
|
8
|
-
require 'netzke/grid_panel_js'
|
7
|
+
require 'netzke/grid_panel/grid_panel_api'
|
8
|
+
require 'netzke/grid_panel/grid_panel_js'
|
9
9
|
require 'netzke/grid_panel'
|
10
10
|
|
11
11
|
require 'netzke/active_record/basepack'
|
@@ -13,7 +13,7 @@ require 'netzke/active_record/basepack'
|
|
13
13
|
class GridPanelTest < ActiveSupport::TestCase
|
14
14
|
|
15
15
|
test "api" do
|
16
|
-
grid = Netzke::GridPanel.new(:name => 'grid', :
|
16
|
+
grid = Netzke::GridPanel.new(:name => 'grid', :model => 'Book', :columns => [:id, :title, :recent])
|
17
17
|
|
18
18
|
# post
|
19
19
|
res = grid.post_data("created_records" => [{:title => 'Lord of the Rings'}].to_nifty_json)
|
@@ -36,7 +36,7 @@ class GridPanelTest < ActiveSupport::TestCase
|
|
36
36
|
end
|
37
37
|
|
38
38
|
test "normalize index" do
|
39
|
-
grid = Netzke::GridPanel.new(:name => 'grid', :
|
39
|
+
grid = Netzke::GridPanel.new(:name => 'grid', :model => 'Book', :columns => [:id, :col0, {:name => :col1, :excluded => true}, :col2, {:name => :col3, :excluded => true}, :col4, :col5])
|
40
40
|
|
41
41
|
assert_equal(0, grid.normalize_index(0))
|
42
42
|
assert_equal(1, grid.normalize_index(1))
|
@@ -11,7 +11,7 @@ class HelperModelTest < ActiveSupport::TestCase
|
|
11
11
|
:enable_config_tool => true
|
12
12
|
},
|
13
13
|
})
|
14
|
-
form = Netzke::FormPanel.new(:
|
14
|
+
form = Netzke::FormPanel.new(:model => "Book")
|
15
15
|
Netzke::PropertyEditor::HelperModel.widget = form
|
16
16
|
helper_model = Netzke::PropertyEditor::HelperModel.new
|
17
17
|
|
@@ -23,7 +23,7 @@ class HelperModelTest < ActiveSupport::TestCase
|
|
23
23
|
|
24
24
|
# now try to change the configuration
|
25
25
|
helper_model.ext_config__config_tool = "false"
|
26
|
-
# form = Netzke::FormPanel.new(:
|
26
|
+
# form = Netzke::FormPanel.new(:model => "Book")
|
27
27
|
# assert(false, form.ext_config[:enable_config_tool]) # FIXME: make it work
|
28
28
|
end
|
29
29
|
|
data/test/unit/tab_panel_test.rb
CHANGED
@@ -6,9 +6,9 @@ class TabPanelTest < ActiveSupport::TestCase
|
|
6
6
|
|
7
7
|
test "active item" do
|
8
8
|
tab_panel = Netzke::TabPanel.new(:items => [{
|
9
|
-
:
|
9
|
+
:class_name => "Panel"
|
10
10
|
},{
|
11
|
-
:
|
11
|
+
:class_name => "Panel", :name => "second_panel", :active => true
|
12
12
|
}])
|
13
13
|
|
14
14
|
assert_equal(2, tab_panel.initial_aggregatees.keys.size)
|
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.5.
|
4
|
+
version: 0.5.7
|
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: 2010-
|
12
|
+
date: 2010-02-26 00:00:00 -03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.5.
|
23
|
+
version: 0.5.1
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: searchlogic
|