netzke-basepack 0.3.9 → 0.3.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.3.9.1
2
+ Bug fix: (regression) appLoaded() in BasicApp gets executed again
3
+
1
4
  v0.3.9
2
5
  AccordionPanel tests added
3
6
  TabPanel works now
@@ -4,11 +4,11 @@ module Netzke
4
4
  #
5
5
  # Features:
6
6
  # * dynamic loading of widgets
7
- # * restoring of the last loaded widget (FIXME: not working for now)
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
- # * hosting widget's own menus
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
- # Call appLoaded after the application is completely visible (e.g. load the initial widget, etc)
48
- def js_after_constructor
49
- <<-JS.l
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){
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{netzke-basepack}
5
- s.version = "0.3.9"
5
+ s.version = "0.3.9.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"]
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.3.9
4
+ version: 0.3.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergei Kozlov