Skip to content

Commit

Permalink
ACAD-866 Adding in unique idenfitiers for wigets that can be multiply…
Browse files Browse the repository at this point in the history
…-instantiated in the user's homepage
  • Loading branch information
croby committed Mar 24, 2012
1 parent 797d833 commit 204b97e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Expand Up @@ -316,6 +316,8 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai) {
userid = sakai_global.profile.main.data.userid;
editing = userid && userid === sakai.data.me.user.userid;
getData( renderSection );
// add a class to the container to uniquely identify this widget
$rootel.find('#displayprofilesection_container').addClass(widgetData.sectionid);
};

init();
Expand Down
3 changes: 3 additions & 0 deletions devwidgets/inbox/javascript/inbox.js
Expand Up @@ -502,6 +502,9 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai) {
handleHashChange(null, {}, {}, all, {}, true);
$(window).bind("hashchanged.inbox.sakai", handleHashChange);
$(window).bind(tuid + ".shown.sakai", handleShown);
// Add the title key as class to the #inbox_widget div to uniquely
// identify this instance of the widget
$rootel.find('#inbox_widget').addClass(sakai.api.i18n.General.process(widgetData.title, "noop").toLowerCase());
};

init();
Expand Down

0 comments on commit 204b97e

Please sign in to comment.