Skip to content

Commit

Permalink
Portlets - tweak Camp Plan images, show to library staff
Browse files Browse the repository at this point in the history
  • Loading branch information
phette23 committed Aug 10, 2015
1 parent ff0ce40 commit 4e3b9c7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Portlets/Home Page Gallery.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ load the following JS files:
@TODO compile both of these sets into a single file to save HTTP requests
see Web Assets collection to find these -->
<#if ! user.hasRole('ROLE_SYSTEM_ADMINISTRATOR')>
<#if ! user.hasRole('ROLE_SYSTEM_ADMINISTRATOR') && ! user.hasRole('089686f9-0d18-1d48-6db4-9deba144af59')>

<#-- easiest just to load this conditionally here
if we load via portlet settings, it fires twice for System Administrators -->
Expand Down
5 changes: 3 additions & 2 deletions Portlets/student work.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ set of options (reverse, modified, name, rating instead of their enum integers)
<#assign count = 0>
<#list results as item>
<#-- CP items tend to have wider thumbnails for whatever reason
so we insert fewer results from their search -->
<#if count = 12>
so student-work-home.js sets their height to 3/4ths (67.5px) others
thus here we insert more results from the search -->
<#if count = 28>
<#break>
</#if>
<#-- item information -->
Expand Down
11 changes: 7 additions & 4 deletions Portlets/student-work-home.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ var handleTabClick = function (event) {
var timers = []

var showImages = function ($wrapper) {
var height = 100
var id = $wrapper.attr('id')
var height = (id == 'campusPlanning' ? 67.5 : 90)
var captions = (id == 'campusPlanning' ? false : true)

// clear existing timers
$.each(timers, function(index, timer) {
Expand All @@ -35,9 +37,10 @@ var showImages = function ($wrapper) {
// justified gallery
// dox: miromannino.github.io/Justified-Gallery/options-and-events/
$wrapper.justifiedGallery({
lastRow: 'hide',
randomize: true,
rowHeight: height
'captions': captions,
'lastRow': 'hide',
'randomize': true,
'rowHeight': height
})
// when layout's complete, fade in each image
// each one has a 200s longer interval than the last
Expand Down

0 comments on commit 4e3b9c7

Please sign in to comment.