var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; }; var v = getUrlParam('v'); if (!v) { window.location.replace(window.location.href + '?v=' + Math.random()); }; $.ajaxSetup({ async: true, cache: false }); $('.extension, .emoticon').tipsy({ gravity: 's', title: 'class' }); // Show extensions classes // Top scroll $().UItoTop(); function Nshow() { $("#loading_notification").show(); }; function Nhide() { $("#loading_notification").hide(); }; $(document).ajaxStart(function() { Nshow(); }); $(document).ajaxComplete(function(event, request, settings) { Nhide(); }); //$(document).ajaxError(function(event, request, settings) { //window.location.reload(true); //alert("网络繁忙,请重试。 " + request.status); //var scode = request.status; //Nhide(); //if (scode != 0) { alert("发生错误,代码:" + scode); }; //}); $(document).ajaxError(function(event, request, settings) { Nhide(); var scode = request.status; switch (scode) { case 0: alert("访问超时,请重试。"); break; case 403: alert("帐号或密码错误,请关掉浏览器重新访问。"); break; case 500: window.location.reload(true); break; default: window.location.reload(true); }; }); // Main Navigation $('.muon').muon(); // jQuery Tipsy s:top n:bottom w:right e:left $('.tooltip, .loading').tipsy({ gravity: 's', fade: true }); // Tooltip Gravity Orientation: n | w | e | s $('.tooltip-wide').tipsy({ gravity: 'e', fade: true }); // Tooltip Gravity Orientation: n | w | e | s //$('button').tipsy({ gravity: 's', fade: true }); $('.content-box-minimizer').tipsy({ gravity: 's', fade: true }); $('.dblink').tipsy({ gravity: 'w', fade: true, html: true }); $('.mnlink').tipsy({ gravity: 'n', fade: true, html: true }); // jQuery jWYSIWYG Editor $('.wysiwyg').wysiwyg({ iFrameClass: 'wysiwyg-iframe' }); $(".textarea").wysiwyg(); // IE7 doesn't support :disabled $('.ie7').find(':disabled').addClass('disabled'); // IE7 notification fix $('.ie7').find('.muon .small-notification').wrapInner(''); // Auto highlight mandatory inputs $(' *').appendTo('.mandatory'); // Check all checkboxes $('.check-all').click( function() { $(this).parents('form').find('input:checkbox').attr('checked', $(this).is(':checked')); } ) // Minimize Content Article $('.minimizer header').each(function() { var h2Width = $(this).find('h2').width(); $(this).append('切换'); // Add minimizer iocn $(this).find('.content-box-minimizer').css({ 'display': 'block', 'left': h2Width + 35 }).parent().find('h2').css({ 'padding-right': '120px' }); // Change style for minimizer }); $('.minimizer .content-box-minimizer').click( // On click toggle content window and add class 'toggled' function() { $(this).toggleClass('toggled'); $(this).parent().find('nav').toggle(); $(this).parent().parent().toggleClass('toggled').find('section, footer').toggle(); return false; } ); // Notifications $('.notification-details').hide(); // Hide notification details //$('.show-notification-details').click( //On click toggle notification details $('.show-notification-details').live('click', function(e) { //function() { $(this).next('.notification-details').slideToggle(); return false; //} }); /** $('.close-notification').click( // On click slide up notification function() { $(this).parent().fadeTo(350, 0, function() { $(this).slideUp(600); }); return false; } ); **/ $('.close-notification').live('click', function(e) { //$(this).parent().fadeTo(350, 0, function() { $(this).slideUp(600); }); $(this).parent().hide('slow'); return false; }); // Targeting Opera 11 and older Opera browsers if (window.opera && window.opera.version() < 12) { document.documentElement.className += ' opera11'; }; //$('.ie8').find('.visualize').trigger('visualizeRedraw'); // Content box tabs and sidetabs $('.tab, .sidetab').hide(); // Hide the content divs $('.default-tab, .default-sidetab').show(); // Show the div with class 'default-tab' $('.tab-switch a.default-tab, .sidetab-switch a.default-sidetab').addClass('current'); // Set the class of the default tab link to 'current' // Note: Tab ID have to be 'tabN', where N is number, or you would have to change regular expression to get hash working. Same applies for sidetabs. // For more info about regular expressions please visit www.regular-expressions.info if (window.location.hash && window.location.hash.match(/^#tab\d+$/)) { // Check for tab Hash ID, if exist opens corresponding tab var tabID = window.location.hash; // Set variable tabID to the value of URL Hash $('.tab-switch a[href=' + tabID + ']').addClass('current').parent().siblings().find('a').removeClass('current'); // Find corresponding link and set is as current $('div' + tabID).parent().find('.tab').hide(); // Hide all content divs $('div' + tabID).show('fast' ); // Show the content div with the id equal to the id of URL Hash $('div' + tabID).find('.visualize').trigger('visualizeRefresh'); ; // Refresh jQuery Visualize } else if (window.location.hash && window.location.hash.match(/^#sidetab\d+$/)) { // Check for sidetab Hash ID, if exist opens corresponding sidetab var sidetabID = window.location.hash; // Set variable sidetabID to the value of URL Hash $('.sidetab-switch a[href=' + sidetabID + ']').addClass('current'); // Find corresponding link and set is as current $('div' + sidetabID).parent().find('.sidetab').hide(); // Hide all content divs $('div' + sidetabID).show(); // Show the content div with the id equal to the id of URL Hash $('div' + sidetabID).find('.visualize').trigger('visualizeRefresh'); // Refresh jQuery Visualize } $('.tab-switch a').click( function() { var tab = $(this).attr('href'); // Set variable 'tab' to the value of href of clicked tab $(this).parent().siblings().find('a').removeClass('current'); // Remove 'current' class from all tabs $(this).addClass('current'); // Add class 'current' to clicked tab $(tab).siblings('.tab').hide(); // Hide all content divs $(tab).show('fast'); // Show the content div with the id equal to the id of clicked tab $(tab).find('.visualize').trigger('visualizeRefresh'); // Refresh jQuery Visualize return false; } ); $('.sidetab-switch a').click( function() { var sidetab = $(this).attr('href'); // Set variable 'sidetab' to the value of href of clicked sidetab $(this).parent().siblings().find('a').removeClass('current'); // Remove 'current' class from all sidetabs $(this).addClass('current'); // Add class 'current' to clicked sidetab $(sidetab).siblings('.sidetab').hide(); // Hide all content divs $(sidetab).show('fast'); // Show the content div with the id equal to the id of clicked tab $(sidetab).find('.visualize').trigger('visualizeRefresh'); // Refresh jQuery Visualize return false; } ); // Table actions var optWidth = $('.table-switch').outerWidth(); var btnWidth = $('.toggle-table-switch').outerWidth(); $('.table-switch').hide().css({ 'margin-left': -(optWidth - btnWidth) / 2 }); $('.ie7 .table-switch').css({ 'margin-left': -btnWidth + 3 }); // Don't ask why... $('.toggle-table-switch').live('click', function(e) { //event.preventDefault(); //function() { $(document).click(); $(this).parent().parent().siblings().find('.toggle-table-switch').removeClass('active').next().slideUp(); // Hide all menus expect the one clicked $(this).toggleClass('active').next().slideToggle(); // Toggle clicked menu $(document).click(function() { // Hide menu when clicked outside of it $('.table-switch').slideUp(); $('.toggle-table-switch').removeClass('active') }); return false; //} }); // Content Header Options var optWidth = $('.options-switch').width(); var btnWidth = $('.toggle-options-switch').width(); $('.options-switch').hide().css({ 'margin-left': -(optWidth - btnWidth) / 2 }); $('.toggle-options-switch').click( function() { $(this).parent().parent().parent().siblings().find('.toggle-options-switch').removeClass('active').next().slideUp(); // Hide all menus expect the one clicked $(this).toggleClass('active').next().slideToggle(); // Toggle clicked menu $(document).click(function() { // Hide menu when clicked outside of it $('.options-switch').slideUp(); $('.toggle-options-switch').removeClass('active') }); return false; } ); // Image actions $('.image-frame').hover( // On hover toggle image action menu function() { var imgHeight = $(this).find('img').height(); // Get image height $(this).find('.image-actions').css({ 'height': imgHeight - 12 }).animate({ width: 'toggle' }, 250); // Resize image actions to image heigh - padding and slide it } ); // Accordions $('.accordion li div').hide(); // Hide all content $('.accordion li:first-child div').show(); // Show first accordion content by default $('.accordion .accordion-switch').click( // On click hide all accordion content and open clicked one function() { $(this).parent().siblings().find('div').slideUp(); $(this).next().slideToggle(); return false; } ); /** //$('dl dd').hide(); // Hide all content //$('dl:first-child dd').show(); // Show first accordion content by default $('dl.accordions dt').click( // On click hide all accordion content and open clicked one function() { $(this).parent().siblings().find('dd').slideUp(); $(this).next().slideToggle(); return false; } ); **/ $('dl dd').hide(); // Hide all content $('dl:first-child dd').show(); // Show first accordion content by default //$('dl.accordion dt:first-child + dd').siblings('dd').hide(); //$('dl dt').click( // On click hide all accordion content and open clicked one $('dl dt').live('click', function(e) { //function() { //$(this).parent().siblings().find('dd').slideUp(); //$(this).next().slideToggle(); $(this).next('dd').slideDown().siblings('dd').slideUp().prev('dt'); $(this).addClass('opened').siblings('dt').removeClass('opened'); return false; //} }); $('dl.accordions dt:first-child + dd').siblings('dd').hide(); // Wizard $('.wizard-content').hide(); // Hide all steps $('.wizard-content:first').show(); // Show default step $('.wizard-steps li:first-child').addClass('wizard-step-done').find('a').addClass('current'); $('.wizard-steps a').click( function() { var step = $(this).attr('href'); // Set variable 'step' to the value of href of clicked wizard step $('.wizard-steps a').removeClass('current'); $(this).addClass('current').parent('li').addClass('wizard-step-done'); $(this).parent('li').prevAll().addClass('wizard-step-done'); // Mark all prev steps as done $(this).parent('li').nextAll().removeClass('wizard-step-done'); // Mark all next steps as undone $(step).siblings('.wizard-content').hide(); // Hide all content divs $(step).fadeIn(); // Show the content div with the id equal to the id of clicked step return false; } ); $('.wizard-next').click( function() { var step = $(this).attr('href'); // Set variable 'step' to the value of href of clicked wizard step $('.wizard-steps a').removeClass('current'); $('.wizard-steps a[href="' + step + '"]').addClass('current').parent('li').addClass('wizard-step-done'); $('.wizard-steps a[href="' + step + '"]').parent('li').prevAll().addClass('wizard-step-done'); // Mark all prev steps as done $('.wizard-steps a[href="' + step + '"]').parent('li').nextAll().removeClass('wizard-step-done'); // Mark all next steps as undone $(step).siblings('.wizard-content').hide(); // Hide all content divs $(step).fadeIn(); // Show the content div with the id equal to the id of clicked step return false; } ); //$('.datatable').dataTable({ 'sPaginationType': 'full_numbers', 'aaSorting': [[0, 'desc']] }); $('.datatable').dataTable({ sDom: '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>', bProcessing: true, sPaginationType: 'full_numbers', 'aaSorting': [[0, 'desc']] }); //$('.datatable').dataTable({ sDom: 'lfr<"giveHeight"t>ip' }); //$('.loading').hide(); $.fn.enableBt = function() { $(this).prop('disabled', false); if ($.browser.msie && $.browser.version < 9) { $(this).removeClass('disabled'); } } $.fn.disableBt = function() { $(this).prop('disabled', true); if ($.browser.msie && $.browser.version < 9) { $(this).addClass('disabled'); } } $('.FirstDD').addClass('opened'); $('.FirstDD').css('display','block'); // Progress bar animation $('.progress-bar').each(function() { var progress = $(this).children().width(); $(this).children().css({ 'width': 0 }).animate({ width: progress }, 3000); }); function getEleAttrVID(oID,oAttr) { var txt = document.getElementById(oID).attributes[oAttr].value; return txt; } $.fn.dataTableExt.oApi.fnGetFilteredData = function(oSettings) { var a = []; for (var i = 0, iLen = oSettings.aiDisplay.length; i < iLen; i++) { a.push(oSettings.aoData[oSettings.aiDisplay[i]]._aData); } return a; } document.writeln('