Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. <?php if (!empty($title)): ?>
  2. <h3><?php print $title; ?></h3>
  3. <?php endif; ?>
  4. <div id="<?php print $view_id; ?>" class="timeline<?php print ' ' . $gso_line_style; print ' ' . $gso_nav_style; print ' ' . $bso_button_type; ?>">
  5. <?php foreach ($rows as $id => $row): ?>
  6. <?php print $row; ?>
  7. <?php endforeach; ?>
  8. </div>
  9. <?php drupal_add_js('(function($){
  10. var test = false;
  11. $(window).load(function() {
  12. if(!test)
  13. timeline_init_'.$view_id.'($(document));
  14. });
  15. function timeline_init_'.$view_id.'($this) {
  16. $this.find(".scrollable-content").mCustomScrollbar();
  17. $this.find("a[rel^='prettyPhoto']").prettyPhoto();
  18.  
  19. $this.find("#'.$view_id.'").timeline({
  20. itemMargin : '.$gso_item_margin.',
  21. scrollSpeed : '.$go_scroll_speed.',
  22. easing : "'.$go_easing.'",
  23. openTriggerClass : ''.$gso_read_more.'',
  24. swipeOn : true,
  25. startItem : "last",
  26. yearsOn : '.$go_hide_years.',
  27. hideTimeline : '.$gso_hide_timeline.',
  28. hideControles : '.$gso_hide_navigation.',
  29. closeText : "'.$bso_close_button_text.'",
  30. closeItemOnTransition: '.$go_close_item_on_transition.'
  31. });
  32.  
  33. $this.find("#'.$view_id.'").on("ajaxLoaded.timeline", function(e){
  34. var scrCnt = e.element.find(".scrollable-content");
  35. scrCnt.height(scrCnt.parent().height() - scrCnt.parent().children("h2").height() - parseInt(scrCnt.parent().children("h2").css("margin-bottom")));
  36. scrCnt.mCustomScrollbar({theme:"light-thin"});
  37. e.element.find("a[rel^='prettyPhoto']").prettyPhoto();
  38. e.element.find(".timeline_rollover_bottom").timelineRollover("bottom");
  39. });
  40. }
  41. })(jQuery);', array('type' => 'inline', 'scope' => 'footer', 'weight' => 5)); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement