Sha256: 4c12c67813021ee3864dcfa5bcc0edf2505dfd7d0cc10f1f13d4555ffb54fa16
Contents?: true
Size: 1.29 KB
Versions: 18
Compression:
Stored size: 1.29 KB
Contents
<% javascript_tag do %> function show_graph (privilege, context, user_ids) { var params = { privilege_hierarchy: 1, highlight_privilege: privilege, filter_contexts: context }; if (user_ids) params['user_ids[]'] = user_ids; show_graph_with_params('graph', params); } var graph_params = {}; function show_graph_with_params (graph_id, params) { graph_params[graph_id] = params; base_url = "<%= graph_authorization_rules_path('svg') %>"; $(graph_id).data = base_url + '?' + Object.toQueryString(params); $(graph_id).up().show(); } function update_graph_params (graph_id, params) { show_graph_with_params(graph_id, $H(graph_params[graph_id] || {}).merge(params).toObject()); } function toggle_graph_params (graph_id) { var opts = {} $A(arguments).slice(1).each(function (param) { opts[param] = graph_params[graph_id][param] ? null : '1'; }); update_graph_params(graph_id, opts) } <% end %> <div id="graph-container" style="display:none"> <%= link_to_function "Hide", "$('graph-container').hide()", :class => 'important' %><br/> <object id="graph" data="" type="image/svg+xml" style="max-width:100%;margin-top: 0.5em"/> </div>
Version data entries
18 entries across 18 versions & 8 rubygems