edifice 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -125,7 +125,9 @@ jQuery.noConflict();
125
125
  });
126
126
  }
127
127
 
128
- //when the dom is ready
128
+ // when the dom is ready
129
+ // - tell the page that it's ready
130
+ // - then tell the page that widgets have loaded
129
131
  $(document).ready(function() {
130
132
  page_level_hookup('onReady');
131
133
  $('body').attach_widgets().attach_traits();
@@ -133,22 +135,25 @@ jQuery.noConflict();
133
135
  $(document).trigger('widgetsReady');
134
136
  });
135
137
 
136
- //when the page is fully loaded (all frames, images, etc)
138
+ // when the page is fully loaded (all frames, images, etc)
137
139
  $(window).load(function() {
138
140
  page_level_hookup('onLoad');
139
141
  });
140
142
 
141
- //after every ajax request
143
+ // after every ajax request
144
+ // - treat the ajax'ed page as if it's loaded normally
145
+ // - tell the original page that some ajax has happened
146
+ // - tell both pages that new widgets may have loaded
142
147
  $(function() {
143
148
  $('body').ajaxComplete(function(event, request) {
144
- ajax_hookup('onAjaxComplete', request);
149
+ ajax_hookup('onReady', request);
145
150
  page_level_hookup('onAjaxComplete');
146
151
  $('body').attach_widgets().attach_traits();
147
152
  ajax_hookup('onWidgetsReady', request);
148
153
  page_level_hookup('onWidgetsReady');
149
154
  $(document).trigger('widgetsReady');
150
- });
151
-
155
+ });
156
+
152
157
  // special code for dealing with pjax requests
153
158
  $('body').bind('pjax:end', function(event, request) {
154
159
  // we need to update any body classes based on the request headers
@@ -1,3 +1,3 @@
1
1
  module Edifice
2
- VERSION = "0.9.0"
2
+ VERSION = "0.10.0"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edifice
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 9
8
+ - 10
9
9
  - 0
10
- version: 0.9.0
10
+ version: 0.10.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tom Coleman
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-10-14 00:00:00 Z
20
+ date: 2011-11-08 00:00:00 Z
21
21
  dependencies: []
22
22
 
23
23
  description: The idea here is to communicate which view is rendering to the javascript so that we can call the correct javascript files in an automagical way.