1PBUtil.module.stretchLayout = new stretchLayout({ 2 layoutType: serverVars.layoutType,//### "vertical_navigation", "horizontal_navigation" - REQUIRED 3 pageContainer: "page_boundary", //the ID of the page boundary DIV - REQUIRED 4 bodyContainer: "global_body", //the ID of the body DIV - REQUIRED 5 navContainer: "navigation_container", //the ID of the navigation container - REQUIRED 6 contentContainer: "content_area_container", //the ID of the content area container - REQUIRED 7 footerContainer: "global_footer", //the ID of the footer container - REQUIRED 8 maxWidth: 1500, //max width of the entire page - REQUIRED 9 minContentHeight: null, //if the content container needs a fixed height - OPTIONAL 10 maxContentHeight: null, //if the content container needs a fixed height - OPTIONAL 11 showLog: false 12}); 13 14PBUtil.module.eventGallery = null; 15PBUtil.createEventGallery = function(gallery_id, gallery_data, nav_type, show_gallery_navigation, show_gallery_breadcrumb, center_gallery, html_content, gallery_type, page_no, filter, menuID, templateID, colorID, minimum_rows){ 16 17 //check to see if a new type if gallery should be reloaded 18 if (PBUtil.module.eventGallery){ 19 if (PBUtil.module.eventGallery.galleryType != gallery_type || gallery_type == 'search') 20 PBUtil.garbage.unloadModule('eventGallery'); 21 } 22 23 // creating a fresh instance of the new gallery 24 if (!PBUtil.module.eventGallery){ 25 26 //insert gallery html source content 27 var container = $('eventContainer'); 28 PBUtil.loadContent(container, html_content, true); 29 container = null; 30 31 //create the gallery 32 PBUtil.module.eventGallery = new eventGallery({ 33 moduleName: 'eventGallery', 34 data: gallery_data, //the JSON events gallery data - REQUIRED 35 galleryID: gallery_id, //the initial gallery to be loaded - OPTIONAL (will load first one by default) 36 galleryType: gallery_type, //possible values are 'all', 'favorite', 'featured' - OPTIONAL 37 galleryLabels: { //Supply the appropriate value to display - OPTIONAL 38 'all': null, //keep to null if JavaScript should auto detect gallery name 39 'featured': serverVars.content['Labels.Featured'], //Label for Studio's picks 40 'favorite': serverVars.content['Labels.Favorites'] //label for favorites 41 }, 42 searchFilter: filter, //JSON array for filtering items - works in with galleryType = 'search' - OPTIONAL 43 navigationType: nav_type, //values can be 'normal' or 'dropdown' - OPTIONAL. Default is 'normal' 44 centerThumbnails: center_gallery, 45 showGalleryNavigation: show_gallery_navigation, 46 showGalleryBreadCrumb: show_gallery_breadcrumb, 47 48 onPageClick: function(gallery_id, page_no){ 49 PBUtil.log("EVENT: Page Clicked. Gallery ID: " + gallery_id + ", Page No: " + page_no); 50 }, 51 onGalleryClick: function(id, name){ 52 PBUtil.log("EVENT: Gallery Clicked. Name: " + name + ", ID: " + id); 53 }, 54 onBuyClick: function(thumbnail_id, gallery_id){ 55 PBUtil.log("EVENT: Buy clicked for IMG ID: " + thumbnail_id); 56 }, 57 onZoomClick: function(thumbnail_id, gallery_id){ 58 var ifr = $('ifr_hidden'); 59 if ($type(gallery_id) == 'number' && $type(thumbnail_id) == 'number') ifr.src = "?load=event_image_detail&loadtype=content&item="+thumbnail_id+"&page="+menuID + '&templateID=' + templateID + '&colorID=' + colorID; 60 ifr = null; 61 PBUtil.log("EVENT: Zoom clicked for IMG ID: " + thumbnail_id); 62 }, 63 onFavoriteClick: function(thumbnail_id, favorite){ 64 //var favorite is returned 1 (for marked as favorite) or 0 for (unmarked as favorite). 65 var saveFav = new Ajax('/store/?load=favorites_save&loadtype=content&item=' + thumbnail_id + '&favorite=' + favorite, {method: 'post', evalScripts: true}).request(); 66 //console.log("EVENT: Favorite clicked for IMG ID: " + thumbnail_id + ", is favorite? " + favorite); 67 }, 68 minimumRows: minimum_rows, 69 showLog: false, //whether to show console debug messages 70 serverVars: serverVars 71 }); 72 //if page no is supplied then load that page 73 if (page_no){ 74 PBUtil.module.eventGallery.showPage(page_no); 75 } 76 77 //if gallery instance is already there, load a new gallery or page for the same event 78 } else { 79 if (gallery_type == 'favorite'){ 80 PBUtil.module.eventGallery.parseData(); 81 } 82 //PBUtil.log("Load new area in existing gallery instance. Gallery ID: " + PBUtil.module.eventGallery.currentGallery.id + ", Supplied ID: " + gallery_id); 83 if (PBUtil.module.eventGallery.currentGallery.id != gallery_id) { 84 //PBUtil.log("Need to reload the gallery"); 85 PBUtil.module.eventGallery.showGallery(gallery_id); 86 if (page_no) PBUtil.module.eventGallery.showPage(page_no); 87 } else { 88 //PBUtil.log("Need to reload the gallery page only"); 89 PBUtil.module.eventGallery.showPage(page_no); 90 } 91 } 92}; 93 94PBUtil.eventGalleryShowPage = function(page_no){ 95 if (PBUtil.module.eventGallery) { 96 PBUtil.module.eventGallery.showPage(page_no); 97 } 98}; 99 100PBUtil.module.genericGallery = null; 101PBUtil.createGenericGallery = function(gallery_data, center_gallery, minimium_rows, show_dropmenu, show_meta_data, page_no, thumb_size){ 102 103 PBUtil.log("createGenericGallery function is called by iFrame"); 104 // console.log("createGenericGallery called"); 105 106 if (!minimium_rows) minimium_rows = 1; 107 108 // creating a fresh instance of the new gallery 109 if (!PBUtil.module.genericGallery){ 110 111 //create the gallery 112 PBUtil.module.genericGallery = new genericGallery({ 113 moduleName: 'genericGallery', 114 data: gallery_data, //the JSON events gallery data - REQUIRED 115 centerThumbnails: center_gallery, 116 117 disregardHeaderHeight: false, //Disregard the header height (more thumbs if true) - REQUIRED 118 disregardFooterHeight: true, //Disregard the footer height (more thumbs if true) - REQUIRED 119 extraHeightDeduction: 0, //additional height to deduct - any number 120 121 minimumRows: minimium_rows, //Minimum number of rwos to display (if available) - OPTIONAL 122 showDropmenu: show_dropmenu, //If tru, it will display the dropdown menu - REQUIRED. Default is false 123 showItemMetaData: show_meta_data, //If set to true, it will show meta data 'protected' and 'expired' - OPTIONAL. Default is false 124 thumbSize: thumb_size, 125 126 onPageClick: function(page_no){ 127 //PBUtil.log("EVENT: Page Clicked. Page No: " + page_no); 128 }, 129 onItemClick: function(item_id, item_data){ 130 //console.log("Link path: " + item_data.link_path); 131 //console.log("Link target: " + item_data.link_target); 132 // console.log(item_data); 133 if (item_data.link_target == 'hidden') { 134 var ifr = $('ifr_hidden'); 135 if (item_data.link_path != null) 136 ifr.src = item_data.link_path; // send to corresponding link in json data 137 ifr = null; 138 } 139 else if (item_data.link_target == '_blank' && item_data.link_path != '') { 140 window.open(item_data.link_path); 141 } 142 else if (item_data.link_target == 'embedded' || item_data.link_target == 'lightbox') { 143 PBUtil.module.Lightbox.open({width: item_data.width, height: item_data.height, caption: '', iframe: true, close: true, url: item_data.link_path }); 144 } 145 else if (item_data.link_path != '') { 146 eval("window.location = '" + item_data.link_path +"'"); 147 } 148 }, 149 onDropmenuClick: function(option_value){ 150 //alert(option_value) 151 }, 152 showLog: false, //whether to show console debug messages 153 serverVars: serverVars 154 }); 155 //if page no is supplied then load that page 156 if (page_no){ 157 PBUtil.module.genericGallery.showPage(page_no); 158 } 159 160 } 161 162}; 163 164PBUtil.loadGalleryPage = function(page_no){ 165 if (PBUtil.module.genericGallery && page_no){ 166 PBUtil.module.genericGallery.showPage(page_no); 167 } 168} 169 170PBUtil.module.soloImage = null; 171PBUtil.createSoloImage = function(gallery_id, gallery_data, image_id, html_content, auto_play, gallery_type, filter, watermark_display, show_gallery_breadcrumb){ 172 173// if (!PBUtil.module.soloImage){ //this condition would block gallery switches from medium view task 5553 174 175 //insert gallery html source content 176 var container = $('eventContainer'); 177 PBUtil.loadContent(container, html_content, true); 178 container = null; 179 180 if (PBUtil.module.stretchLayout.layoutType == 'horizontal_navigation'){ 181 disregardNavigationHeight = false; 182 } else { 183 disregardNavigationHeight = false; 184 } 185 186 //now initiate the module 187 PBUtil.module.soloImage = new storeSlideshow({ 188 /** the DATA **/ 189 moduleName: 'soloImage', //'soloImage' or 'slideShow' 190 data: gallery_data, //The JSON data 191 galleryID: gallery_id, //Default gallery to be loaded - OPTIONAL (will load first one by default) 192 galleryType: gallery_type, //possible values are 'all', 'favorite', 'featured' or 'search' - OPTIONAL 193 galleryLabels: { //Supply the appropriate value to display - OPTIONAL 194 'all': null, //keep to null if JavaScript should auto detect gallery name 195 'featured': serverVars.content['Labels.Featured'], //Label for Studio's picks 196 'favorite': serverVars.content['Labels.Favorites'] //label for favorites 197 }, 198 searchFilter: filter, //JSON array for filtering items - works in with galleryType = 'search' - OPTIONAL 199 startImageID: image_id, //or set the ID of the first image (ID takes precedence) 200 201 effect: true, //show fade-in / fade-out affect? 202 autoPlay: auto_play, //bool start playing once loaded? 203 showPlayPause: true, //whether to show the defaule play/pause btn over image 204 flipWithFinger: true, //If true, will flip image with finger in touch screen - OPTIONAL 205 hideWatermarkForEffect: true, //whether to hide the watermark during image fade in/out 206 displayWatermark: watermark_display, 207 showGalleryBreadCrumb: show_gallery_breadcrumb, 208 toggleToFullscreen: false, 209 210 disregardHeaderHeight: false, //Disregard the header height (bigger image if true) - REQUIRED 211 disregardNavigationHeight: disregardNavigationHeight, //### Disregard the nav height (bigger image if true) - REQUIRED 212 disregardFooterHeight: false, //Disregard the footer height (bigger image if true) - REQUIRED 213 disregardButtons: false, //Disregard the buttons/labels (bigger image if true) - REQUIRED 214 extraHeightDeduction: 0, //additional height to deduct - any number 215 216 playButtonOptions: { //for loading the slideShow module from medium view
217 url: '/store/?load=event_slideshow&autoplay=1&loadtype=content', 218 iframe_id: 'ifr_hidden' 219 }, 220 221 onFavoriteClick: function(image_id, favorite){ 222 //console.log("EVENT: Favorite clicked for IMG ID: " + image_id + ", is favorite? " + favorite); 223 var saveFav = new Ajax('/store/?load=favorites_save&loadtype=content&item=' + image_id + '&favorite=' + favorite, {method: 'post', evalScripts: true}).request(); 224 }, 225 onImageChange: function(image_id, gallery_id){ 226 //console.log("EVENT: Image is changed. IMG ID: " + image_id + ", Gallery ID " + gallery_id); 227 var saveFeatured = new Ajax('/store/?load=featured_save&loadtype=content&view=medium&item=' + image_id + '&gallery=' + gallery_id, {method: 'post'}).request(); 228 229 }, 230 231 showLog: false, //whether to show console debug messages 232 serverVars: serverVars 233 }); 234 //attach the EXTERNAL Next and Previous buttons to the module 235 PBUtil.module.soloImage.attachControl('previous', 'button_go_previous'); 236 PBUtil.module.soloImage.attachControl('next', 'button_go_next'); 237 //PBUtil.module.soloImage.attachControl('play', 'button_play', 'Play', 'Pause', 'play'); 238 //just loading a new gallery for the same event 239// } else { 240// PBUtil.module.soloImage.showGallery(gallery_id, image_id); 241// } 242}; 243 244// ** Gallery menu type **// 245PBUtil.module.pagingSlideshow = null; 246PBUtil.pagingSlideshow = function(gallery_data, image_id, html_content, paging_layout, auto_play){ 247 248 if (PBUtil.module.pagingSlideshow){ 249 PBUtil.module.pagingSlideshow.unload(); 250 } 251 //insert gallery html source content 252 /*var container = $('content_area_container'); 253 PBUtil.loadContent(container, html_content, true); 254 container = null;*/ 255 256 if (PBUtil.module.stretchLayout.layoutType == 'horizontal_navigation'){ 257 disregardNavigationHeight = false; 258 } else { 259 disregardNavigationHeight = true; 260 } 261 262 //now initiate the module 263 PBUtil.module.pagingSlideshow = new pagingSlideshow({ 264 /** the DATA **/ 265 moduleName: 'pagingSlideshow', //'soloImage' or 'slideShow' 266 data: gallery_data, //The JSON data 267 268 totalPerPage: 7, //default per page value. Can be over ridden by the data supplied 269 pagingLayout: paging_layout, //Layout type - options are 'vertical', 'horizontal', 'horizontal_wrapped' 270 271 startImageID: image_id, //or set the ID of the first image (ID takes precedence) 272 273 stopNotice: false, 274 effect: true, //show fade-in / fade-out affect? 275 autoPlay: auto_play, //bool start playing once loaded? 276 showPlayPause: true, //whether to show the defaule play/pause btn over image 277 flipWithFinger: true, //If true, will flip image with finger in touch screen - OPTIONAL 278 hideWatermarkForEffect: true, //whether to hide the watermark during image fade in/out 279 displayWatermark: false, 280 281 disregardHeaderHeight: false, //Disregard the header height (bigger image if true) - REQUIRED 282 disregardNavigationHeight: disregardNavigationHeight, //### Disregard the nav height (bigger image if true) - REQUIRED 283 disregardFooterHeight: false, //Disregard the footer height (bigger image if true) - REQUIRED 284 disregardButtons: false, //Disregard the buttons/labels (bigger image if true) - REQUIRED 285 extraHeightDeduction: 0, //additional height to deduct - any number 286 287 288 onImageChange: function(image_id, gallery_id){ 289 //place your code ... 290 this.log("EVENT: Image is changed. IMG ID: " + image_id + ", Gallery ID " + gallery_id); 291 }, 292 293 showLog: false //whether to show console debug messages 294 }); 295 296}; 297 298//** Large image view **// 299PBUtil.module.slideShow = null; 300PBUtil.createSlideshow = function(gallery_id, gallery_data, image_id, html_content, auto_play, gallery_type, filter, watermark_display, show_gallery_breadcrumb){ 301 302 if (!PBUtil.module.slideShow){ 303 304 //insert gallery html source content 305 var container = $('eventContainer'); 306 PBUtil.loadContent(container, html_content, true); 307 container = null; 308 309 // set mouseovers for magnify page 310 $$('.image_name_label_container img').each(function(img) { 311 var initialSrc = img.getProperty('src'); 312 var mouseoverSrc = '/store/images/' + img.getProperty('alt').replace('_light', '_dark'); 313 img.addEvent('mouseenter', function() { 314 img.setProperty('src', mouseoverSrc); 315 }); 316 img.addEvent('mouseleave', function() { 317 img.setProperty('src', initialSrc); 318 }); 319 }); 320 321 if (PBUtil.module.stretchLayout.layoutType == 'horizontal_navigation'){ 322 disregardNavigationHeight = false; 323 } else { 324 disregardNavigationHeight = false; 325 } 326 327 //now initiate the module 328 PBUtil.module.slideShow = new storeSlideshow({ 329 /** the DATA **/ 330 moduleName: 'slideShow', //'soloImage' or 'slideShow' 331 data: gallery_data, //The JSON data 332 galleryID: gallery_id, //Default gallery to be loaded - OPTIONAL (will load first one by default) 333 galleryType: gallery_type, //possible values are null, 'favorite', 'featured', or 'search' - OPTIONAL 334 galleryLabels: { //Supply the appropriate value to display - OPTIONAL 335 'all': null, //keep to null if JavaScript should auto detect gallery name 336 'featured': serverVars.content['Labels.Featured'], //Label for Studio's picks 337 'favorite': serverVars.content['Labels.Favorites'] //label for favorites 338 }, 339 searchFilter: filter, //JSON array for filtering items - works in with galleryType = 'search' - OPTIONAL 340 startImageID: image_id, //or set the ID of the first image (ID takes precedence) 341 342 effect: true, //show fade-in / fade-out affect? 343 hideWatermarkForEffect: true, //whether to hide the watermark during image fade in/out 344 displayWatermark: watermark_display, 345 showGalleryBreadCrumb: show_gallery_breadcrumb, 346 347 autoPlay: auto_play, //bool start playing once loaded? 348 interval: 8000, //the time interval for each slide to occur - in ml. seconds 349 showPlayPause: true, //whether to show the default play/pause btn over image 350 flipWithFinger: false, //If true, will flip image with finger in touch screen - OPTIONAL 351 stopNotice: true, //Should there be a stop notice asking users if they are viewing the show 352 stopNoticeInterval: 20*60*1000, //time to bring up the notice - default 1 minute 353 stopNoticeURL: "/store/event_slideshow_idle.cfm", 354 stopNoticeWidth: serverVars.slideshow_idle_window_width, 355 stopNoticeHeight: serverVars.slideshow_idle_window_height, 356 357 disregardHeaderHeight: true, //Disregard the header height (bigger image if true) - REQUIRED 358 disregardNavigationHeight: disregardNavigationHeight, //### Disregard the nav height (bigger image if true) - REQUIRED 359 disregardFooterHeight: false, //Disregard the footer height (bigger image if true) - REQUIRED 360 disregardButtons: false, //Disregard the buttons/labels (bigger image if true) - REQUIRED 361 extraHeightDeduction: 0, //additional height to deduct - any number 362 verticalAlignCenter: true, //vertically align the image to middle 363 364 toggleToFullscreen: true, //specify if the toggle elements should be invisible 365 slideshowElementToggleCss: 'toggle_for_slideshow', //the CSS for elements that need to toggle - hide/unhide 366 367 autoHideControls: true, //if true, hides the buttons and labels on slidehow page when idle 368 autoHideControlsCss: 'toggle_when_idle', //CSS for the containers with the controls 369 autoHideAffectDuration_controls:1500, //the duration for the controls to disappear to resize 370 autoHideAffectDuration_wrapper: 400, //the duration for the wrapper to resize 371 //extraHeightDeduction: 115, 372 373 imageSelectButton: 'button_select', //ID of a button to select and go back to solo page - OPTIONAL. Required for large view. 374 selectButtonTab: 'select_button_container', //ID of the container for the select button. Only needed for large view - REQUIRED 375 376 377 animateColor: true, //if true, it will look for c
377olor value per image and do color aimation 378 tabOffset: {percentage: '20%', toward: '#000000'}, //tab is 20% darker (toward black) by default 379 380 endOfGalleryNoticeCss: 'change_of_gallery', //CSS class name of the end of gallery notice 381 382 imageSelectButton: 'button_select', //ID of a button to select and go back to solo page - OPTIONAL 383 galleryChangeMessage: 'gallery_message', //ID of the message that appears between galleries - OPTIONAL 384 385 onFavoriteClick: function(thumbnail_id, favorite){ 386 //var favorite is returned 1 (for marked as favorite) or 0 for (unmarked as favorite). 387 //console.log("EVENT: Favorite clicked for IMG ID: " + thumbnail_id + ", is favorite? " + favorite); 388 var saveFav = new Ajax('/store/?load=favorites_save&loadtype=content&item=' + thumbnail_id + '&favorite=' + favorite, {method: 'post', evalScripts: true}).request(); 389 }, 390 onImageChange: function(image_id, gallery_id){ 391 //console.log("EVENT: Image is changed. IMG ID: " + image_id + ", Gallery ID " + gallery_id); 392 var saveFeatured = new Ajax('/store/?load=featured_save&loadtype=content&view=large&item=' + image_id + '&gallery=' + gallery_id, {method: 'post'}).request(); 393 }, 394 395 showLog: false //whether to show console debug messages 396 }); 397 //attach the EXTERNAL Next and Previous buttons to the module 398 //PBUtil.module.slideShow.attachControl('previous', 'button_go_previous'); 399 //PBUtil.module.slideShow.attachControl('next', 'button_go_next'); 400 //PBUtil.module.slideShow.attachControl('play', 'button_play', 'Play', 'Pause', 'play'); 401 402 //just loading a new gallery for the same event 403 } else { 404 //alert(gallery_id + " " + image_id) 405 PBUtil.module.slideShow.showGallery(gallery_id, image_id); 406 } 407}; 408 409PBUtil.module.leftCompare = null; 410PBUtil.module.rightCompare = null; 411PBUtil.createCompare = function(gallery_id, gallery_data, image_id, html_content, gallery_type, filter, watermark_display, show_gallery_breadcrumb){ 412 if (!PBUtil.module.leftCompare && !PBUtil.module.rightCompare){ 413 414 //insert gallery html source content 415 var container = $('eventContainer'); 416 PBUtil.loadContent(container, html_content, true); 417 container = null; 418 419 if (PBUtil.module.stretchLayout.layoutType == 'horizontal_navigation'){ 420 disregardNavigationHeight = false; 421 } else { 422 disregardNavigationHeight = true; 423 } 424 425 //now initiate the module 426 PBUtil.module.leftCompare = new storeSlideshow({ 427 /** the DATA **/ 428 moduleName: 'leftCompare', //'soloImage' or 'slideShow' 429 data: gallery_data, //The JSON data 430 galleryID: gallery_id, //Default gallery to be loaded - OPTIONAL (will load first one by default) 431 galleryType: gallery_type, //possible values are null, 'favorite', 'featured', 'search' - OPTIONAL 432 galleryLabels: { //Supply the appropriate value to display - OPTIONAL 433 'all': null, //keep to null if JavaScript should auto detect gallery name 434 'featured': serverVars.content['Labels.Featured'], //Label for Studio's picks 435 'favorite': serverVars.content['Labels.Favorites'] //label for favorites 436 }, 437 searchFilter: filter, //JSON array for filtering items - works in with galleryType = 'search' - OPTIONAL 438 startImageID: image_id, //or set the ID of the first image (ID takes precedence) 439 440 effect: true, //show fade-in / fade-out affect? 441 showPlayPause: false, //whether to show the defaule play/pause btn over image 442 showNextPrevious: true, //whether to show the defaule next/previous btns over image 443 hideWatermarkForEffect: true, //whether to hide the watermark during image fade in/out 444 displayWatermark: watermark_display, 445 showGalleryBreadCrumb: show_gallery_breadcrumb, 446 447 disregardHeaderHeight: false, //Disregard the header height (bigger image if true) - REQUIRED 448 disregardNavigationHeight: disregardNavigationHeight, //### Disregard the nav height (bigger image if true) - REQUIRED 449 disregardFooterHeight: false, //Disregard the footer height (bigger image if true) - REQUIRED 450 disregardButtons: false, //Disregard the buttons/labels (bigger image if true) - REQUIRED 451 extraHeightDeduction: 0, //additional height to deduct - any number 452 453 updateImageSelection: true, //Whether to update the JSON data for selected image 454 455 minImageHegiht: 150, //Set a minimum height - REQUIRED 456 verticalAlignCenter: false, //vertically align the image to middle 457 stretchVertically: false, //stretch image vertically (along with horizontally) 458 459 mainImageContainer: 'left_image_container', //ID of the image container elements - REQUIRED 460 imageDisplayContainer: 'left_image_display_container', //ID of the image container that has controls and other elements - REQUIRED 461 imageResizeWrapper: 'left_image_resize_wrapper', //ID of the image container - REQUIRED 462 imageElement: 'left_image_display', //ID of the the IMG tag - REQUIRED 463 watermarkWrapper: 'left_image_watermark_wrapper', //ID of the watermark container - REQUIRED 464 watermarkElement: 'left_image_watermark', //ID of the watermark IMG tag - REQUIRED 465 lblImageName: 'left_image_name_label', //ID of the label for hte image name - REQUIRED 466 loadingIcon: 'left_image_loading_icon', //ID of hte loading icons DIV 467 468 controls_Play_Pause: 'left_play_pause_overlay', //ID of the play pause control - REQUIRED 469 controls_Previous: 'left_go_previous', //ID of the previous control - REQUIRED 470 controls_Next: 'left_go_next', //ID of the next control - REQUIRED 471 472 navDropDownMenu: 'slct_load_gallery', //ID for the gallery nav dropdown menu - OPTIONAL 473 imageSelectButton: 'left_button_select', //ID of a button to select and go back to solo page - OPTIONAL 474 475 showLog: false //whether to show console debug messages 476 }); 477 //attach the EXTERNAL Next and Previous buttons to the module 478 PBUtil.module.leftCompare.attachControl('previous', 'left_button_go_previous'); 479 PBUtil.module.leftCompare.attachControl('next', 'left_button_go_
479next'); 480 /* 481 $('left_image_display_container').addEvent('mouseenter', function(event){ 482 $('left_image_container').setStyle('width', '60%'); 483 $('right_image_container').setStyle('width', '38%'); 484 PBUtil.module.rightCompare.resizeAction(); 485 PBUtil.module.leftCompare.resizeAction(); 486 }); 487 $('left_image_display_container').addEvent('mouseleave', function(event){ 488 $('right_image_container').setStyle('width', '49%'); 489 $('left_image_container').setStyle('width', '49%'); 490 PBUtil.module.rightCompare.resizeAction(); 491 PBUtil.module.leftCompare.resizeAction(); 492 }); 493 */ 494 495 //now initiate the module 496 PBUtil.module.rightCompare = new storeSlideshow({ 497 //the DATA 498 moduleName: 'rightCompare', //'soloImage' or 'slideShow' 499 data: gallery_data, //The JSON data 500 galleryID: gallery_id, //Default gallery to be loaded - OPTIONAL (will load first one by default) 501 galleryType: gallery_type, //possible values are null, 'favorite', 'featured', 'search' - OPTIONAL 502 galleryLabels: { //Supply the appropriate value to display - OPTIONAL 503 'all': null, //keep to null if JavaScript should auto detect gallery name 504 'featured': serverVars.content['Labels.Featured'], //Label for Studio's picks 505 'favorite': serverVars.content['Labels.Favorites'] //label for favorites 506 }, 507 searchFilter: filter, //JSON array for filtering items - works in with galleryType = 'search' - OPTIONAL 508 startImageID: image_id, //or set the ID of the first image (ID takes precedence) 509 510 effect: true, //show fade-in / fade-out affect? 511 showPlayPause: false, //whether to show the defaule play/pause btn over image 512 showNextPrevious: true, //whether to show the defaule next/previous btns over image 513 hideWatermarkForEffect: true, //whether to hide the watermark during image fade in/out 514 515 disregardHeaderHeight: false, //Disregard the header height (bigger image if true) - REQUIRED 516 disregardNavigationHeight: disregardNavigationHeight, //### Disregard the nav height (bigger image if true) - REQUIRED 517 disregardFooterHeight: false, //Disregard the footer height (bigger image if true) - REQUIRED 518 disregardButtons: false, //Disregard the buttons/labels (bigger image if true) - REQUIRED 519 extraHeightDeduction: 0, //additional height to deduct - any number 520 521 updateImageSelection: true, //Whether to update the JSON data for selected image 522 523 minImageHegiht: 150, //Set a minimum height - REQUIRED 524 verticalAlignCenter: false, //vertically align the image to middle 525 stretchVertically: false, //stretch image vertically (along with horizontally) 526 527 mainImageContainer: 'right_image_container', //ID of the image container elements - REQUIRED 528 imageDisplayContainer: 'right_image_display_container', //ID of the image container that has controls and other elements - REQUIRED 529 imageResizeWrapper: 'right_image_resize_wrapper', //ID of the image container - REQUIRED 530 imageElement: 'right_image_display', //ID of the the IMG tag - REQUIRED 531 watermarkWrapper: 'right_image_watermark_wrapper', //ID of the watermark container - REQUIRED 532 watermarkElement: 'right_image_watermark', //ID of the watermark IMG tag - REQUIRED 533 lblImageName: 'right_image_name_label', //ID of the label for hte image name - REQUIRED 534 loadingIcon: 'right_image_loading_icon', //ID of hte loading icons DIV 535 536 controls_Play_Pause: 'right_play_pause_overlay', //ID of the play pause control - REQUIRED 537 controls_Previous: 'right_go_previous', //ID of the previous control - REQUIRED 538 controls_Next: 'right_go_next', //ID of the next control - REQUIRED 539 540 navDropDownMenu: null, //ID for the gallery nav dropdown menu - OPTIONAL 541 imageSelectButton: 'right_button_select', //ID of a button to select and go back to solo page - OPTIONAL 542 543 showLog: false //whether to show console debug messages 544 }); 545 //attach the EXTERNAL Next and Previous buttons to the module 546 PBUtil.module.rightCompare.attachControl('previous', 'right_button_go_previous'); 547 PBUtil.module.rightCompare.attachControl('next', 'right_button_go_
547next'); 548 549 /* 550 $('right_image_display_container').addEvent('mouseenter', function(event){ 551 $('right_image_container').setStyle('width', '60%'); 552 $('left_image_container').setStyle('width', '38%'); 553 PBUtil.module.rightCompare.resizeAction(); 554 PBUtil.module.leftCompare.resizeAction(); 555 }); 556 $('right_image_display_container').addEvent('mouseleave', function(event){ 557 $('right_image_container').setStyle('width', '49%'); 558 $('left_image_container').setStyle('width', '49%'); 559 PBUtil.module.rightCompare.resizeAction(); 560 PBUtil.module.leftCompare.resizeAction(); 561 }); 562 */ 563 564 //just loading a new gallery for the same event 565 } else { 566 //alert(gallery_id + " " + image_id) 567 PBUtil.module.leftCompare.showGallery(gallery_id, image_id); 568 PBUtil.module.rightCompare.showGallery(gallery_id, image_id); 569 } 570}; 571 572PBUtil.module.magnify = null; 573PBUtil.createMagnifier = function(gallery_id, gallery_data, image_id, html_content, gallery_type, filter, watermark_display, show_gallery_breadcrumb){ 574 if (!PBUtil.module.magnify){ 575 576 //insert gallery html source content 577 var container = $('eventContainer'); 578 PBUtil.loadContent(container, html_content, true); 579 container = null; 580 581 582 //now initiate the module 583 PBUtil.module.magnify = new imageMagnifier({ 584 /** the DATA **/ 585 moduleName: 'magnify', //'soloImage' or 'slideShow' 586 data: gallery_data, //The JSON data 587 galleryID: gallery_id, //Default gallery to be loaded - OPTIONAL (will load first one by default) 588 galleryType: gallery_type, //possible values are null, 'favorite', 'featured', 'search' - OPTIONAL 589 galleryLabels: { //Supply the appropriate value to display - OPTIONAL 590 'all': null, //keep to null if JavaScript should auto detect gallery name 591 'featured': serverVars.content['Labels.Featured'], //Label for Studio's picks 592 'favorite': serverVars.content['Labels.Favorites'] //label for favorites 593 }, 594 searchFilter: filter, //JSON array for filtering items - works in with galleryType = 'search' - OPTIONAL 595 startImageID: image_id, //or set the ID of the first image (ID takes precedence) 596 597 effect: true, //show fade-in / fade-out affect? 598 showPlayPause: false, //whether to show the defaule play/pause btn over image 599 showNextPrevious: false, //whether to show the defaule next/previous btns over image 600 hideWatermarkForEffect: true, //whether to hide the watermark during image fade in/out 601 displayWatermark: watermark_display, 602 showGalleryBreadCrumb: show_gallery_breadcrumb, 603 604 resizeWithWindow: false, //Will resize with window if true 605 disregardHeaderHeight: false, //Should the image space disregard the header height (bigger image if true) - REQUIRED 606 updateImageSelection: true, //Whether to update the JSON data for selected image 607 608 availableHeight: 400, //Pre-set the height of the image 609 minImageHegiht: 150, //Set a minimum height - REQUIRED 610 maxImageHeight: 400, //Set a maximum height - REQUIRED 611 verticalAlignCenter: false, //vertically align the image to middle 612 stretchVertically: false, //stretch image vertically (along with horizontally) 613 614 mainImageContainer: 'left_image_container', //ID of the image container elements - REQUIRED 615 imageDisplayContainer: 'left_image_display_container', //ID of the image container that has controls and other elements - REQUIRED 616 imageResizeWrapper: 'left_image_resize_wrapper', //ID of the image container - REQUIRED 617 imageElement: 'left_image_display', //ID of the the IMG tag - REQUIRED 618 watermarkWrapper: 'left_image_watermark_wrapper', //ID of the watermark container - REQUIRED 619 watermarkElement: 'left_image_watermark', //ID of the watermark IMG tag - REQUIRED 620 lblImageName: 'left_image_name_label', //ID of the label for hte image name - REQUIRED 621 loadingIcon: 'left_image_loading_icon', //ID of hte loading icons DIV 622 623 controls_Play_Pause: 'left_play_pause_overlay', //ID of the play pause control - REQUIRED 624 controls_Previous: 'left_go_previous', //ID of the previous control - REQUIRED 625 controls_Next: 'left_go_next', //ID of the next control - REQUIRED 626 627 normalButtonCss: 'btn_large_type_2', //class for buttons with
627normal look - OPTIONAL 628 selectedButtonCss: 'btn_large_type_2a', //class for buttons with selected look - i.e. favorite - OPTIONAL 629 630 navDropDownMenu: 'slct_load_gallery', //ID for the gallery nav dropdown menu - OPTIONAL 631 imageSelectButton: 'left_button_select', //ID of a button to select and go back to solo page - OPTIONAL 632 633 onFavoriteClick: function(image_id, favorite){ 634 //console.log("EVENT: Favorite clicked for IMG ID: " + image_id + ", is favorite? " + favorite); 635 var saveFav = new Ajax('/store/?load=favorites_save&loadtype=content&item=' + image_id + '&favorite=' + favorite, {method: 'post', evalScripts: true}).request(); 636 }, 637 onImageChange: function(image_id, gallery_id){ 638 //console.log("EVENT: Image is changed. IMG ID: " + image_id + ", Gallery ID " + gallery_id); 639 var saveFeatured = new Ajax('/store/?load=featured_save&loadtype=content&view=medium&item=' + image_id + '&gallery=' + gallery_id, {method: 'post'}).request(); 640 }, 641 642 showLog: false //whether to show console debug messages 643 }); 644 //attach the EXTERNAL Next and Previous buttons to the module 645 PBUtil.module.magnify.attachControl('previous', 'left_button_go_previous'); 646 PBUtil.module.magnify.attachControl('next', 'left_button_go_next'); 647 648 } else { 649 PBUtil.module.magnify.showGallery(gallery_id, image_id); 650 } 651}; 652 653PBUtil.module.productImage = null; 654PBUtil.createProductImage = function(html_content){ 655 656 //insert gallery html source content 657 //var container = $('tabbed_content_area'); 658 //PBUtil.loadContent(container, html_content, true); 659 //container = null; 660 661 PBUtil.module.productImage = new productImage({ 662 moduleName: 'productImage', 663 extraHeightDeduction: -55, //additional height to deduct - any number 664 showLog: false 665 }); 666}; 667 668PBUtil.createDropPanel = function(moduleName, trigger_button, contentURL, iframe_id, left_offset){ 669 670 if (PBUtil.module[moduleName]) { 671 PBUtil.module[moduleName].unload(); 672 PBUtil.module[moduleName] = null; 673 } 674 675 if(!$defined(left_offset)) 676 var left_offset = -3; 677 678 //if(!$defined(width)) 679 //var width = null; 680 681 PBUtil.module[moduleName] = new dropContentPanel({ 682 moduleName: moduleName, //the name of the module so it can be detected for debugging and garbage collection - REQUIRED 683 element: trigger_button, //the ID of the trigger element - REQUIRED 684 targetPanelID: 'dropPanel_Container', //the ID of the drop panel target element - REQUIRED 685 contentPanelID: 'dropPanel_Content', //the ID of hte inner content panel - REQUIRED 686 initialContent: 'Loading ...', //the left offset number - OPTIONAL 687 leftOffset: left_offset, //the left offset number - OPTIONAL 688 topOffset: 3, //the left top number - OPTIONAL 689 autoAlignRight: true, 690 width: null, //if the dropdown needs fixed width - OPTIONAL 691 height: null, //if a fixed height is needed - OPTIONAL 692 //Event for opening 693 onOpen: function(){ 694 //send a request to the iframe to load some content 695 if (iframe_id && contentURL) 696 $(iframe_id).src = contentURL; //"global/blank.php?load=buy_now&content_type=the_form"; 697 698 // console.log("panel opened"); 699 }, 700 showLog: false, 701 702 //=============== SCROLLER PROPERTIES ========== 703 scrollContainer: "scroll_container", //the container ID - REQUIRED 704 contentCSS: "misoScrollerContent", //content CSS name - REQUIRED 705 trackContainerCSS: "misoScrollerTrackContainer", //The track, scroll bar, arrow container - REQUIRED 706 trackCSS: "misoScrollerTrack", //Track CSS name - OPTIONAL (required if there is a scroll track and bar) 707 barCSS: "misoScrollerBar", //Track Bar CSS name - OPTIONAL (required if there is a scroll track and bar) 708 upArrowCSS: "misoScrollerUpArrow", //Up Arrow CSS name - OPTIONAL (required if there are scroll arrows) 709 downArrowCSS: "misoScrollerDownArrow", //Down Arrow CSS name - OPTIONAL (required if there are scroll arrows) 710 speed: 5, //1 to 10. 1 is slow and 10 is the fastest - OPTIONAL 711 serverVars: serverVars 712 }); 713}; 714 715PBUtil.module.bannerSlideshow = null; 716PBUtil.createBannerSlideshow = function(data, bannerType){ 717 718 /*var container = $('content_area_container'); 719 PBUtil.loadContent(container, html_content, true); 720 container = null;*/ 721 722 if (PBUtil.module.bannerSlideshow) { 723 PBUtil.module.bannerSlideshow.unload(); 724 PBUtil.module.bannerSlideshow = null; 725 } 726 727 PBUtil.module.bannerSlideshow = new bannerSlideshow({ 728 moduleName: "bannerSlideshow", //name of the module 729 data: data, 730 731 //======= slideshow options ======
732 container: "slide_container", //id of the image container 733 bannerType: bannerType, //Supply 'horizontal' for landscape banners and 'vertical' for skyscraper 734 imageWrapperCSS: "slideshowImageWrapper", //image wrapper CSS 735 736 interval: 5000, //the integer with the time interval for each slide to occur 737 affectDuration: 500, 738 randomize: false, //bool for randomizing the image sequence 739 autoPlay: true, //bool start playing once loaded? 740 effect: true, //show fade-in / fade-out affect? 741 slideTogether: false, //slide both slides at the same time 742 loop: true, //start at the beginning, only needed if randomize is false. 743 startIndex: 0, //will start at the index position of the array regardless of random or not 744 745 746 autoScale: true, //Will auto scale with browser width - only applies to 'horizontal' 747 autoScaleMarginLeft: null, //Left margin for auto scale - supply through CSS or here 748 autoScaleMarginRight: null, //right margin for auto scale - supply through CSS or here 749 autoScaleMaxWidth: null, //max width for auto scale - supply through CSS or here 750 autoScaleMaxHeight: null, //max height for auto scale - supply through CSS or here 751 showLog: false, 752 753 //===== module's events ===== 754 onComplete: function(){ 755 //alert("Done loading and displaying, Index:" + this.curr_index); 756 757 }, 758 onStart: function(){ 759 //alert("Starting image loading ..."); 760 761 } 762 763 }); 764}; 765 766PBUtil.module.stretchLayout = new stretchLayout({ 767 layoutType: "horizontal_navigation",//### "vertical_navigation", "horizontal_navigation" - REQUIRED 768 pageContainer: "page_boundary", //the ID of the page boundary DIV - REQUIRED 769 bodyContainer: "global_body", //the ID of the body DIV - REQUIRED 770 navContainer: "navigation_container", //the ID of the navigation container - REQUIRED 771 contentContainer: "content_area_container", //the ID of the content area container - REQUIRED 772 footerContainer: "global_footer", //the ID of the footer container - REQUIRED 773 maxWidth: 1500, //max width of the entire page - REQUIRED 774 minContentHeight: null, //if the content container needs a fixed height - OPTIONAL 775 maxContentHeight: null, //if the content container needs a fixed height - OPTIONAL 776 showLog: false 777}); 778 779/** 780 * Initiate the drop down menu class and render each of the drop down menus 781 * All IDs must be supploed. See items that are required 782 */ 783PBUtil.module.dropMenu.attach({ 784 element: "nav_event_galleries", //the ID of the parent element - the trigger element - REQUIRED 785 target: "dropmenu_1", //the ID of the dropdown element - the target element - REQUIRED 786 leftOffset: 0, //the left offset number - OPTIONAL 787 topOffset: 0 //the left top number - OPTIONAL 788 }); 789 PBUtil.module.dropMenu.attach({ 790 element: "nav_product_galleries", //the ID of the parent element - the trigger element - REQUIRED 791 target: "dropmenu_2" //the ID of the dropdown element - the target element - REQUIRED 792 }); 793 PBUtil.module.dropMenu.attach({ 794 element: "nav_slideshow", //the ID of the parent element - the trigger element - REQUIRED 795 target: "dropmenu_3", //the ID of the dropdown element - the target element - REQUIRED 796 where: "bottom", //"bottom" or "right" - OPTIONAL. "bottom" is default. 797 leftOffset: 0, //the left offset number - OPTIONAL 798 topOffset: 0 //the left top number - OPTIONAL 799 }); 800 801// Make global so we can close the lightbox from event_welcome.cfm 802var eventWelcomeLightbox; 803PBUtil.showEventWelcome = function(eventID){ 804 eventWelcomeLightbox = new modalWindow({ classPrefix: "store_" }); 805 eventWelcomeLightbox.open({isAlertType: true, caption: '', iframe: true, close: true, url: serverVars.store_frontend_directory + 'event_welcome.cfm?lightbox=1&item=' + eventID }); 806}; 807 808PBUtil.eventImageShare = function(shareLink){ 809 var data_iframe = top.$('ifr_eventdata'); //get a DOM reference to the data iframe 810 var json_data = data_iframe.contentWindow.json_event_data; 811 var selectedItem = json_data.selected_item.id 812 PBUtil.module.Lightbox.open({isAlertType: true, caption: serverVars.share_window_caption, iframe: true, close: true, url: serverVars.store_frontend_directory + 'share.cfm?link=' + shareLink + '%26item%3D' + selectedItem });
813}; 814 815 816// Event access page entry 817jQuery(document).on("keypress", "#password_text", function(e){ 818 if(e.which === 13){ 819 jQuery(this).closest("form").submit(); 820 } 821}); 822 823// Event search 824jQuery(document).on("keypress", "#search_words", function(e){ 825 if(e.which === 13){ 826 jQuery(this).closest("form").submit(); 827 } 828}); 829 830// Main search initiation 831jQuery(document).on("keypress", "#txt_search_keyword", function(e) { 832 if(e.which === 13) { 833 e.preventDefault(); 834 var $theForm = jQuery(this).closest("form"); 835 $theForm.attr('method','get'); 836 $theForm.submit(); 837 } 838});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.