[jopensocial commit] r29 - trunk/src

0 views
Skip to first unread message

codesite...@google.com

unread,
Jan 27, 2009, 12:33:09 AM1/27/09
to jopen...@googlegroups.com
Author: atsn.ngs
Date: Mon Jan 26 21:32:09 2009
New Revision: 29

Modified:
trunk/src/jopensocial.js

Log:
if opensocial namespace not defined,throw Error

Modified: trunk/src/jopensocial.js
==============================================================================
--- trunk/src/jopensocial.js (original)
+++ trunk/src/jopensocial.js Mon Jan 26 21:32:09 2009
@@ -18,9 +18,10 @@
* @name jQuery.gadgets */

;(function(){
+if(!window.opensocial) throw new Error("opensocial-v0.* feature is
required.");
+if(!window.gadgets.views) throw new Error("views feature is required.");
try {
var $ = jQuery; $();
- if(!window.opensocial) throw new Error("opensocial-v0.* feature is
required.");
var domain = opensocial.getEnvironment().getDomain();
} catch(e) { return; }

@@ -133,6 +134,7 @@
*/

function gadgetHeight(opt_height) {
+ if(!window.gadgets.window||!window.gadgets.window.adjustHeight) throw new
Error("dynamic-height feature is required.");
if(opt_height)
gadgets.window.adjustHeight(opt_height=="auto"?null:opt_height);
return gadgets.window.getViewportDimensions().height;
}

Reply all
Reply to author
Forward
0 new messages