| Server IP : 85.158.181.41 / Your IP : 216.73.217.12 Web Server : Apache System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64 User : moncbefd ( 1024) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/moncbefd/www.moneta.at/admin/html/assets/javascript/engine/widgets/ |
Upload File : |
"use strict";gx.widgets.module("statistic_chart",[jse.source+"/vendor/raphael/raphael.js",jse.source+"/vendor/morris.js/morris.min.css",jse.source+"/vendor/morris.js/morris.min.js"],function(t){var a=$(this),e=t.userId,r=$(".statistic-chart-dropdown"),i={sales:{apiUrl:"./admin.php?do=Dashboard/getSalesStatisticsData",title:jse.core.lang.translate("STATISTICS_SALES","start")},visitors:{apiUrl:"./admin.php?do=Dashboard/getVisitorsStatisticsData",title:jse.core.lang.translate("STATISTICS_VISITORS","start")},newCustomers:{apiUrl:"./admin.php?do=Dashboard/getNewCustomerStatisticsData",title:jse.core.lang.translate("STATISTICS_NEW_CUSTOMERS","start")},orders:{apiUrl:"./admin.php?do=Dashboard/getOrderStatisticsData",title:jse.core.lang.translate("STATISTICS_ORDERS_COUNT","start")}},s={},n=function(t){var e=a.find(".loader"),r=e.length,i="loader fa fa-fw fa-spinner fa-spin",s=$('<i class="'+i+'"></i>');r&&e.remove(),t&&a.append(s)},o=function(t,s,o){if(a.empty(),o||(o=r.find("option:selected").val()),o&&o in i==!1)throw new Error("Invalid item!");n(!0);var l=$.ajax({url:i[o].apiUrl,type:"GET",dataType:"JSON",data:{userId:e,item:o,interval:s}});l.done(function(t){n(!1),a.empty(),$.each(t.data,function(){this.amount=parseInt(this.amount)}),Morris.Area({element:a,data:t.data,xkey:"period",ykeys:["amount"],xLabels:t.type,labels:[i[o].title],lineWidth:2,eventStrokeWidth:1,goalStrokeWidth:1,fillOpacity:.25,behaveLikeLine:!0,hideHover:"auto",lineColors:["#002337"],dateFormat:function(t){var a=new Date(t),e=a.getDate().toString(),r=(a.getMonth()+1).toString(),i=a.getFullYear().toString();return(e[1]?e:"0"+e[0])+"."+(r[1]?r:"0"+r[0])+"."+i}})})};return s.init=function(t){a.on("get:data",o),t()},s});