summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Chatzimichos <tampakrap@gentoo.org>2013-08-01 08:53:46 +0200
committerTheo Chatzimichos <tampakrap@gentoo.org>2013-08-01 08:53:46 +0200
commitc65f25a29edb6d47fa7d99a69c274f906b61adea (patch)
tree3f85de9f4159f72bb555310a6e4e5da75276a7ff /plugins/jetpack/_inc/jquery.jetpack-resize.js
parentbump kde-graffiti (diff)
downloadblogs-gentoo-c65f25a29edb6d47fa7d99a69c274f906b61adea.tar.gz
blogs-gentoo-c65f25a29edb6d47fa7d99a69c274f906b61adea.tar.bz2
blogs-gentoo-c65f25a29edb6d47fa7d99a69c274f906b61adea.zip
Update jetpack, akismet and wordpress-importer
Diffstat (limited to 'plugins/jetpack/_inc/jquery.jetpack-resize.js')
-rw-r--r--plugins/jetpack/_inc/jquery.jetpack-resize.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/plugins/jetpack/_inc/jquery.jetpack-resize.js b/plugins/jetpack/_inc/jquery.jetpack-resize.js
index e1adb22d..1c3cc87c 100644
--- a/plugins/jetpack/_inc/jquery.jetpack-resize.js
+++ b/plugins/jetpack/_inc/jquery.jetpack-resize.js
@@ -60,7 +60,7 @@
if ( 'undefined' === typeof $.fn.Jetpack ) {
/**
* Dispatches calls to the correct namespace
- *
+ *
* @param string namespace
* @param ...
* @return mixed|jQuery (chainable)
@@ -81,7 +81,7 @@
/**
* Defines the Jetpack.resizeable() namespace.
* See below for non-trivial definition for browsers with postMessage.
- */
+ */
resizeable: function() {
$.error( 'Browser does not support window.postMessage' );
}
@@ -122,7 +122,7 @@
// Some browsers send structured data, some send JSON strings
if ( 'object' === typeof event.data ) {
- data = event.data;
+ data = event.data.data;
} else {
try {
data = JSON.parse( event.data );
@@ -131,10 +131,13 @@
}
}
- if ( !data ) {
+ if ( !data.data ) {
return;
}
+ // Un-nest
+ data = data.data;
+
// Is it a resize event?
if ( 'undefined' === typeof data.action || 'resize' !== data.action ) {
return;
@@ -242,6 +245,10 @@
if ( 0 !== value ) {
target[variable]( value );
+ var container = target.parent();
+ if ( container.hasClass( 'slim-likes-widget' ) ) {
+ container[variable]( value );
+ }
}
} );
@@ -269,7 +276,7 @@
return methods.on.apply( this );
} else {
$.error( 'Method ' + method + ' does not exist on Jetpack.resizeable' );
- }
+ }
}
} );
})(jQuery);