Plugin Directory

Changeset 1982959


Ignore:
Timestamp:
11/30/2018 01:04:04 AM (7 years ago)
Author:
GTmetrix
Message:

updated loading gif

Location:
gtmetrix-for-wordpress
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • gtmetrix-for-wordpress/tags/0.4.3/gtmetrix-for-wordpress-src.js

    r1982942 r1982959  
    6262    $('#gfw-parameters').submit(function(event) {
    6363        event.preventDefault();
    64         $('#gfw-screenshot').css('background-image','url(../wp-content/plugins/gtmetrix-for-wordpress/images/loading-screenshot.png)');
     64        $('#gfw-screenshot').css('background-image','url(../wp-content/plugins/gtmetrix-for-wordpress/images/loading.gif)');
    6565        $('#gfw-screenshot .gfw-message').text('').hide();
    6666        $('#gfw-scanner').show();
  • gtmetrix-for-wordpress/tags/0.4.3/gtmetrix-for-wordpress.css

    r1982942 r1982959  
    374374
    375375#gfw-screenshot {
    376     background: url('images/loading-screenshot.png') no-repeat center center transparent;
     376    background: url('images/loading.gif') no-repeat center center transparent;
    377377    border: 2px solid #E4E4E4;
    378378    border-radius: 8px 8px 8px 8px;
  • gtmetrix-for-wordpress/tags/0.4.3/gtmetrix-for-wordpress.js

    r1982942 r1982959  
    1 jQuery(function(a){function b(){var b=document.createElement("input"),c="placeholder"in b;c||a(".gfw-placeholder-alternative").show()}function c(b){var d=a("#gfw-scanner"),e=d.height()?!0:!1;e||d.height()?d.animate({top:(b?"-":"+")+"=221"},2e3,function(){a("#gfw-scan").dialog("isOpen")?c(!b):a("#gfw-scanner").css("top",-7)}):(setTimeout(function(){c()},500),e=!0)}a.inArray(pagenow,Array("toplevel_page_gfw_settings","gtmetrix_page_gfw_settings","toplevel_page_gfw_tests","gtmetrix_page_gfw_schedule"))>0&&(a(".if-js-closed").removeClass("if-js-closed").addClass("closed"),postboxes.add_postbox_toggles(pagenow)),a.fn.tooltip&&a(".tooltip").tooltip({show:!1,hide:!1}),a("#gfw_url").length&&a("#gfw_url").autocomplete({source:function(b,c){a.ajax({url:ajaxurl,dataType:"json",data:{action:"autocomplete",term:b.term},success:function(b){c(a.map(b,function(a){return{label:a.title,value:a.permalink}}))}})},minLength:2}),b(),a("#gfw-scan").dialog({autoOpen:!1,height:"auto",width:350,draggable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}}}),a("#gfw-parameters").submit(function(b){b.preventDefault(),a("#gfw-screenshot").css("background-image","url(../wp-content/plugins/gtmetrix-for-wordpress/images/loading-screenshot.png)"),a("#gfw-screenshot .gfw-message").text("").hide(),a("#gfw-scanner").show(),a("#gfw-scan").dialog("open"),c(0),a.ajax({url:ajaxurl,dataType:"json",type:"POST",data:{action:"save_report",fields:a(this).serialize(),security:gfwObject.gfwnonce},cache:!1,success:function(b){b.error?(a("#gfw-scanner").hide(),a("#gfw-screenshot").css("background-image","url(../wp-content/plugins/gtmetrix-for-wordpress/images/exclamation.png)"),a("#gfw-screenshot .gfw-message").html(b.error).show()):(a("#gfw-screenshot").css("background-image","url("+b.screenshot+")"),window.setTimeout(function(){a("#gfw-scan").dialog("close"),location.reload()},1e3))}})}),a("table.gfw-table").on("click","td.gfw-toggle",function(){if(a(this).parents("tr").hasClass("report-expanded"))a(this).parents("tr").removeClass("report-expanded").addClass("report-collapsed").next().hide();else if(a(this).parents("tr").hasClass("report-collapsed"))a(this).parents("tr").removeClass("report-collapsed").addClass("report-expanded").next().show();else{var b='<tr><td colspan="'+a(this).parents("tr").find("td").length+'" style="padding:0"></td></tr>';a(this).parents("tr").addClass("report-expanded").after(b);var c=a(this).parents("tr").attr("id").substring(5);a(this).parents("tr").next().find("td").load(ajaxurl,{action:"expand_report",id:c})}return!1}),a(document).on("click",".gfw-open-graph",function(b){b.preventDefault();var c=a(this).attr("href"),d=a(this).attr("id");a.ajax({url:ajaxurl,cache:!1,dataType:"json",data:{action:"report_graph",id:c,graph:d},success:function(b){var c={series:{lines:{show:!0},points:{show:!0}},xaxis:{mode:"time",timeformat:"%b %d %H:%M%P"},grid:{backgroundColor:{colors:["#fff","#eee"]}},legend:{container:"#gfw-graph-legend",noColumns:2}};switch(d){case"gfw-scores-graph":graphTitle="PageSpeed and YSlow Scores",c.yaxis={ticks:5,min:0,max:100,tickFormatter:function(a){return a+"%"}};break;case"gfw-times-graph":graphTitle="Page Load Times",c.yaxis={ticks:5,min:0,tickFormatter:function(a){return a.toFixed(1)+" s"}};break;case"gfw-sizes-graph":graphTitle="Page Sizes",c.yaxis={ticks:5,min:0,tickFormatter:function(a){return a+" KB"}}}var e=a("#gfw-flot-placeholder");a("#gfw-graph").dialog("open"),a("#gfw-graph").dialog("option","title",graphTitle),a.plot(e,b,c)}})}),a("#gfw-confirm-delete").dialog({autoOpen:!1,resizable:!1,modal:!0,buttons:{Yes:function(){window.location.href=a(this).data("url")},No:function(){a(this).dialog("close")}}}),a(document).on("click",".gfw-delete-icon",function(b){b.preventDefault(),a("#gfw-confirm-delete").data("url",b.target),a("#gfw-confirm-delete").dialog("open")}),a("#gfw-video").dialog({autoOpen:!1,height:"auto",width:"auto",draggable:!0,resizable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}},close:function(){a("#gfw-video iframe").remove()}}),a(document).on("click",".gfw-video-icon",function(b){b.preventDefault(),a("#gfw-video").prepend(a('<iframe height="483" width="560" scrolling="no" frameborder="0" mozallowfullscreen="true" webkitallowfullscreen="true" allowfullscreen="true" />').attr("src",a(this).attr("href"))).dialog("open")}),a("#gfw-graph").dialog({autoOpen:!1,height:"auto",width:850,draggable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}}}),a(".gfw-conditions").on("change",'select[name^="gfw_condition"]',function(){a(this).siblings("select:not(."+a(this).val()+")").hide(),a(this).siblings("select."+a(this).val()).show()}),a("#gfw-add-condition a").bind("click",function(){a(".gfw-conditions:hidden:first").show().find(".gfw-condition").removeAttr("disabled").trigger("change"),4==a(".gfw-conditions:visible").length&&a(this).parents("tr").hide()}),a(document).on("click",".gfw-remove-condition",function(){a(this).parents("tr").hide().find(".gfw-condition").attr("disabled","disabled"),a("#gfw-add-condition").show()}),a("#gfw-notifications").attr("checked")||a(".gfw-conditions select:visible").attr("disabled","disabled"),a("input#gfw-notifications").bind("change",function(){return a(this).is(":checked")?(a(".gfw-conditions select:visible").removeAttr("disabled"),4>a(".gfw-conditions:visible").length&&a("#gfw-add-condition").show()):(a(".gfw-conditions select:visible").attr("disabled","disabled"),a("#gfw-add-condition").hide()),!1}),a("#gfw-test-front").bind("click",function(){return a("#gfw_url").val(a("#gfw-front-url").val()),a("#gfw-parameters").submit(),!1}),a("#gfw-reset").bind("click",function(){a.ajax({url:ajaxurl,cache:!1,data:{action:"reset",security:gfwObject.gfwnonce},success:function(){a("#gfw-reset").val("Done").attr("disabled","disabled")}})})});
     1jQuery(function(a){function b(){var b=document.createElement("input"),c="placeholder"in b;c||a(".gfw-placeholder-alternative").show()}function c(b){var d=a("#gfw-scanner"),e=d.height()?!0:!1;e||d.height()?d.animate({top:(b?"-":"+")+"=221"},2e3,function(){a("#gfw-scan").dialog("isOpen")?c(!b):a("#gfw-scanner").css("top",-7)}):(setTimeout(function(){c()},500),e=!0)}a.inArray(pagenow,Array("toplevel_page_gfw_settings","gtmetrix_page_gfw_settings","toplevel_page_gfw_tests","gtmetrix_page_gfw_schedule"))>0&&(a(".if-js-closed").removeClass("if-js-closed").addClass("closed"),postboxes.add_postbox_toggles(pagenow)),a.fn.tooltip&&a(".tooltip").tooltip({show:!1,hide:!1}),a("#gfw_url").length&&a("#gfw_url").autocomplete({source:function(b,c){a.ajax({url:ajaxurl,dataType:"json",data:{action:"autocomplete",term:b.term},success:function(b){c(a.map(b,function(a){return{label:a.title,value:a.permalink}}))}})},minLength:2}),b(),a("#gfw-scan").dialog({autoOpen:!1,height:"auto",width:350,draggable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}}}),a("#gfw-parameters").submit(function(b){b.preventDefault(),a("#gfw-screenshot").css("background-image","url(../wp-content/plugins/gtmetrix-for-wordpress/images/loading.gif)"),a("#gfw-screenshot .gfw-message").text("").hide(),a("#gfw-scanner").show(),a("#gfw-scan").dialog("open"),c(0),a.ajax({url:ajaxurl,dataType:"json",type:"POST",data:{action:"save_report",fields:a(this).serialize(),security:gfwObject.gfwnonce},cache:!1,success:function(b){b.error?(a("#gfw-scanner").hide(),a("#gfw-screenshot").css("background-image","url(../wp-content/plugins/gtmetrix-for-wordpress/images/exclamation.png)"),a("#gfw-screenshot .gfw-message").html(b.error).show()):(a("#gfw-screenshot").css("background-image","url("+b.screenshot+")"),window.setTimeout(function(){a("#gfw-scan").dialog("close"),location.reload()},1e3))}})}),a("table.gfw-table").on("click","td.gfw-toggle",function(){if(a(this).parents("tr").hasClass("report-expanded"))a(this).parents("tr").removeClass("report-expanded").addClass("report-collapsed").next().hide();else if(a(this).parents("tr").hasClass("report-collapsed"))a(this).parents("tr").removeClass("report-collapsed").addClass("report-expanded").next().show();else{var b='<tr><td colspan="'+a(this).parents("tr").find("td").length+'" style="padding:0"></td></tr>';a(this).parents("tr").addClass("report-expanded").after(b);var c=a(this).parents("tr").attr("id").substring(5);a(this).parents("tr").next().find("td").load(ajaxurl,{action:"expand_report",id:c})}return!1}),a(document).on("click",".gfw-open-graph",function(b){b.preventDefault();var c=a(this).attr("href"),d=a(this).attr("id");a.ajax({url:ajaxurl,cache:!1,dataType:"json",data:{action:"report_graph",id:c,graph:d},success:function(b){var c={series:{lines:{show:!0},points:{show:!0}},xaxis:{mode:"time",timeformat:"%b %d %H:%M%P"},grid:{backgroundColor:{colors:["#fff","#eee"]}},legend:{container:"#gfw-graph-legend",noColumns:2}};switch(d){case"gfw-scores-graph":graphTitle="PageSpeed and YSlow Scores",c.yaxis={ticks:5,min:0,max:100,tickFormatter:function(a){return a+"%"}};break;case"gfw-times-graph":graphTitle="Page Load Times",c.yaxis={ticks:5,min:0,tickFormatter:function(a){return a.toFixed(1)+" s"}};break;case"gfw-sizes-graph":graphTitle="Page Sizes",c.yaxis={ticks:5,min:0,tickFormatter:function(a){return a+" KB"}}}var e=a("#gfw-flot-placeholder");a("#gfw-graph").dialog("open"),a("#gfw-graph").dialog("option","title",graphTitle),a.plot(e,b,c)}})}),a("#gfw-confirm-delete").dialog({autoOpen:!1,resizable:!1,modal:!0,buttons:{Yes:function(){window.location.href=a(this).data("url")},No:function(){a(this).dialog("close")}}}),a(document).on("click",".gfw-delete-icon",function(b){b.preventDefault(),a("#gfw-confirm-delete").data("url",b.target),a("#gfw-confirm-delete").dialog("open")}),a("#gfw-video").dialog({autoOpen:!1,height:"auto",width:"auto",draggable:!0,resizable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}},close:function(){a("#gfw-video iframe").remove()}}),a(document).on("click",".gfw-video-icon",function(b){b.preventDefault(),a("#gfw-video").prepend(a('<iframe height="483" width="560" scrolling="no" frameborder="0" mozallowfullscreen="true" webkitallowfullscreen="true" allowfullscreen="true" />').attr("src",a(this).attr("href"))).dialog("open")}),a("#gfw-graph").dialog({autoOpen:!1,height:"auto",width:850,draggable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}}}),a(".gfw-conditions").on("change",'select[name^="gfw_condition"]',function(){a(this).siblings("select:not(."+a(this).val()+")").hide(),a(this).siblings("select."+a(this).val()).show()}),a("#gfw-add-condition a").bind("click",function(){a(".gfw-conditions:hidden:first").show().find(".gfw-condition").removeAttr("disabled").trigger("change"),4==a(".gfw-conditions:visible").length&&a(this).parents("tr").hide()}),a(document).on("click",".gfw-remove-condition",function(){a(this).parents("tr").hide().find(".gfw-condition").attr("disabled","disabled"),a("#gfw-add-condition").show()}),a("#gfw-notifications").attr("checked")||a(".gfw-conditions select:visible").attr("disabled","disabled"),a("input#gfw-notifications").bind("change",function(){return a(this).is(":checked")?(a(".gfw-conditions select:visible").removeAttr("disabled"),4>a(".gfw-conditions:visible").length&&a("#gfw-add-condition").show()):(a(".gfw-conditions select:visible").attr("disabled","disabled"),a("#gfw-add-condition").hide()),!1}),a("#gfw-test-front").bind("click",function(){return a("#gfw_url").val(a("#gfw-front-url").val()),a("#gfw-parameters").submit(),!1}),a("#gfw-reset").bind("click",function(){a.ajax({url:ajaxurl,cache:!1,data:{action:"reset",security:gfwObject.gfwnonce},success:function(){a("#gfw-reset").val("Done").attr("disabled","disabled")}})})});
  • gtmetrix-for-wordpress/trunk/gtmetrix-for-wordpress-src.js

    r1982942 r1982959  
    6262    $('#gfw-parameters').submit(function(event) {
    6363        event.preventDefault();
    64         $('#gfw-screenshot').css('background-image','url(../wp-content/plugins/gtmetrix-for-wordpress/images/loading-screenshot.png)');
     64        $('#gfw-screenshot').css('background-image','url(../wp-content/plugins/gtmetrix-for-wordpress/images/loading.gif)');
    6565        $('#gfw-screenshot .gfw-message').text('').hide();
    6666        $('#gfw-scanner').show();
  • gtmetrix-for-wordpress/trunk/gtmetrix-for-wordpress.css

    r1982942 r1982959  
    374374
    375375#gfw-screenshot {
    376     background: url('images/loading-screenshot.png') no-repeat center center transparent;
     376    background: url('images/loading.gif') no-repeat center center transparent;
    377377    border: 2px solid #E4E4E4;
    378378    border-radius: 8px 8px 8px 8px;
  • gtmetrix-for-wordpress/trunk/gtmetrix-for-wordpress.js

    r1982942 r1982959  
    1 jQuery(function(a){function b(){var b=document.createElement("input"),c="placeholder"in b;c||a(".gfw-placeholder-alternative").show()}function c(b){var d=a("#gfw-scanner"),e=d.height()?!0:!1;e||d.height()?d.animate({top:(b?"-":"+")+"=221"},2e3,function(){a("#gfw-scan").dialog("isOpen")?c(!b):a("#gfw-scanner").css("top",-7)}):(setTimeout(function(){c()},500),e=!0)}a.inArray(pagenow,Array("toplevel_page_gfw_settings","gtmetrix_page_gfw_settings","toplevel_page_gfw_tests","gtmetrix_page_gfw_schedule"))>0&&(a(".if-js-closed").removeClass("if-js-closed").addClass("closed"),postboxes.add_postbox_toggles(pagenow)),a.fn.tooltip&&a(".tooltip").tooltip({show:!1,hide:!1}),a("#gfw_url").length&&a("#gfw_url").autocomplete({source:function(b,c){a.ajax({url:ajaxurl,dataType:"json",data:{action:"autocomplete",term:b.term},success:function(b){c(a.map(b,function(a){return{label:a.title,value:a.permalink}}))}})},minLength:2}),b(),a("#gfw-scan").dialog({autoOpen:!1,height:"auto",width:350,draggable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}}}),a("#gfw-parameters").submit(function(b){b.preventDefault(),a("#gfw-screenshot").css("background-image","url(../wp-content/plugins/gtmetrix-for-wordpress/images/loading-screenshot.png)"),a("#gfw-screenshot .gfw-message").text("").hide(),a("#gfw-scanner").show(),a("#gfw-scan").dialog("open"),c(0),a.ajax({url:ajaxurl,dataType:"json",type:"POST",data:{action:"save_report",fields:a(this).serialize(),security:gfwObject.gfwnonce},cache:!1,success:function(b){b.error?(a("#gfw-scanner").hide(),a("#gfw-screenshot").css("background-image","url(../wp-content/plugins/gtmetrix-for-wordpress/images/exclamation.png)"),a("#gfw-screenshot .gfw-message").html(b.error).show()):(a("#gfw-screenshot").css("background-image","url("+b.screenshot+")"),window.setTimeout(function(){a("#gfw-scan").dialog("close"),location.reload()},1e3))}})}),a("table.gfw-table").on("click","td.gfw-toggle",function(){if(a(this).parents("tr").hasClass("report-expanded"))a(this).parents("tr").removeClass("report-expanded").addClass("report-collapsed").next().hide();else if(a(this).parents("tr").hasClass("report-collapsed"))a(this).parents("tr").removeClass("report-collapsed").addClass("report-expanded").next().show();else{var b='<tr><td colspan="'+a(this).parents("tr").find("td").length+'" style="padding:0"></td></tr>';a(this).parents("tr").addClass("report-expanded").after(b);var c=a(this).parents("tr").attr("id").substring(5);a(this).parents("tr").next().find("td").load(ajaxurl,{action:"expand_report",id:c})}return!1}),a(document).on("click",".gfw-open-graph",function(b){b.preventDefault();var c=a(this).attr("href"),d=a(this).attr("id");a.ajax({url:ajaxurl,cache:!1,dataType:"json",data:{action:"report_graph",id:c,graph:d},success:function(b){var c={series:{lines:{show:!0},points:{show:!0}},xaxis:{mode:"time",timeformat:"%b %d %H:%M%P"},grid:{backgroundColor:{colors:["#fff","#eee"]}},legend:{container:"#gfw-graph-legend",noColumns:2}};switch(d){case"gfw-scores-graph":graphTitle="PageSpeed and YSlow Scores",c.yaxis={ticks:5,min:0,max:100,tickFormatter:function(a){return a+"%"}};break;case"gfw-times-graph":graphTitle="Page Load Times",c.yaxis={ticks:5,min:0,tickFormatter:function(a){return a.toFixed(1)+" s"}};break;case"gfw-sizes-graph":graphTitle="Page Sizes",c.yaxis={ticks:5,min:0,tickFormatter:function(a){return a+" KB"}}}var e=a("#gfw-flot-placeholder");a("#gfw-graph").dialog("open"),a("#gfw-graph").dialog("option","title",graphTitle),a.plot(e,b,c)}})}),a("#gfw-confirm-delete").dialog({autoOpen:!1,resizable:!1,modal:!0,buttons:{Yes:function(){window.location.href=a(this).data("url")},No:function(){a(this).dialog("close")}}}),a(document).on("click",".gfw-delete-icon",function(b){b.preventDefault(),a("#gfw-confirm-delete").data("url",b.target),a("#gfw-confirm-delete").dialog("open")}),a("#gfw-video").dialog({autoOpen:!1,height:"auto",width:"auto",draggable:!0,resizable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}},close:function(){a("#gfw-video iframe").remove()}}),a(document).on("click",".gfw-video-icon",function(b){b.preventDefault(),a("#gfw-video").prepend(a('<iframe height="483" width="560" scrolling="no" frameborder="0" mozallowfullscreen="true" webkitallowfullscreen="true" allowfullscreen="true" />').attr("src",a(this).attr("href"))).dialog("open")}),a("#gfw-graph").dialog({autoOpen:!1,height:"auto",width:850,draggable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}}}),a(".gfw-conditions").on("change",'select[name^="gfw_condition"]',function(){a(this).siblings("select:not(."+a(this).val()+")").hide(),a(this).siblings("select."+a(this).val()).show()}),a("#gfw-add-condition a").bind("click",function(){a(".gfw-conditions:hidden:first").show().find(".gfw-condition").removeAttr("disabled").trigger("change"),4==a(".gfw-conditions:visible").length&&a(this).parents("tr").hide()}),a(document).on("click",".gfw-remove-condition",function(){a(this).parents("tr").hide().find(".gfw-condition").attr("disabled","disabled"),a("#gfw-add-condition").show()}),a("#gfw-notifications").attr("checked")||a(".gfw-conditions select:visible").attr("disabled","disabled"),a("input#gfw-notifications").bind("change",function(){return a(this).is(":checked")?(a(".gfw-conditions select:visible").removeAttr("disabled"),4>a(".gfw-conditions:visible").length&&a("#gfw-add-condition").show()):(a(".gfw-conditions select:visible").attr("disabled","disabled"),a("#gfw-add-condition").hide()),!1}),a("#gfw-test-front").bind("click",function(){return a("#gfw_url").val(a("#gfw-front-url").val()),a("#gfw-parameters").submit(),!1}),a("#gfw-reset").bind("click",function(){a.ajax({url:ajaxurl,cache:!1,data:{action:"reset",security:gfwObject.gfwnonce},success:function(){a("#gfw-reset").val("Done").attr("disabled","disabled")}})})});
     1jQuery(function(a){function b(){var b=document.createElement("input"),c="placeholder"in b;c||a(".gfw-placeholder-alternative").show()}function c(b){var d=a("#gfw-scanner"),e=d.height()?!0:!1;e||d.height()?d.animate({top:(b?"-":"+")+"=221"},2e3,function(){a("#gfw-scan").dialog("isOpen")?c(!b):a("#gfw-scanner").css("top",-7)}):(setTimeout(function(){c()},500),e=!0)}a.inArray(pagenow,Array("toplevel_page_gfw_settings","gtmetrix_page_gfw_settings","toplevel_page_gfw_tests","gtmetrix_page_gfw_schedule"))>0&&(a(".if-js-closed").removeClass("if-js-closed").addClass("closed"),postboxes.add_postbox_toggles(pagenow)),a.fn.tooltip&&a(".tooltip").tooltip({show:!1,hide:!1}),a("#gfw_url").length&&a("#gfw_url").autocomplete({source:function(b,c){a.ajax({url:ajaxurl,dataType:"json",data:{action:"autocomplete",term:b.term},success:function(b){c(a.map(b,function(a){return{label:a.title,value:a.permalink}}))}})},minLength:2}),b(),a("#gfw-scan").dialog({autoOpen:!1,height:"auto",width:350,draggable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}}}),a("#gfw-parameters").submit(function(b){b.preventDefault(),a("#gfw-screenshot").css("background-image","url(../wp-content/plugins/gtmetrix-for-wordpress/images/loading.gif)"),a("#gfw-screenshot .gfw-message").text("").hide(),a("#gfw-scanner").show(),a("#gfw-scan").dialog("open"),c(0),a.ajax({url:ajaxurl,dataType:"json",type:"POST",data:{action:"save_report",fields:a(this).serialize(),security:gfwObject.gfwnonce},cache:!1,success:function(b){b.error?(a("#gfw-scanner").hide(),a("#gfw-screenshot").css("background-image","url(../wp-content/plugins/gtmetrix-for-wordpress/images/exclamation.png)"),a("#gfw-screenshot .gfw-message").html(b.error).show()):(a("#gfw-screenshot").css("background-image","url("+b.screenshot+")"),window.setTimeout(function(){a("#gfw-scan").dialog("close"),location.reload()},1e3))}})}),a("table.gfw-table").on("click","td.gfw-toggle",function(){if(a(this).parents("tr").hasClass("report-expanded"))a(this).parents("tr").removeClass("report-expanded").addClass("report-collapsed").next().hide();else if(a(this).parents("tr").hasClass("report-collapsed"))a(this).parents("tr").removeClass("report-collapsed").addClass("report-expanded").next().show();else{var b='<tr><td colspan="'+a(this).parents("tr").find("td").length+'" style="padding:0"></td></tr>';a(this).parents("tr").addClass("report-expanded").after(b);var c=a(this).parents("tr").attr("id").substring(5);a(this).parents("tr").next().find("td").load(ajaxurl,{action:"expand_report",id:c})}return!1}),a(document).on("click",".gfw-open-graph",function(b){b.preventDefault();var c=a(this).attr("href"),d=a(this).attr("id");a.ajax({url:ajaxurl,cache:!1,dataType:"json",data:{action:"report_graph",id:c,graph:d},success:function(b){var c={series:{lines:{show:!0},points:{show:!0}},xaxis:{mode:"time",timeformat:"%b %d %H:%M%P"},grid:{backgroundColor:{colors:["#fff","#eee"]}},legend:{container:"#gfw-graph-legend",noColumns:2}};switch(d){case"gfw-scores-graph":graphTitle="PageSpeed and YSlow Scores",c.yaxis={ticks:5,min:0,max:100,tickFormatter:function(a){return a+"%"}};break;case"gfw-times-graph":graphTitle="Page Load Times",c.yaxis={ticks:5,min:0,tickFormatter:function(a){return a.toFixed(1)+" s"}};break;case"gfw-sizes-graph":graphTitle="Page Sizes",c.yaxis={ticks:5,min:0,tickFormatter:function(a){return a+" KB"}}}var e=a("#gfw-flot-placeholder");a("#gfw-graph").dialog("open"),a("#gfw-graph").dialog("option","title",graphTitle),a.plot(e,b,c)}})}),a("#gfw-confirm-delete").dialog({autoOpen:!1,resizable:!1,modal:!0,buttons:{Yes:function(){window.location.href=a(this).data("url")},No:function(){a(this).dialog("close")}}}),a(document).on("click",".gfw-delete-icon",function(b){b.preventDefault(),a("#gfw-confirm-delete").data("url",b.target),a("#gfw-confirm-delete").dialog("open")}),a("#gfw-video").dialog({autoOpen:!1,height:"auto",width:"auto",draggable:!0,resizable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}},close:function(){a("#gfw-video iframe").remove()}}),a(document).on("click",".gfw-video-icon",function(b){b.preventDefault(),a("#gfw-video").prepend(a('<iframe height="483" width="560" scrolling="no" frameborder="0" mozallowfullscreen="true" webkitallowfullscreen="true" allowfullscreen="true" />').attr("src",a(this).attr("href"))).dialog("open")}),a("#gfw-graph").dialog({autoOpen:!1,height:"auto",width:850,draggable:!0,modal:!0,buttons:{Close:function(){a(this).dialog("close")}}}),a(".gfw-conditions").on("change",'select[name^="gfw_condition"]',function(){a(this).siblings("select:not(."+a(this).val()+")").hide(),a(this).siblings("select."+a(this).val()).show()}),a("#gfw-add-condition a").bind("click",function(){a(".gfw-conditions:hidden:first").show().find(".gfw-condition").removeAttr("disabled").trigger("change"),4==a(".gfw-conditions:visible").length&&a(this).parents("tr").hide()}),a(document).on("click",".gfw-remove-condition",function(){a(this).parents("tr").hide().find(".gfw-condition").attr("disabled","disabled"),a("#gfw-add-condition").show()}),a("#gfw-notifications").attr("checked")||a(".gfw-conditions select:visible").attr("disabled","disabled"),a("input#gfw-notifications").bind("change",function(){return a(this).is(":checked")?(a(".gfw-conditions select:visible").removeAttr("disabled"),4>a(".gfw-conditions:visible").length&&a("#gfw-add-condition").show()):(a(".gfw-conditions select:visible").attr("disabled","disabled"),a("#gfw-add-condition").hide()),!1}),a("#gfw-test-front").bind("click",function(){return a("#gfw_url").val(a("#gfw-front-url").val()),a("#gfw-parameters").submit(),!1}),a("#gfw-reset").bind("click",function(){a.ajax({url:ajaxurl,cache:!1,data:{action:"reset",security:gfwObject.gfwnonce},success:function(){a("#gfw-reset").val("Done").attr("disabled","disabled")}})})});
Note: See TracChangeset for help on using the changeset viewer.