Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note
titleIMPORTANT

In order to be able to play the training videos, please make sure toaccept recommended settings under the Cookie settings option, at the bottom of the page.
Image Added   


HTML
<script>
  $( document ).ready(function() {
    // Training Videos Vimeo video IDs 
    var videoIDs = [ 
      636935865, //asset catalog entry
      636939181, //catalog
      636940575, //consumables w expdate
      636941153, //consum wo expdate
      636940103636941730, //asset entry2nonconsum
      636942907, //transaction assignees
      636942249636943358, //checkout
      636944162, //nonconsum2checkin
      636941730636944755, //nonconsumreconcil
      636945284, //setupsheets
      636944755638968696, //Request items using asset tags
      638970242, //reconcil
      636944162, //checkin
      636943358  //checkoutAsset properties
      638587091, //Properties of consumables with expiration date
      638587814, //Properties of non-consumables and consumables without expiration date
      638588414, //Asset maintenance and repair
      638588977 //Inventory reports
    ];
    var videoTokens = [ 
      "c6d153983a", //asset catalog entry
      "613c09991c", //catalog
      "881ea3d58e", //consumables w expdate
      "2fdf994f5a", //consum wo expdate
      "316c3bfee8fa8c5953b7", //asset entry2nonconsum
      "adc094fa5e", //transaction assignees
      "4429475d54"d5da94b3ed", //checkout
      "a2ec3954cb", //nonconsum2checkin
      "fa8c5953b7bcd424d65b", //nonconsumreconcil
      "9d49138166", //setupsheets
      "bcd424d65bd6778a8b2c", //reconcilRequest items using asset tags
      "a2ec3954cbf0ce5d616e", //Asset properties
      "1a9f5f51a7", //checkin
      "d5da94b3ed"  //checkoutProperties of consumables with expiration date
      "6b4e8a0996", //Properties of non-consumables and consumables without expiration date
      "3bafba3c3a", //Asset maintenance and repair
      "65df89e15a" //Inventory reports
    ];
 

	
    // Time box template
   	var timeBoxTemplate = function(videoNum, videoID) {
          return '<div class=\"timeBox\" id="video_'+ videoID +'">' +
            '<div class=\"titleHolder\">' +
              '<div class=\"videoNumberHolder\">' +
                '<div class=\"videoNumber\">' + videoNum + '</div>' +
              '</div>' +
              '<div class=\"videoTitle\">' + "" + '</div>' +
            '</div>' +
            '<div class=\"thumbnail\"><img src=""></div>' +
          '</div>';
    };

    for (var i=0; i<videoIDs.length; i++) {
      var timeBox = timeBoxTemplate(i+1, videoIDs[i]); // To start from 1 not from 0
      $(timeBox).appendTo('.timeline');
    }

    // Load first video
    $('.videoScreen iframe').attr('src', 'https://player.vimeo.com/video/' + videoIDs[0] + '?h=' + videoTokens[0]);

    // Get data from vimeo
    $.each(videoIDs, function (i, videoID) {
      $.ajax({
        method: "GET",
        url: "https://api.vimeo.com/videos/" + videoID + '?access_token=0e76ec72e4cc1a5111ac16023a2d0456',
        success: function(data) {

        var timeBox = $('#video_'+videoID);
        timeBox.find('.videoTitle').text(data.name);
        timeBox.find('.thumbnail img').attr('src', data.pictures.sizes[3].link_with_play_button);
        }
      });
    });

    $('.timeBox:first-child').addClass('active');

     // Show current embedded video and set timebox to active
    $('.timeBox').on('click', function() {
      var $this = $(this);
      var index = $this.index();

      $('.timeBox').removeClass('active');
      $this.addClass('active');

      var id = $this.children('.videoID').val();
      $('.videoScreen iframe').attr('src', 'https://player.vimeo.com/video/' + videoIDs[index] + '?h=' + videoTokens[index]);
    });

  });
</script>

<div class="trainingVideosContainer">
  <div class="videosMainHolder">
    <div class="timelineHolder">
      <div class="timeline">

      </div>
    </div>

    <div class="videoHolder">
      <div class="videoScreenHolder">

        <div class="videoScreen">
          <iframe src="" width="640" height="400" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
        </div>

      </div>
    </div>
  </div>
</div>


Note

If you do not see the videos, go to Cookies Settings at the bottom of the page and allow all Cookies. For more details, click here.