Skip to content

Commit

Permalink
Merge pull request #87 from croby/ACAD-1002
Browse files Browse the repository at this point in the history
ACAD-1002 Fix parsing of returned objects in lhnavigation
  • Loading branch information
lancespeelmon committed Apr 30, 2012
2 parents 68c4854 + fe5732a commit 142b4ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
8 changes: 1 addition & 7 deletions devwidgets/embedcontent/javascript/embedcontent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
7 changes: 4 additions & 3 deletions devwidgets/lhnavigation/javascript/lhnavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 142b4ec

Please sign in to comment.