netzke-basepack 0.3.9 → 0.3.9.1
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 +3 -0
- data/lib/netzke/basic_app.rb +13 -7
- data/netzke-basepack.gemspec +1 -1
- metadata +1 -1
data/CHANGELOG
CHANGED
data/lib/netzke/basic_app.rb
CHANGED
@@ -4,11 +4,11 @@ module Netzke
|
|
4
4
|
#
|
5
5
|
# Features:
|
6
6
|
# * dynamic loading of widgets
|
7
|
-
# * restoring of the last loaded widget (
|
7
|
+
# * restoring of the last loaded widget (not working for now)
|
8
8
|
# * authentification support
|
9
9
|
# * browser history support (press the "Back"-button to go to the previously loaded widget)
|
10
10
|
# * FeedbackGhost-powered feedback
|
11
|
-
# *
|
11
|
+
# * aggregation of widget's own menus
|
12
12
|
#
|
13
13
|
class BasicApp < Base
|
14
14
|
interface :app_get_widget # to dynamically load the widgets that are defined in initial_late_aggregatees
|
@@ -44,11 +44,9 @@ module Netzke
|
|
44
44
|
})
|
45
45
|
end
|
46
46
|
|
47
|
-
#
|
48
|
-
def
|
49
|
-
|
50
|
-
this.on("afterlayout", function(){this.appLoaded();}, this, {single:true});
|
51
|
-
JS
|
47
|
+
# Set the event to do some things after the application is completely visible (e.g. to load the initial widget)
|
48
|
+
def js_listeners
|
49
|
+
{:afterlayout => {:fn => "this.onAfterLayout".l, :scope => this}}
|
52
50
|
end
|
53
51
|
|
54
52
|
# Set the Logout button if Netzke::Base.user is set
|
@@ -142,6 +140,14 @@ module Netzke
|
|
142
140
|
}
|
143
141
|
JS
|
144
142
|
|
143
|
+
# Work around to fire "appLoaded" event only once
|
144
|
+
:on_after_layout => <<-JS.l,
|
145
|
+
function(){
|
146
|
+
this.un('afterlayout', this.onAfterLayout, this); // avoid multiple calls
|
147
|
+
this.appLoaded();
|
148
|
+
}
|
149
|
+
JS
|
150
|
+
|
145
151
|
# Event handler for history change
|
146
152
|
:process_history => <<-JS.l,
|
147
153
|
function(token){
|
data/netzke-basepack.gemspec
CHANGED