Skip to content
Browse files

Merge pull request #87 from croby/ACAD-1002

ACAD-1002 Fix parsing of returned objects in lhnavigation
  • Loading branch information...
2 parents 68c4854 + fe5732a commit 142b4ec5432d159af93cf04b53ce358a44d3bbb0 @lancespeelmon lancespeelmon committed Apr 30, 2012
View
8 devwidgets/embedcontent/javascript/embedcontent.js
@@ -458,15 +458,9 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai) {
var processWidgetData = function(success, data, callback){
if (success) {
-
+ wData = data;
firstLoad = false;
newItems = [];
- if (!(data.items instanceof Array)) {
- sakai.api.Server.convertObjectToArray(data.items, data, "items");
- }
-
- wData = data;
-
// get the item profile data
for (var i = 0, j = data.items.length; i < j; i++) {
if (processWidget(data.items[i], data.items)) {
View
7 devwidgets/lhnavigation/javascript/lhnavigation.js
@@ -188,14 +188,15 @@ require(["jquery", "sakai/sakai.api.core", "jquery-ui"], function($, sakai) {
dataType: "json",
async: false,
success: function(data) {
- infinitystructurespulled.push(ref);
+ infinitystructurespulled.push(ref);
+ data = sakai.api.Server.convertObjectToArray(data, null, null);
for (var page in data){
if (page.substring(0,9) !== "structure" && page.substring(0,1) !== "_"){
pubstructure.pages[toplevelref + "-" + page] = data[page];
}
- }
+ }
}
- })
+ });
}
if (privstructure.pages[ref]) {
return privstructure.pages[ref];

0 comments on commit 142b4ec

Please sign in to comment.
Something went wrong with that request. Please try again.