Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: oaeproject/3akai-ux
base: f74cd83
...
head fork: oaeproject/3akai-ux
compare: 396ae02
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 01, 2012
Christian Vuerings christianv SAKIII-5122 - Fix render of collectionviewer 2591828
Nicolaas Matthijs Merge branch 'SAKIII-5122' of git://github.com/christianv/3akai-ux in…
…to SAKIII-5122

* 'SAKIII-5122' of git://github.com/christianv/3akai-ux:
  SAKIII-5122 - Fix render of collectionviewer
396ae02
Showing with 10 additions and 2 deletions.
  1. +10 −2 devwidgets/collectionviewer/javascript/collectionviewer.js
12 devwidgets/collectionviewer/javascript/collectionviewer.js
View
@@ -614,7 +614,11 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai) {
var doInit = function(){
collectionviewer.listStyle = $.bbq.getState(collectionviewer.tuidls) || 'carousel';
collectionviewer.sortOrder = $.bbq.getState(collectionviewer.tuidso) || 'modified';
- collectionviewer.contextId = widgetData.data._path || widgetData.collectionviewer.groupid;
+ if (widgetData.data && widgetData.data._path) {
+ collectionviewer.contextId = widgetData.data._path;
+ } else {
+ collectionviewer.contextId = widgetData.collectionviewer.groupid
+ }
if(sakai.api.Content.Collections.canCurrentUserManageCollection(collectionviewer.contextId)){
$('#collectionviewer_header_container #collectionviewer_add_content_button', $rootel).show();
$('#collectionviewer_header_container #collectionviewer_edit_collection_button', $rootel).show();
@@ -625,7 +629,11 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai) {
$('#collectionviewer_sortby', $rootel).val(collectionviewer.sortOrder);
if (sakai_global && sakai_global.content_profile && sakai_global.content_profile.content_data) {
- collectionviewer.collectionName = widgetData.data["sakai:pooled-content-file-name"] || sakai_global.content_profile.content_data.data["sakai:pooled-content-file-name"];
+ if (widgetData.data && widgetData.data['sakai:pooled-content-file-name']) {
+ collectionviewer.collectionName = widgetData.data['sakai:pooled-content-file-name'];
+ } else {
+ collectionviewer.collectionName = sakai_global.content_profile.content_data.data['sakai:pooled-content-file-name'];
+ }
switchListView();
addBinding();
// Retrieve the name of the collection as we're not in a content profile page

No commit comments for this range

Something went wrong with that request. Please try again.