Skip to content
Snippets Groups Projects
Commit 88819792 authored by Matthias Konitzny's avatar Matthias Konitzny :fire:
Browse files

Merge branch 'master' into gitlab-ci

parents 26ffc5d4 923e0576
No related branches found
No related tags found
No related merge requests found
Pipeline #49466 failed
/*global ks_global*/
export const COLOR_PALETTE = [
"rgb(104, 169, 77)",
"rgb(102, 75, 154)",
......
import { PLUGIN_PATH } from "../config";
/*global ks_global*/
import jQuery from "jquery";
/**
......@@ -55,9 +56,11 @@ export function listAllSpaces() {
action: "list_spaces",
};
return jQuery.ajax({
type: "POST",
url: ks_global.ajax_url,
data: payload,
}).then((data) => JSON.parse(data)["spaces"]);
return jQuery
.ajax({
type: "POST",
url: ks_global.ajax_url,
data: payload,
})
.then((data) => JSON.parse(data)["spaces"]);
}
......@@ -15,7 +15,7 @@ function ks_add_graph($atts = []): string
$script_path = 'build' . DIRECTORY_SEPARATOR . $GLOBALS['build'] . DIRECTORY_SEPARATOR . 'graph.js';
wp_enqueue_script("ks-display-js", plugins_url($script_path, __FILE__), array('jquery'), false);
ks_localize("ks-display-js");
ks_localize("ks-display-js", $atts);
return $div;
}
......@@ -25,7 +25,7 @@ function ks_echo_graph($atts = []): void
echo ks_add_graph($atts);
}
function ks_localize($handle)
function ks_localize($handle, $atts)
{
$space_id = kg_get_space_id_from_atts($atts);
$plugin_dir = plugin_dir_url(__FILE__);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment