We've recently updated our documentation to include some exciting new features that we're proud to announce. We've added new content and updated some important sections to help you create even more powerful and innovative gadgets.
Here's a brief outline of new additions and changes: + Tabs library + Drag library + Core vs. feature-specific JavaScript libraries + Using JavaScript libraries in url-type gadgets + New feature: Gadget Scratch Pad + Updated developer forum link
=======================================
++ Tabs library There are many advantages of using tabs within your gadget, but implementation can sometimes be non-trivial. Our tabs library provides a simple and flexible way of generating tabs so you can organize and pack in more data into a single gadget. See a live example at http://www.google.com/ig/modules/feeds_tabs.xml.
Have you ever wanted to enable drag-n-drop functionality within your gadgets? Now you can by using our drag library. We provide you with an easy and intuitive way to enable drag-n-drop functionality within your gadgets. It exposes simple methods to add/remove drag sources and targets along with useful callback functions to detect drag events. See an example at http://doc.examples.googlepages.com/drag-special-effects.xml.
We've separated the classification of our libraries into two types, core and feature-specific. The core library includes the default list of methods that are available to all gadgets. These include: _IG_Prefs(), _IG_FetchContent(), _gel(), _args(), etc.
On the other hand, feature-specific libraries are optionally loaded for each <Require feature="..."/> declaration in your gadget XML inside <ModulePrefs>. The available feature-specific libraries are:
++ Using JavaScript libraries in type="url" gadgets
It used to be the case that our JavaScript libraries were not accessible to type="url" gadgets. Not any more. Our JavaScript libraries provide extended functionality to help developers create innovative gadgets. So we've exposed a way to import them into your content source, enabling access to both core and feature-specific libraries such as _IG_FetchContent(), _IG_AdjustIFrameHeight(), _IG_Tabs(), etc. To utilize this feature, your content source requires some form of server-side scripting such as PHP, CGI, ASP, etc. See the documentation for how this is done.
We thought it would be pretty cool to have an editable scratch pad where you can directly edit the gadget XML and see the changes instantaneously. Check out version 1 of our very own gadget scratch pad. The preview of the gadget is rendered in syndication form. So the same limitations as well as others are in effect which includes: - no saving userprefs - does not obey width and height parameters within <ModulePrefs> - userpref values are static and must be set using default_value
Many of you have already noticed that the Google Gadgets API discussion group has moved to a different location. Please remember to update your bookmarks and feeds to the new location at:
That's lots of new stuff to play with isn't it? Still a couple of things I think we'd all like to see, things like being able to pin a gadget across all tabs e.g. the logo changer.
The thing that's fascinating me the most is the Google obsession with Labradors... in all the gadgets documentation there are these dogs in every image.. so what's the deal and who's the Labrador fan over there?
On Nov 1, 11:11 pm, "Dann (Google Employee)" <d...@google.com> wrote:
> We've recently updated our documentation to include some exciting new > features that we're proud to announce. We've added new content and > updated some important sections to help you create even more powerful > and innovative gadgets.
> Here's a brief outline of new additions and changes: > + Tabs library > + Drag library > + Core vs. feature-specific JavaScript libraries > + Using JavaScript libraries in url-type gadgets > + New feature: Gadget Scratch Pad > + Updated developer forum link
> =======================================
> ++ Tabs library > There are many advantages of using tabs within your gadget, but > implementation can sometimes be non-trivial. Our tabs library provides > a simple and flexible way of generating tabs so you can organize and > pack in more data into a single gadget. See a live example athttp://www.google.com/ig/modules/feeds_tabs.xml.
> Have you ever wanted to enable drag-n-drop functionality within your > gadgets? Now you can by using our drag library. We provide you with > an easy and intuitive way to enable drag-n-drop functionality within > your gadgets. It exposes simple methods to add/remove drag sources and > targets along with useful callback functions to detect drag events. > See an example athttp://doc.examples.googlepages.com/drag-special-effects.xml.
> ++ Core vs. feature-specific JavaScript libraries
> We've separated the classification of our libraries into two types, > core and feature-specific. The core library includes the default list > of methods that are available to all gadgets. These include: > _IG_Prefs(), _IG_FetchContent(), _gel(), _args(), etc.
> On the other hand, feature-specific libraries are optionally loaded for > each <Require feature="..."/> declaration in your gadget XML inside > <ModulePrefs>. The available feature-specific libraries are:
> ++ Using JavaScript libraries in type="url" gadgets
> It used to be the case that our JavaScript libraries were not > accessible to type="url" gadgets. Not any more. Our JavaScript > libraries provide extended functionality to help developers create > innovative gadgets. So we've exposed a way to import them into your > content source, enabling access to both core and feature-specific > libraries such as _IG_FetchContent(), _IG_AdjustIFrameHeight(), > _IG_Tabs(), etc. To utilize this feature, your content source requires > some form of server-side scripting such as PHP, CGI, ASP, etc. See the > documentation for how this is done.
> We thought it would be pretty cool to have an editable scratch pad > where you can directly edit the gadget XML and see the changes > instantaneously. Check out version 1 of our very own gadget scratch > pad. The preview of the gadget is rendered in syndication form. So > the same limitations as well as others are in effect which includes: > - no saving userprefs > - does not obey width and height parameters within <ModulePrefs> > - userpref values are static and must be set using default_value
> Many of you have already noticed that the Google Gadgets API discussion > group has moved to a different location. Please remember to update > your bookmarks and feeds to the new location at:
> The thing that's fascinating me the most is the Google obsession with > Labradors... in all the gadgets documentation there are these dogs in > every image.. so what's the deal and who's the Labrador fan over there?
I don't really think of myself as a "fan." More like "personal servant." The dogs like to help with the documentation, and sometimes they add pictures of themselves before I can stop them. They're also responsible for the heavy emphasis on food in the examples.
It's not just a "lab obsession." We love all breeds, and kitties too!
> I don't really think of myself as a "fan." More like "personal > servant." The dogs like to help with the documentation, and sometimes > they add pictures of themselves before I can stop them. They're also > responsible for the heavy emphasis on food in the examples.
> That's lots of new stuff to play with isn't it? Still a couple of > things I think we'd all like to see, things like being able to pin a > gadget across all tabs e.g. the logo changer. > Thanks so much for the post Dann! 8)
The API is constantly evolving, and we're always happy to introduce new features and additional functionality. Keep them gadgets coming! Bonstio, pinning a gadget across multiple tabs does sound like an interesting feature request. I'll definitely make a note of it.
Thanks for your feedback!
Dann
P.S. Rowan is a superstar.
On Nov 2, 2:03 pm, "Bonstio" <bons...@gmail.com> wrote:
> > I don't really think of myself as a "fan." More like "personal > > servant." The dogs like to help with the documentation, and sometimes > > they add pictures of themselves before I can stop them. They're also > > responsible for the heavy emphasis on food in the examples.Laugh out loud!!! :-)
The gadget I'm currently working on is one which scrapes the contact pane out of a users GMail account. It's far from finished yet but there's seems to be a strong demand for a module offering this functionality. However, I am expecting to be scuppered at any moment... everyday I expect Google to release GTalk gadget which would be great but would also render mine useless... please tell me that's not going to happen!
> interesting feature request. I'll definitely make a note of it.
I typically use a tabbed interface for displaying search results that span multiple sources or categories, and I usually modify code I've used on several web apps to do this. However my code's a bit clunky still, so I was happy to see the addition of an easy to use tabs library. However, I found several limitations when trying to use it to do what I wanted. Here are the functions I think should be added: 1) Remove tab 2) Rename tab (if you have remove, rename may not be needed) 3) Specify div to place tabs -- so that entire gadget isn't encompassed by the tabs
If there is some way of removing or renaming tabs that I missed, please let me know. I managed to still use the tabs for the gadget, and it did save a bit of space, but I wasn't able to use them to what I'd feel their full potential could have been.
Also, drag and drop library looks realllly fun. Can't wait to come up with an excuse to play with that.
Also, unrelated note-- since there's a shortcut for document.getElementById, can we get a shortcut for document.createElement (e.g. cel("DIV"))? Just looks awkward for the shortcut _gel to be next to doc.createElement.
Anyway, thanks for the API, it certainly does make gadgeting a fun&fast process!
pamela....@gmail.com wrote: > Here are the functions I think should be added: > 1) Remove tab > 2) Rename tab (if you have remove, rename may not be needed) > 3) Specify div to place tabs -- so that entire gadget isn't encompassed > by the tabs
Agreed on all three. I would also love the ability to: 1) Use HTML in the tab titles and not just plain text. 2) Tooltips for tabs 3) Pass arbitrary CSS to an individual tab -- most notably so we can control the width of each tab. Or inversely, assign IDs to the individual TD tags that make up the tabs. Then we could edit the styles ourselves.
For now, I think I will implement 1 and 2 for myself. A quick look at their code and it doesn't seem like it will be too hard.
> If there is some way of removing or renaming tabs that I missed, please > let me know.
Nope. From what I can tell, you can't do that even with unofficial javascript calls.
> Also, unrelated note-- since there's a shortcut for > document.getElementById, can we get a shortcut for > document.createElement (e.g. cel("DIV"))? Just looks awkward for the > shortcut _gel to be next to doc.createElement.
function _cel(tagName) { return document.createElement ? document.createElement(tagName) : null; }
Thanks, I suppose I could just stick that _cel function in myself. :) Every single JS library seems to have their own "easy-to-remember" shortcut for those functions.
Yeah, good point on the width CSS. The custom tabs I coded for a previous gadget used different widths due to using (logos) images for the tab, which was useful. Image tabs just get into more problems with resizing for small monitors than text tabs.
I just want to let everyone know that we hear and appreciate all your comments and feedback. Please continue to do so because we value your opinions. Although there is no guarantee that we can implement requested features, it certainly helps us consider what key features to include in future versions.
Thanks everyone!
Dann
On Nov 7, 12:52 pm, "pamela....@gmail.com" <pamela....@gmail.com> wrote:
> Thanks, I suppose I could just stick that _cel function in myself. :) > Every single JS library seems to have their own "easy-to-remember" > shortcut for those functions.
> Yeah, good point on the width CSS. The custom tabs I coded for a > previous gadget use