Moves product stat view logic to serializer

- Split frontend into multiple files
- Bump frontend deps
- Remove unused stuff
This commit is contained in:
nikolark committed 2015-11-28 21:21:58 +01:00
1 parent 3b7980ffe9
commit 195c49b0fd
24 files changed
+555 -599

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
/* View: Profile */
$(document).ready(function() {
var $userProfile = $('#user-profile');
if ($userProfile.length) {
var products_by_user_url = '/stats/products/by_user/';
var user_id = $('#user-profile').attr('data-user-id');
$.getJSON(products_by_user_url + user_id, function (data) {
if (data.hasOwnProperty('error')) {
return;
}
$(".profile-stats-orderline").highcharts({
title: {
text: false
},
xAxis: {
type: "datetime"
},
yAxis: {
title: {
text: "Kjøp"
}
},
plotOptions: {
series: {
marker: {
radius: 3
}
}
},
series: data
});
});
}
});