/* Js for , Version=1715260904 */ v.lang = {"confirmDelete":"Do you want to delete it?","deleteing":"Deleting","doing":"Doing","loading":"Loading","updating":"Updating","timeout":"Timeout. Please try it again.","errorThrown":"Error : ","continueShopping":"Continue shopping","required":"Required","back":"Back","continue":"Continue","bindWechatTip":"Posting sets the limit for binding WeChat. Please bind WeChat user first.","importTip":"Old layout data will be replaced","fullImportTip":"Old article, product, layout data will be replaced and import test data"};;v.path = ["123","133"];;v.objectType = "article";;v.objectID = 724;;v.categoryID = 133;;v.categoryPath = ["123","133"];; ;v.pageLayout = "global";; $(document).ready(function() { $('.tree .list-toggle').mousedown(function(){$(this).parents('.panel-block').height('auto');}) $('.row.blocks .tree').resize(function(){$(this).parents('.row.blocks').tidy({force: true});}) }) ; $(document).ready(function() { $('.tree .list-toggle').mousedown(function(){$(this).parents('.panel-block').height('auto');}) $('.row.blocks .tree').resize(function(){$(this).parents('.row.blocks').tidy({force: true});}) }) ;$().ready(function() { $('#execIcon').tooltip({title:$('#execInfoBar').html(), html:true, placement:'right'}); }); ;$(document).ready(function() { $('#copyBox').hide().find(':input').attr('disabled', true); $('#source').change(function() { $('#copyBox').hide().find(':input').attr('disabled', true); if($(this).val() != 'original') $('#copyBox').show().find(':input').attr('disabled', false); }); /* Set current active topNav. */ var hasActive = false; if(v.categoryID > 0 && $('.nav-article-' + v.categoryID).length >= 1) { hasActive = true; $('.nav-article-' + v.categoryID).addClass('active'); } if(v.categoryPath && v.categoryPath.length) { $.each(v.categoryPath, function(index, category) { if(!hasActive) { if($('.nav-article-' + category).length >= 1) hasActive = true; $('.nav-article-' + category).addClass('active'); } }); } else if(v.path && v.path.length) { $.each(v.path, function(index, category) { if(!hasActive) { if($('.nav-article-' + category).length >= 1) hasActive = true; $('.nav-article-' + category).addClass('active'); } }); if(!hasActive) $('.nav-article-0').addClass('active'); } if(v.categoryID !== 0) $('#category' + v.categoryID).parent().addClass('active'); $('#navbar li.active').parents('li').addClass('active'); }); $(document).ready(function() { function basename(str) { var pos = str.lastIndexOf('/'); return str.substring(pos + 1,str.length); } $('body').tooltip( { html: true, selector: "[data-toggle=tooltip]", container: "body" }); $('.article-content img').click(function(){ var itemSrc = $(this).attr('src'); var itemName = basename(itemSrc).split('&')[0]; if(typeof(itemName) == 'string') { $('.article-files .' + itemName).click(); } }); if($('.previous > a > span').width() > $('.previous > a').width()) { previousSpanWidth = $('.previous > a').width() - $('.previous .icon-arrow-left').width() - 10; $('.previous > a > span').css('width', previousSpanWidth); } if($('.next > a > span').width() > $('.next > a').width()) { nextSpanWidth = $('.next > a').width() - $('.next .icon-arrow-right').width() - 10; $('.next > a > span').css('width', nextSpanWidth); } }); ; function loadCartInfo(twinkle) { $('#siteNav').load(createLink('misc', 'printTopBar'), function() { if(twinkle) { bootbox.dialog( { message: v.addToCartSuccess, buttons: { back: { label: v.lang.continueShopping, className: 'btn-primary', callback: function(){location.reload();} }, cart: { label: v.gotoCart, className: 'btn-primary', callback: function(){location.href = createLink('cart', 'browse');} } } }); } } ); } ; var hash = window.location.hash.substring(1); var browserLanguage = navigator.language || navigator.userLanguage; var resolution = screen.availWidth + ' X ' + screen.availHeight; $.get(createLink('log', 'record', "hash=" + hash), {browserLanguage:browserLanguage, resolution:resolution});