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 +5 -0
- data/lib/netzke/basic_app.rb +17 -30
- data/netzke-basepack.gemspec +1 -1
- metadata +1 -1
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
|
data/lib/netzke/basic_app.rb
CHANGED
@@ -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("
|
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){
|
data/netzke-basepack.gemspec
CHANGED