netzke-basepack 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,9 @@
1
+ v0.4.2
2
+ 2009-05-07
3
+ Fix: afterlayout event bind removed completely because of some tricky inconsistent behavior of Ext. BasicApp initializing code put directly into js_after_constructor.
4
+
1
5
  v0.4.1
6
+ 2009-05-07
2
7
  Fix: afterlayout call moved to js_after_constructor in BasicApp
3
8
  Fix: cleaner persistent_config handling
4
9
  New: default's configuration enabled for FormPanel on class-level
@@ -46,7 +46,23 @@ module Netzke
46
46
  def js_after_constructor
47
47
  <<-JS.l
48
48
  // call appLoaded() once after the application is fully rendered
49
- this.on("afterlayout", function(){this.appLoaded();}, this, {single:true});
49
+ // this.on("resize", function(){alert('show');this.appLoaded();}, this, {single:true});
50
+
51
+ // Initialize menus (upcoming support for dynamically loaded menus)
52
+ this.menus = {};
53
+
54
+ Ext.History.on('change', this.processHistory, this);
55
+
56
+ // If we are given a token, load the corresponding widget, otherwise load the last loaded widget
57
+ var currentToken = Ext.History.getToken();
58
+ if (currentToken != "") {
59
+ this.processHistory(currentToken)
60
+ } else {
61
+ var lastLoaded = this.initialConfig.widgetToLoad; // passed from the server
62
+ if (lastLoaded) Ext.History.add(lastLoaded);
63
+ }
64
+
65
+ if (this.initialConfig.menu) {this.addMenu(this.initialConfig.menu, this);}
50
66
 
51
67
  // add initial menus to the tool-bar
52
68
  var toolbar = this.findById('main-toolbar');
@@ -94,27 +110,6 @@ module Netzke
94
110
  def js_extend_properties
95
111
  super.merge({
96
112
 
97
- # Initialize
98
- :app_loaded => <<-JS.l,
99
- function(){
100
- // Initialize menus (upcoming support for dynamically loaded menus)
101
- this.menus = {};
102
-
103
- Ext.History.on('change', this.processHistory, this);
104
-
105
- // If we are given a token, load the corresponding widget, otherwise load the last loaded widget
106
- var currentToken = Ext.History.getToken();
107
- if (currentToken != "") {
108
- this.processHistory(currentToken)
109
- } else {
110
- var lastLoaded = this.initialConfig.widgetToLoad; // passed from the server
111
- if (lastLoaded) Ext.History.add(lastLoaded);
112
- }
113
-
114
- if (this.initialConfig.menu) {this.addMenu(this.initialConfig.menu, this);}
115
- }
116
- JS
117
-
118
113
  :host_menu => <<-JS.l,
119
114
  function(menu, owner){
120
115
  var toolbar = this.findById('main-toolbar');
@@ -147,14 +142,6 @@ module Netzke
147
142
  }
148
143
  JS
149
144
 
150
- # Work around to fire "appLoaded" event only once
151
- :on_after_layout => <<-JS.l,
152
- function(){
153
- this.un('afterlayout', this.onAfterLayout, this); // avoid multiple calls
154
- this.appLoaded();
155
- }
156
- JS
157
-
158
145
  # Event handler for history change
159
146
  :process_history => <<-JS.l,
160
147
  function(token){
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{netzke-basepack}
5
- s.version = "0.4.1"
5
+ s.version = "0.4.2"
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"]
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.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergei Kozlov