X-Git-Url: https://git.octo.it/?p=collection4.git;a=blobdiff_plain;f=share%2Fcollection.js;fp=share%2Fcollection.js;h=c7200868b0417c56165d485d94f192181ea2d268;hp=3ee5ccc03361a2ebafa7c1dae319f66dca632c6b;hb=d14486b469ab7e564d883a4196bf4bd26b197ed8;hpb=48c757c9633d61cf158d08f57f592f1c3169e8ac diff --git a/share/collection.js b/share/collection.js index 3ee5ccc..c720086 100644 --- a/share/collection.js +++ b/share/collection.js @@ -54,10 +54,10 @@ function value_to_string (value) /* {{{ */ } } /* }}} function value_to_string */ -function instance_get_params (graph) /* {{{ */ +function instance_get_params (inst) /* {{{ */ { - var graph_selector = graph.graph_selector; - var inst_selector = graph.instance_selector; + var graph_selector = inst.graph_selector; + var inst_selector = inst.instance_selector; var selector = {}; if (graph_selector.host == inst_selector.host) @@ -126,11 +126,11 @@ function ident_clone (ident) /* {{{ */ return (ret); } /* }}} ident_clone */ -function graph_get_defs (graph) /* {{{ */ +function inst_get_defs (inst) /* {{{ */ { - if (!graph.def) + if (!inst.def) { - var params = ident_clone (graph.graph_selector); + var params = instance_get_params (inst); params.action = "graph_def_json"; $.ajax({ @@ -143,14 +143,14 @@ function graph_get_defs (graph) /* {{{ */ if (!data) return; - graph.def = data; + inst.def = data; }}); } - if (graph.def) - return (graph.def); + if (inst.def) + return (inst.def); return; -} /* }}} graph_get_defs */ +} /* }}} inst_get_defs */ function ident_matches (selector, ident) /* {{{ */ { @@ -307,7 +307,7 @@ function json_graph_update (index) /* {{{ */ if (!inst) return; - def = graph_get_defs (inst); + def = inst_get_defs (inst); if (!def) return;