Skip to content

Commit

Permalink
Merge pull request #80 from yekenuk/5.0.3
Browse files Browse the repository at this point in the history
5.0.3
  • Loading branch information
alicolville committed Aug 13, 2017
2 parents 4095f31 + 0860f77 commit 61b0507
Show file tree
Hide file tree
Showing 32 changed files with 14,250 additions and 3,914 deletions.
2 changes: 1 addition & 1 deletion js/admin.footable.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jQuery( document ).ready(function ($) {

// Strip the timestamp off
var date = value.split(" ");
date = new Date(date[0])
date = new Date(date[0]);

var day = date.getDate();
var month = date.getMonth() + 1;
Expand Down
2 changes: 1 addition & 1 deletion js/admin.footable.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 23 additions & 25 deletions js/ws-ls-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,34 @@
//
jQuery( document ).ready(function ($) {

if ("true" == ws_ls_config["is-pro"]) {

// Render upon page
$(".ws-ls-chart").each(function () {
$chart_id = $(this).attr("id");
ws_ls_render_graph($chart_id);
});

function ws_ls_render_graph($chart_id)
{
$chart_type = $("#" + $chart_id).data("chart-type");

// If not specified, default to line
if(typeof $chart_type === "undefined"){
$chart_type = "line";
}
// Render upon page
$(".ws-ls-chart").each(function () {
$chart_id = $(this).attr("id");
ws_ls_render_graph($chart_id);
});

function ws_ls_render_graph($chart_id)
{
$chart_type = $("#" + $chart_id).data("chart-type");

// If not specified, default to line
if(typeof $chart_type === "undefined"){
$chart_type = "line";
}

var ctx = $("#" + $chart_id).get(0).getContext("2d");
var ctx = $("#" + $chart_id).get(0).getContext("2d");

var width = $("#" + $chart_id).parent().width();
$("#" + $chart_id).attr("width",width-50);
var width = $("#" + $chart_id).parent().width();
$("#" + $chart_id).attr("width",width-50);

if ("line" == $chart_type) {
new Chart(ctx, {type: "line", data: this[$chart_id + "_data"], options: this[$chart_id + "_options"]});
}
else if ("bar" == $chart_type) {
if ("line" == $chart_type) {
new Chart(ctx, {type: "line", data: this[$chart_id + "_data"], options: this[$chart_id + "_options"]});
}
else if ("bar" == $chart_type) {

new Chart(ctx, {type: "bar", data: this[$chart_id + "_data"], options: this[$chart_id + "_options"]});
new Chart(ctx, {type: "bar", data: this[$chart_id + "_data"], options: this[$chart_id + "_options"]});

}
}
}

});
2 changes: 1 addition & 1 deletion js/ws-ls-chart.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified languages/weight-loss-tracker-da_DK.mo
Binary file not shown.
Loading

0 comments on commit 61b0507

Please sign in to comment.