Вход Регистрация
Файл: severus/js/main.js
Строк: 122
<?php
$(document).ready(function() {
    var 
width = $('canvas.myChart').parent().width();
    $(
'canvas.myChart').attr("width",width);

    $(
".myDonut").each(function( index ) {
        var 
ctx = $(".myDonut").get(index).getContext("2d");
        var 
used = $(this).data("used");
        var 
free = $(this).data("free");
        var 
data = [
            {
                
valueused,
                
color:"#4d4d4d"
            
},
            {
                
value free,
                
color "#787878"
            
}
        ];
        var 
options = { segmentShowStroke true,segmentStrokeWidth 2segmentStrokeColor'#fff' };
        new 
Chart(ctx).Doughnut(data,options);
    });
    $(
".myChart").each(function( index ) {
      
//console.log( index + ": " + $( this ).text() );
        //Get context with jQuery - using jQuery's .get() method.
        
        
var ctx = $(".myChart").get(index).getContext("2d");
        
//This will get the first returned node in the jQuery collection.
        
var myNewChart = new Chart(ctx);
        var 
dydata = eval("["+$(this).data("dydata")+"]");
        var 
dylabel = eval("["+$(this).data("dylabel")+"]");
        
        var 
data = {
    
labels dylabel,
    
datasets : [
        {
            
fillColor "rgba(220,220,220,0.5)",
            
strokeColor "rgba(220,220,220,1)",
            
pointColor "rgba(220,220,220,1)",
            
pointStrokeColor "#fff",
            
data dydata,
        },
    ]        
        }
        var 
options = {
            
bezierCurve false,
            
pointDotRadius 1,
            
scaleLineWidth 1,
            
pointDotRadius 1,
            
datasetStrokeWidth 1,

        }
        
        new 
Chart(ctx).Line(data,options);
    });
    $(
"#first_install").lightbox_me({
        
centeredtrue
        
overlayCSS: {
            
background'black'
            
opacity.95
        
}
    });
    $(
'#first_install_close').click(function(e) {
        $(
"#first_install").trigger('close');
        
e.preventDefault();
    });

    $(
'#configure_services').click(function(e) {
        $(
"#allservices").lightbox_me({
            
centeredtrue
            
overlayCSS: {
                
background'black'
                
opacity.95
            
}
        });
         
e.preventDefault();
    });
    $(
'#configure_services_close').click(function(e) {
        $(
"#allservices").trigger('close');
        
e.preventDefault();
    });

    $(
'#click_desc_edit').click(function(e) {
        $(
"#desc_edit").lightbox_me({
            
centeredtrue
            
overlayCSS: {
                
background'black'
                
opacity.95
            
}
        });
         
e.preventDefault();
    });
    $(
'#click_desc_edit_close').click(function(e) {
        $(
"#desc_edit").trigger('close');
        
e.preventDefault();
    });

    $(
'.flashmessage').delay(2000).fadeOut('slow');

    $(
window).on("scroll", function() {
        var 
fromTop = $("body").scrollTop();
        $(
'#sticky-main-nav').toggleClass("show", (fromTop 200));
    });
    
    $(
".expand").on("click", function(e) {
        $(
this).toggleClass"point-up point-down" );
        var 
box = $(this).parent().siblings(".inner-box");
        $(
".additional"box).toggleClass"showadditional" );
        
e.preventDefault();
    });
    
    $(
"div.tab_container").css("height", $(this).find("div.showscale").outerHeight()+"px");
    
//$( ".tabs" ).tabs();
    
$( ".tabs li a" ).on("click", function() { 
        $( 
".tabs li" ).removeClass("active");
        $( 
this ).parent().addClass("active");
        var 
ind = $(".tabs li a").index(this);
        
        var 
allbox = $( ".tabs .addontab .inner" );
        var 
box = $( ".tabs .addontab .inner" ).eq(ind);
        var 
current = $( ".tabs .addontab .showscale" );
        var 
newheight box.outerHeight();
        
current.removeClass("showscale");
        
current.one('transitionend', function(e) {  
            
box.closest("div.tab_container").css("height"newheight+"px");
            
box.addClass("showscale"); 
        });  
        if($(
this).data("follow") == true) return true;
        else return 
false;
    });
    
});
?>
Онлайн: 0
Реклама