{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'} {combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'} {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"} {footer_script} jQuery(function($) { {* *} var categoriesCache = new CategoriesCache({ serverKey: '{$CACHE_KEYS.categories}', serverId: '{$CACHE_KEYS._hash}', rootUrl: '{$ROOT_URL}' }); categoriesCache.selectize(jQuery('[data-selectize=categories]')); if($('#metaogimagesaveid').children("option:selected").val()=="-20"){ $('#mognp').show(); } $('#metaogimagesaveid').change(function(event){ var idphoto=$(this).children("option:selected").val(); $('#metaogimagesave2id').val(idphoto); if($('#metaogimagesaveid').children("option:selected").val()=="-10" || $('#metaogimagesaveid').children("option:selected").val()=="-20"){ $('#mognp').show(); $('#metaogimagescr').attr("src",''); $('#metaogimagescr').hide(); }else{ var urliog=$('#metaogimagesaveid').children("option:selected").data('url'); $('#metaogimagescr').attr("src",urliog); $('#metaogimagescr').show(); $('#mognp').hide(); } $('#mognpe').hide(); $('#metaogimagesaveid').css('border', 'solid 1px #999'); $('#metaogimagesave2id').css('border', 'solid 1px #999'); $('#submetaogsave').show(); }); $('#metaogimagesave2id').change(function(){ var idphoto2=$(this).val(); $('#metaogimagesaveid').val(idphoto2); if($('#metaogimagesaveid').children("option:selected").val()==idphoto2){ $('#metaogimagesaveid').css('border', 'solid 1px #999'); $('#metaogimagesave2id').css('border', 'solid 1px #999'); $('#mognpe').hide(); $('#submetaogsave').show(); if($('#metaogimagesaveid').children("option:selected").val()=="-10" || $('#metaogimagesaveid').children("option:selected").val()=="-20"){ $('#mognp').show(); $('#metaogimagescr').attr("src",''); $('#metaogimagescr').hide(); }else{ var urliog=$('#metaogimagesaveid').children("option:selected").data('url'); $('#metaogimagescr').attr("src",urliog); $('#metaogimagescr').show(); $('#mognp').hide(); } }else{ $('#metaogimagesaveid').css('border', 'solid 2px red'); $('#metaogimagesave2id').css('border', 'solid 2px red'); $('#mognpe').show(); $('#mognp').hide(); $('#metaogimagescr').attr("src",''); $('#metaogimagescr').hide(); $('#submetaogsave').hide(); } }); }); {/footer_script}