Videos-On-Demand
Refine By Category
Refine By Company
Results
Videos-On-Demand
Below are a list of videos-on-demand provided by companies who are members of this site and provide services to people having left/leaving the armed forces. Click a video-on-demand for more details and/or view it.
';
$(document).on('click', 'div.onDemandList div.item[data-entityurl]', function () {
window.location = $(this).attr("data-entityurl") + '/?show=' + $(this).attr("data-entityid") + '&showtype=ONDE';
});
$(document).on('change', '#searchByCategory', function () {
$('#searchByCompany').val('');
populateList();
});
$(document).on('change', '#searchByCompany', function () {
$('#searchByCategory').val('');
populateList();
});
$(document).on('click', '.loadPreviousResults', function () {
populateList($(this).data('previouspage'));
});
$(document).on('click', '.loadMoreResults', function () {
populateList($(this).data('nextpage'));
});
// fill the page with grayed out content which will get replaced with results
$('#listOfData').html('
' + template + template + '
');
// factor in small delay so people see the grayed out placeholder
setTimeout(function () { populateList($.getParameterFromQuerystring('page')); }, 300);
});
function populateList(whatResultsPageToGet) {
// validate which page number to get...
if (whatResultsPageToGet === '' || whatResultsPageToGet === NaN || whatResultsPageToGet === undefined) {
whatResultsPageToGet = 1;
}
var template = '
[ROWNUMBER]. [TITLE]
By: [FORCOMPANYNAME]
Added: [DATEADDED]
Category: [CATEGORY]
Duration: [DURATION]
[DESCRIPTION]
';
$.ajax({
url: entityAPIPath + 'stands/ondemand/' + ($('#searchByCompany').val() === '' ? '' : 'for/' + $('#searchByCompany').val()) + '?pagesize=50&page=' + whatResultsPageToGet + '&category=' + $('#searchByCategory').val().replace('&', '^'), method: 'GET', pageSize: 16, processData: false, headers: { 'X-Authorisation-Domain': domainKey }
})
.done(function (data) {
switch (data.statuscode) {
case '00':
var thisList = '';
var iLastIDProcessed = 0;
data.results.forEach(function (e) {
iLastIDProcessed = e.RowNumber;
thisList += template;
thisList = thisList.replace('[ROWNUMBER]', e.RowNumber);
thisList = thisList.replace('[URL]', e.ForCompanyURL);
thisList = thisList.replace('[TITLE]', e.Title);
thisList = thisList.replace('[ITEMENTITYID]', e.EntityID);
thisList = thisList.replace('[LOGO]', '/images/company-logos/200x100/logo-' + e.ForEntityID + '.jpg');
thisList = thisList.replace('[FORCOMPANYNAME]', e.ForCompanyName);
thisList = thisList.replace('[DATEADDED]', showDatestamp(e.CreatedDatestampUTC));
thisList = thisList.replace('[DURATION]', e.DurationMinutes + ' minutes');
thisList = thisList.replace('[CATEGORY]', e.TypeName);
thisList = thisList.replace('[DESCRIPTION]', e.Description);
});
if (thisList === '')
$('#listOfData').html(showNoResultsMessage('videos on demand'));
else {
if (iLastIDProcessed ' + thisList + '
').append('