Esempio n. 1
0
 public function show_template_options()
 {
     global $post;
     $options = new MaxGalleriaImageTilesOptions($post->ID);
     if ($options->get_template() == 'image-tiles') {
         require_once 'image-tiles-meta.php';
     }
 }
Esempio n. 2
0
<?php

global $post;
$options = new MaxGalleriaImageTilesOptions($post->ID);
?>

<script type="text/javascript">		
	jQuery(document).ready(function() {
		enableDisableThumbClickNewWindow();
		enableDisableLightboxCustomSize();
		
		jQuery("#<?php 
echo $options->thumb_click_key;
?>
").change(function() {
			enableDisableThumbClickNewWindow();
		});

		jQuery("#<?php 
echo $options->lightbox_image_size_key;
?>
").change(function() {
			enableDisableLightboxCustomSize();
		});
	});
	
	function enableDisableThumbClickNewWindow() {
		thumb_click = jQuery("#<?php 
echo $options->thumb_click_key;
?>
").val();
<?php

$options = new MaxGalleriaImageTilesOptions();
?>

<script type="text/javascript">		
	jQuery(document).ready(function() {		
		jQuery("#save-image-tiles-settings").click(function() {
			jQuery("#save-image-tiles-settings-success").hide();
			
			var form_data = jQuery("#form-image-tiles-settings").serialize();

			// If thumb caption enabled is not checked, we have to add it to form data with an empty value
			if (jQuery("#<?php 
echo $options->thumb_caption_enabled_default_key;
?>
").is(":not(:checked)")) {
				form_data += "&<?php 
echo $options->thumb_caption_enabled_default_key;
?>
=";
			}
			
			// If lightbox caption enabled is not checked, we have to add it to form data with an empty value
			if (jQuery("#<?php 
echo $options->lightbox_caption_enabled_default_key;
?>
").is(":not(:checked)")) {
				form_data += "&<?php 
echo $options->lightbox_caption_enabled_default_key;
?>