'].join('');
}
function handleError(){
$('#gui-modal-product-inventory-location-wrapper').show();
$('#gui-modal-product-inventory-location-content').html('');
}
// Get product inventory location information
function inventoryOnClick() {
$.getJSON('https://www.spokesmancycles.com/product-inventory/?id=80200350', function (response) {
if(!response || !response.productInventory || (response.productInventory.locations && !response.productInventory.locations.length)){
handleError();
return;
}
var locations = response.productInventory.locations || [];
var rows = locations.map(function(item, index) {
return createLocationRow(item, index === 0)
});
$('#gui-modal-product-inventory-location-content').html(rows);
var dateObj = new Date();
var hours = dateObj.getHours() ',
'', 'Last updated:', ' ',
'Today at ', hours, ':', minutes,
'
',
'
Online and in-store prices may differ
'].join('');
$('#gui-modal-product-inventory-location-footer').html(footerContent);
$('#gui-modal-product-inventory-location-wrapper').show();
}).fail(handleError);
}
$('#productLocationInventory').click(inventoryOnClick);
// When the user clicks on 'Close' in the modal, close it
$('#gui-modal-product-inventory-location-close').click(function(){
$('#gui-modal-product-inventory-location-wrapper').hide();
});
// When the user clicks anywhere outside of the modal, close it
$('.gui-modal-product-inventory-location-background').click(function(){
$('#gui-modal-product-inventory-location-wrapper').hide();
});
})();
Handlebar or stem mounted protective case for smart phones
Instant device removal and installation
Safe and secure mounting unit
Adjustable viewing angle
Wider platform to fit larger phones and cases (including all 4.3" Android phones)
Holds devices up to 2.9x5/8x5.5" (74x16x139mm)
Includes touchscreen friendly all-weather protective bag