Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.0.0
-
None
-
None
Description
This can be reproduced very easily. Try the sample container, pointing to the Pixies Lab TODO list.
(http://localhost:8080/samplecontainer/samplecontainer.html with "Displaying gadget" = http://www.labpixies.com/campaigns/todo/todo.xml)
Then, with Firebug open, simply add a new TODO item.
You will see a JS error in the following code from shindig-container.js (from the shindig-container feature).
It happens on the line "this.userPrefs[...] = ... (see code below).
The GadgetService doesn't have a userPrefs member. Instead, it should be calling the function on the gadget.
shindig.IfrGadgetService.prototype.setUserPref = function(editToken, name,
value) {
var id = shindig.container.gadgetService.getGadgetIdFromModuleId(this.f);
var gadget = shindig.container.getGadget(id);
for (var i = 1, j = arguments.length; i < j; i += 2)
gadget.saveUserPrefs();
};
Changing the line inside the loop to this fixes the problem:
gadget.userPrefs[arguments[i]].value = arguments[i + 1];