Hi Stanton,

 

Thanks. We appear to have found the issue, details as follows:-

 

I made experiments with the gadget's copy source code to help myself
localize the problem and found it is not related to the function which
adjusts height (it works correctly). The problem is with localization XML
files and function getString() which obtains gadget settings from
localization XML files. Localization XML files for this gadget have line
breaks after opening tag and before closing tag like this:

 

<msg name="date_format_pref" desc="Label for choosing the date format">

Date format:

</msg>

 

There's a place when function getString() takes parameter from XML file with
these line breaks included and passes such broken string to another function
which throws error and script stops working before triggering auto-adjust
function. When I minimized XML file and got rid of these line breaks
everything started to work correctly. You can check here (you will probably
need to refresh pages):

 

http://beta.blueg.com/test/personal.htm

 

Obviously Google's gadget library and Shindig library have slightly
different implementations of getString() function so that the gadget works
on iGoogle and doesn't work on other sites without adding the above fix. Is
there any workaround you think we can make to the Shindig handling code,
rather than having to edit the gadget itself?

 

Kind regards,

 

Darren

 

 

From: Stanton Sievers [mailto:siever...@gmail.com] 
Sent: 03 October 2013 00:28
To: us...@shindig.apache.org; db...@globalcad.com
Cc: dev@shindig.apache.org
Subject: Re: Auto-Adjust Feature Problem

 

Hi Darren,

Although the gadget is requiring the "dynamic-height" feature, which is what
a gadget developer would use to do this, the Google Date & Time gadget
appears to be using some old means to call adjust height.  Look for
"_IG_AdjustIFrameHeight" in the gadget and I believe that is the gadget's
attempt to adjust the iframe height using the "dynamic-height" feature.

A more modern gadget would require the "dynamic-height" feature and use the
"gadgets.window.adjustHeight()" API to adjust its height.  Better yet, it
would use the "open-views" feature to open the settings in a new dialog,
instead of using UI that is contained within the gadget iframe.

If you really wanted to get this working there are some hacks you could try,
such as defining "_IG_AdjustIFrameHeight" to be the
"gadgets.window.adjustHeight" function, but I'm not sure how far that would
really get you.

-Stanton

 

Reply via email to