*/
public function toHtml(Toolkit_Members_ProfilePage $profile)
{
- $GLOBALS['bottomScripts'][]
- = MEDIA_APP_BASE_URL . 'gallery/thickbox-3.1.1.js';
+ //$GLOBALS['bottomScripts'][]
+ //= MEDIA_APP_BASE_URL . 'gallery/thickbox-3.1.1.js';
$GLOBALS['bottomScripts'][]
= MEDIA_BASE_URL . 'Toolkit/Members/libjs/business-detail.js';
$GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'Toolkit/Members/css/member.css';
- $GLOBALS['styleSheets'][] = MEDIA_APP_BASE_URL . 'gallery/gallery.css';
- $GLOBALS['styleSheets'][] = MEDIA_APP_BASE_URL . 'gallery/thickbox.css';
+ //$GLOBALS['styleSheets'][] = MEDIA_APP_BASE_URL . 'gallery/gallery.css';
+ //$GLOBALS['styleSheets'][] = MEDIA_APP_BASE_URL . 'gallery/thickbox.css';
+ $GLOBALS['styleSheets'][] = BASE_URL . 'photoswipe/photoswipe.css';
+ $GLOBALS['bottomScripts'][] = BASE_URL . 'photoswipe/lib/klass.min.js';
+ $GLOBALS['bottomScripts'][] = BASE_URL . 'photoswipe/code.photoswipe.jquery-3.0.5.js';
+ $GLOBALS['bottomScripts'][] = BASE_URL . 'js/photoGallery.js';
$profileCache = "Member-{$profile->getMemberId()}";
$out = $this->_cache->get($profileCache, 'Profile');
<div flexy:foreach="recordSet,k,row" class="search-result-item vcard small-12 columns">
- <div class="memberSR">
+
+ <h2 class="fn org text-left"><a title="More Info" href="{row[url]:h}">{row[member_name]:h}</a></h2>
+ <div class="memberSR right">
{if:row[addToLink]}
<a id="add-{row[member_id]}" class="list-add-link" rel="{row[member_id]}" flexy:if="row[plink]" title="Add to Your Travel List" href="{row[plink]:h}">
<img alt="Add to Your Travel List" src="baseurl/assets/addto.gif">
<img class="search-result-img" alt="{row[logo]}" src="{row[logo]}">
{end:}
</div><!-- /.memberSR -->
-
- <h2 class="fn org text-left"><a title="More Info" href="{row[url]:h}">{row[member_name]:h}</a></h2>
<div class="search-result-item-info">
{if:row[map_icon]}
<div class="map-link right" rel="{row[map_icon][id]}">
</div>
{getPaging():h}
-<div flexy:if="letters" class="business-first-letter">
+<div flexy:if="letters" class="business-first-letter small-12 columns">
<div>Narrow result by letter:</div>
<a flexy:foreach="letters,k,v" class="{v[class]:h}" href="{v[url]:h}">{k}</a>
</div>
--- /dev/null
+(function(window, PhotoSwipe){
+ if ($(".photoimg").length > 0) {
+ if(document.addEventListener) {
+ document.addEventListener('DOMContentLoaded', function(){
+ var
+ options = {
+ getImageCaption: function(el){
+ var captionText, captionDesc, captionId, captionEl;
+ if (el.nodeName === "A") {
+ captionText = el.getAttribute('title');
+ captionDesc = el.getAttribute('rel');
+ captionId = el.getAttribute('data-photoid');
+ }
+ // Return a DOM element with custom styling
+ if((captionText != null && captionText != "") || (captionDesc != null && captionDesc != "")) {
+ captionEl = document.createElement('div');
+ captionEl.className = 'captionWrapper';
+ // Add Caption Title.
+ if(captionText != null && captionText != "") {
+ captionTitleOutput = document.createElement('h2');
+ captionTitleOutput.className = "captionTitleWrapper";
+ captionTitleOutput.appendChild(document.createTextNode(captionText));
+ captionEl.appendChild(captionTitleOutput);
+ }
+ // Add Caption Description.
+ if(captionDesc != null && captionDesc != "") {
+ captionDescOutput = document.createElement('p');
+ captionDescOutput.className = "captionDescWrapper";
+ captionDescOutput.appendChild(document.createTextNode(captionDesc));
+ captionEl.appendChild(captionDescOutput);
+ }
+ } else {
+ captionEl = "";
+ }
+ return captionEl;
+ }, captionAndToolbarAutoHideDelay:0, imageScaleMethod: "fitNoUpscale", captionAndToolbarFlipPosition: true, backButtonHideEnabled: true
+ },
+ instance = PhotoSwipe.attach( window.document.querySelectorAll('a.photoimg'), options );
+ }, false);
+ } else { // You are using IE8- and you should feel bad.
+ document.attachEvent('onreadystatechange', function(){
+ var
+ options = {
+ getImageCaption: function(el){
+ var captionText, captionDesc, captionId, captionEl;
+ if (el.nodeName === "A") {
+ captionText = el.getAttribute('title');
+ captionDesc = el.getAttribute('rel');
+ captionId = el.getAttribute('data-photoid');
+ }
+ // Return a DOM element with custom styling
+ if((captionText != null && captionText != "") || (captionDesc != null && captionDesc != "")) {
+ captionEl = $('<div style="display: block;width: 100%;overflow: hidden;"></div>');
+ captionEl.addClass = 'captionWrapper';
+ // Add Caption Title.
+ if(captionText != null && captionText != "") {
+ captionTitleOutput = $('<h2 style="display: block;width: 50%;float: left;font-size: 18px;font-weight: bold;color: #FFF;text-align: left;padding: 10px 20px;margin: 0;"></h2>');
+ captionTitleOutput.addClass = "captionTitleWrapper";
+ captionTitleOutput.append(captionText);
+ captionEl.append(captionTitleOutput);
+ }
+ // Add Caption Description.
+ if(captionDesc != null && captionDesc != "") {
+ captionDescOutput = $('<p style="display: block;width: 50%;float: left;clear: left;font-size: 14px;color: #FFF;text-align: left;padding: 0 20px 10px 20px;margin: 0;"></p>');
+ captionDescOutput.addClass = "captionDescWrapper";
+ captionDescOutput.append(document.createTextNode(captionDesc));
+ captionEl.append(captionDescOutput);
+ }
+ } else {
+ captionEl = "";
+ }
+ return captionEl;
+ }, captionAndToolbarAutoHideDelay:0, imageScaleMethod: "fitNoUpscale", captionAndToolbarFlipPosition: true, backButtonHideEnabled: true
+ },
+ instance = PhotoSwipe.attach( window.document.querySelectorAll('a.photoimg'), options );
+ }, false);
+ }
+ }
+}(window, window.Code.PhotoSwipe));
\ No newline at end of file