Author: ivol37 at gmail.com
Date: Fri Dec 24 09:58:49 2010
New Revision: 544
Log:
[AMDATU-83] Fixed by overriding the 'set_title' method. The regular
gadgets.window.setTitle method sets the title in the original titlebar. The
dashboard plugin however hides this and uses its own custom titlebar. By
overriding the set_title, the title is now set to the proper div.
Modified:
trunk/amdatu-opensocial/dashboard/src/main/resources/static/js/dashboard.js
Modified:
trunk/amdatu-opensocial/dashboard/src/main/resources/static/js/dashboard.js
==============================================================================
--- trunk/amdatu-opensocial/dashboard/src/main/resources/static/js/dashboard.js
(original)
+++ trunk/amdatu-opensocial/dashboard/src/main/resources/static/js/dashboard.js
Fri Dec 24 09:58:49 2010
@@ -106,6 +106,15 @@
{serviceName: widget.id, specUrl: metadata.gadgeturl, width:
"100%", secureToken: metadata.securetoken, cssClassGadgetContent:""});
shindig.container.addGadget(gadget);
shindig.container.renderGadget(gadget);
+
+ // Override the RPC call set_title to set the title in our custom
titlebar
+ // instead of the hidden none
+ gadgets.rpc.register('set_title', function(newTitle) {
+ var iframe = $(document.getElementById(this.f));
+ var parent = iframe.parent().parent().parent();
+ var titlebar = parent.find('.widgettitle');
+ titlebar.html(newTitle);
+ });
};
};