./test/dummy/tmp/cache/assets/D37/2B0/sprockets%2F40834fb07d7318c1fddd5003bd9e04f6 in umlaut-3.0.5 vs ./test/dummy/tmp/cache/assets/D37/2B0/sprockets%2F40834fb07d7318c1fddd5003bd9e04f6 in umlaut-3.1.0.pre1
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1333394214.4877481:@value"å{I"
-class:EFI"ProcessedAsset; FI"logical_path; F"umlaut/update_html.jsI"
pathname; F"G/home/rochkind/umlaut/app/assets/javascripts/umlaut/update_html.jsI"content_type; FI"application/javascript; FI"
-mtime; FI"2012-03-29T15:10:02-04:00; FI"length; FiI"digest; F"%375d247cf81a4c0ceacc4306dee19ba5I"source; FI"/* update_html.js: Provide functions to update content on page with background responses from Umlaut. Used by Umlaut itself, as well as by third party callers.*/
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1364837296.954976:@value" {I"
+class:EFI"ProcessedAsset; FI"logical_path; FI"umlaut/update_html.js; TI"
pathname; FI"G/home/rochkind/umlaut/app/assets/javascripts/umlaut/update_html.js; TI"content_type; FI"application/javascript; FI"
+mtime; FI"2012-06-19T10:06:09-04:00; FI"length; FiI"digest; F"%9829b9ec1fe860fe2c9b5b4219bcefccI"source; FI"/* update_html.js: Provide functions to update content on page with background responses from Umlaut. Used by Umlaut itself, as well as by third party callers.*/
(function($) {
function SectionTarget(config) {
//Add properties from config to ourself
@@ -59,12 +59,15 @@
this.add_section_target = function(config) {
this.section_targets.push( new SectionTarget(config) );
};
//default no-op call-backs
- this.complete = function() {};
+ this.complete = noop;
+ this.before_update = noop;
+ this.after_update = noop;
+
//Code for seeing if a URI is same origin or not borrowed from jQuery
this.is_remote_url = function(url) {
var regexp = /^(\w+:)?\/\/([^\/?#]+)/;
var parts = regexp.exec( url );
return (parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host));
@@ -99,19 +102,23 @@
var new_element = $('<div class="umlaut" style="display:none" class="' + section_target.umlaut_section_id +'"></div>');
new_element.html(umlaut_html_section.html_content);
var should_continue = section_target.before_update(new_element, count, section_target);
+ if (should_continue != false) {
+ should_continue = myself.before_update(new_element, count, section_target);
+ }
if (should_continue != false) {
existing_element.replaceWith(new_element);
section_target.host_div_element = new_element;
new_element.show();
- section_target.after_update(new_element, count, section_target)
+ section_target.after_update(new_element, count, section_target);
+ myself.after_update(new_element, count, section_target);
}
}
//Do we need to update again?
@@ -164,15 +171,16 @@
window.Umlaut.Loader = function() {
this.load = function(option_list) {
// log problem in browsers that support it.
if (typeof console != "undefined" && typeof console.log != "undefined") {
- console.log("WARN: Umlaut.Loader no longer supported in Umlaut 3.x, you have not loaded Umlaut JS Behaviors. See Umlaut documentation for new way.");
+ console.log("WARN: Umlaut.Loader no longer supported in Umlaut 3.x, you may have not loaded Umlaut JS Behaviors as desired. See Umlaut documentation for new way.");
+
}
}
}
})(jQuery);
-; FI"dependency_digest; F"%4b5c07f5a148d1e4d035d9abed23bb16I"required_paths; F["G/home/rochkind/umlaut/app/assets/javascripts/umlaut/update_html.jsI"dependency_paths; F[{I" path; F"G/home/rochkind/umlaut/app/assets/javascripts/umlaut/update_html.jsI"
-mtime; FI"2012-03-29T15:10:02-04:00; FI"digest; F"%0e20d53d7fde96515ed65cd8adf30640I"
_version; F"%aa7d0db7619379e13b08335dee027df2
+; FI"dependency_digest; F"%abfa8a9fde65130f2baaf9ca2dc9d70dI"required_paths; F[I"G/home/rochkind/umlaut/app/assets/javascripts/umlaut/update_html.js; TI"dependency_paths; F[{I" path; FI"G/home/rochkind/umlaut/app/assets/javascripts/umlaut/update_html.js; TI"
+mtime; FI"2012-06-19T10:06:09-04:00; FI"digest; F"%eaef648c4bda34e414d2b7abd1f90cf5I"
_version; F"%6776f581a4329e299531e1d52aa59832
\ No newline at end of file