Nimai
Oct-11-2007, 08:14 AM
Some (many?) have related frustrating stories of reseting their entire galleries prices when they intended to set some custom pricing options for an individual photo. I do this enough that I made some javascript to add an option right to the gallery photo tools to take me directly to the pricing for the current photo - no risk of forgetting to click image on the next page!
function imageToolsEx() {
var photoTools = document.getElementById('tools');
if( photoTools.options[photoTools.selectedIndex].id == 'proPricingPhotoChoice' )
document.getElementsByName('Type')[0].value = '';
imageTools();
}
function addProPricingPhoto() {
if (YD.hasClass(document.body,"galleryPage") && YD.hasClass(document.body,"loggedIn")) {
var photoTools = document.getElementById('tools');
var proPricingPhoto = document.createElement('option');
proPricingPhoto.text = 'Pro Pricing Photo';
proPricingPhoto.value = 'proprices';
proPricingPhoto.class = 'nonMovieTool';
proPricingPhoto.id = 'proPricingPhotoChoice';
photoTools.add( proPricingPhoto, photoTools.options[3] );
photoTools.setAttribute( 'onChange', 'imageToolsEx();' );
}
}
YE.on(window, "load", addProPricingPhoto);
Just add the above code to your javascript section in Customization.
function imageToolsEx() {
var photoTools = document.getElementById('tools');
if( photoTools.options[photoTools.selectedIndex].id == 'proPricingPhotoChoice' )
document.getElementsByName('Type')[0].value = '';
imageTools();
}
function addProPricingPhoto() {
if (YD.hasClass(document.body,"galleryPage") && YD.hasClass(document.body,"loggedIn")) {
var photoTools = document.getElementById('tools');
var proPricingPhoto = document.createElement('option');
proPricingPhoto.text = 'Pro Pricing Photo';
proPricingPhoto.value = 'proprices';
proPricingPhoto.class = 'nonMovieTool';
proPricingPhoto.id = 'proPricingPhotoChoice';
photoTools.add( proPricingPhoto, photoTools.options[3] );
photoTools.setAttribute( 'onChange', 'imageToolsEx();' );
}
}
YE.on(window, "load", addProPricingPhoto);
Just add the above code to your javascript section in Customization.